Line data Source code
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 : #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_HXX
21 : #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_HXX
22 :
23 : #include "ServiceMacros.hxx"
24 : #include "TimerTriggeredControllerLock.hxx"
25 : #include "TabPageNotifiable.hxx"
26 :
27 : #include <com/sun/star/chart2/XChartDocument.hpp>
28 : #include <svtools/roadmapwizard.hxx>
29 : #include <com/sun/star/uno/XComponentContext.hpp>
30 :
31 : #include <boost/noncopyable.hpp>
32 : #include <boost/scoped_ptr.hpp>
33 :
34 : namespace chart
35 : {
36 :
37 : class RangeChooserTabPage;
38 : class DataSourceTabPage;
39 : class ChartTypeTemplateProvider;
40 : class DialogModel;
41 :
42 : class CreationWizard : public svt::RoadmapWizard, public TabPageNotifiable
43 : {
44 : public:
45 : CreationWizard( vcl::Window* pParent,
46 : const ::com::sun::star::uno::Reference<
47 : ::com::sun::star::frame::XModel >& xChartModel
48 : , const ::com::sun::star::uno::Reference<
49 : ::com::sun::star::uno::XComponentContext >& xContext
50 : , sal_Int32 nOnePageOnlyIndex=-1 );//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
51 : virtual ~CreationWizard();
52 :
53 0 : bool isClosable() { /*@todo*/ return m_bIsClosable;}
54 :
55 : // TabPageNotifiable
56 : virtual void setInvalidPage( TabPage * pTabPage ) SAL_OVERRIDE;
57 : virtual void setValidPage( TabPage * pTabPage ) SAL_OVERRIDE;
58 :
59 : protected:
60 : virtual bool leaveState( WizardState _nState ) SAL_OVERRIDE;
61 : virtual WizardState determineNextState(WizardState nCurrentState) const SAL_OVERRIDE;
62 : virtual void enterState(WizardState nState) SAL_OVERRIDE;
63 :
64 : virtual OUString getStateDisplayName( WizardState nState ) const SAL_OVERRIDE;
65 :
66 : private:
67 : //no default constructor
68 : CreationWizard();
69 :
70 : virtual svt::OWizardPage* createPage(WizardState nState) SAL_OVERRIDE;
71 :
72 : ::com::sun::star::uno::Reference<
73 : ::com::sun::star::chart2::XChartDocument > m_xChartModel;
74 : ::com::sun::star::uno::Reference<
75 : ::com::sun::star::uno::XComponentContext> m_xCC;
76 : bool m_bIsClosable;
77 : sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
78 : ChartTypeTemplateProvider* m_pTemplateProvider;
79 : boost::scoped_ptr<DialogModel> m_pDialogModel;
80 :
81 : WizardState m_nFirstState;
82 : WizardState m_nLastState;
83 :
84 : TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
85 :
86 : // RangeChooserTabPage * m_pRangeChooserTabePage;
87 : // DataSourceTabPage * m_pDataSourceTabPage;
88 : bool m_bCanTravel;
89 : };
90 : } //namespace chart
91 : #endif
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|