| 1 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the LibreOffice project. |
| 4 |
* |
| 5 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
* |
| 9 |
* This file incorporates work covered by the following license notice: |
| 10 |
* |
| 11 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
| 12 |
* contributor license agreements. See the NOTICE file distributed |
| 13 |
* with this work for additional information regarding copyright |
| 14 |
* ownership. The ASF licenses this file to you under the Apache |
| 15 |
* License, Version 2.0 (the "License"); you may not use this file |
| 16 |
* except in compliance with the License. You may obtain a copy of |
| 17 |
* the License at http://www.apache.org/licenses/LICENSE-2.0 . |
| 18 |
*/ |
| 19 |
|
| 20 |
#pragma once |
| 21 |
|
| 22 |
#include <TimerTriggeredControllerLock.hxx> |
| 23 |
#include "TabPageNotifiable.hxx" |
| 24 |
|
| 25 |
#include <rtl/ref.hxx> |
| 26 |
#include <vcl/roadmapwizardmachine.hxx> |
| 27 |
|
| 28 |
#include <memory> |
| 29 |
|
| 30 |
namespace com::sun::star::uno |
| 31 |
{ |
| 32 |
class XComponentContext; |
| 33 |
} |
| 34 |
|
| 35 |
using vcl::WizardTypes::WizardState; |
| 36 |
|
| 37 |
namespace chart |
| 38 |
{ |
| 39 |
class ChartModel; |
| 40 |
class ChartTypeTemplateProvider; |
| 41 |
class DialogModel; |
| 42 |
|
| 43 |
class CreationWizard final : public vcl::RoadmapWizardMachine, public TabPageNotifiable |
| 44 |
{ |
| 45 |
public: |
| 46 |
CreationWizard(weld::Window* pParent, const rtl::Reference<::chart::ChartModel>& xChartModel, |
| 47 |
css::uno::Reference<css::uno::XComponentContext> xContext); |
| 48 |
|
| 49 |
CreationWizard() = delete; |
| 50 |
virtual ~CreationWizard() override; |
| 51 |
|
| 52 |
// TabPageNotifiable |
| 53 |
virtual void setInvalidPage(BuilderPage* pTabPage) override; |
| 54 |
virtual void setValidPage(BuilderPage* pTabPage) override; |
| 55 |
|
| 56 |
protected: |
| 57 |
virtual bool leaveState(WizardState _nState) override; |
| 58 |
virtual WizardState determineNextState(WizardState nCurrentState) const override; |
| 59 |
virtual void enterState(WizardState nState) override; |
| 60 |
|
| 61 |
virtual OUString getStateDisplayName(WizardState nState) const override; |
| 62 |
|
| 63 |
private: |
| 64 |
virtual std::unique_ptr<BuilderPage> createPage(WizardState nState) override; |
| 65 |
|
| 66 |
rtl::Reference<::chart::ChartModel> m_xChartModel; |
| 67 |
css::uno::Reference<css::uno::XComponentContext> m_xComponentContext; |
| 68 |
ChartTypeTemplateProvider* m_pTemplateProvider; |
| 69 |
std::unique_ptr<DialogModel> m_pDialogModel; |
| 70 |
|
| 71 |
TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; |
| 72 |
|
| 73 |
bool m_bCanTravel; |
| 74 |
}; |
| 75 |
|
| 76 |
} //namespace chart |
| 77 |
|
| 78 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |