1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _CHART2_CREATION_WIZARD_HXX 25 #define _CHART2_CREATION_WIZARD_HXX 26 27 #include "ServiceMacros.hxx" 28 #include "TimerTriggeredControllerLock.hxx" 29 #include "TabPageNotifiable.hxx" 30 31 #include <com/sun/star/chart2/XChartDocument.hpp> 32 #include <svtools/roadmapwizard.hxx> 33 #include <com/sun/star/uno/XComponentContext.hpp> 34 35 // for auto_ptr 36 #include <memory> 37 38 //............................................................................. 39 namespace chart 40 { 41 //............................................................................. 42 43 class RangeChooserTabPage; 44 class DataSourceTabPage; 45 class ChartTypeTemplateProvider; 46 class DialogModel; 47 48 class CreationWizard : public 49 svt::RoadmapWizard 50 , public TabPageNotifiable 51 { 52 public: 53 CreationWizard( Window* pParent, 54 const ::com::sun::star::uno::Reference< 55 ::com::sun::star::frame::XModel >& xChartModel 56 , const ::com::sun::star::uno::Reference< 57 ::com::sun::star::uno::XComponentContext >& xContext 58 , 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 59 virtual ~CreationWizard(); 60 61 bool isClosable(); 62 63 // TabPageNotifiable 64 virtual void setInvalidPage( TabPage * pTabPage ); 65 virtual void setValidPage( TabPage * pTabPage ); 66 67 protected: 68 virtual sal_Bool leaveState( WizardState _nState ); 69 virtual WizardState determineNextState(WizardState nCurrentState) const; 70 virtual void enterState(WizardState nState); 71 72 virtual String getStateDisplayName( WizardState nState ) const; 73 74 private: 75 //no default constructor 76 CreationWizard(); 77 78 virtual svt::OWizardPage* createPage(WizardState nState); 79 80 ::com::sun::star::uno::Reference< 81 ::com::sun::star::chart2::XChartDocument > m_xChartModel; 82 ::com::sun::star::uno::Reference< 83 ::com::sun::star::uno::XComponentContext> m_xCC; 84 bool m_bIsClosable; 85 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 86 ChartTypeTemplateProvider* m_pTemplateProvider; 87 ::std::auto_ptr< DialogModel > m_apDialogModel; 88 89 WizardState m_nFirstState; 90 WizardState m_nLastState; 91 92 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; 93 94 // RangeChooserTabPage * m_pRangeChooserTabePage; 95 // DataSourceTabPage * m_pDataSourceTabPage; 96 bool m_bCanTravel; 97 }; 98 //............................................................................. 99 } //namespace chart 100 //............................................................................. 101 #endif 102