libtdepim

tdeconfigwizard.h
1 /*
2  This file is part of libtdepim.
3 
4  Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 #ifndef TDECONFIGWIZARD_H
22 #define TDECONFIGWIZARD_H
23 
24 #include <tdeconfigpropagator.h>
25 #include <tdemacros.h>
26 #include <kdialogbase.h>
27 
28 class TQListView;
29 
33 class TDE_EXPORT TDEConfigWizard : public KDialogBase
34 {
35  TQ_OBJECT
36 
37  public:
41  TDEConfigWizard( TQWidget *parent = 0, char *name = 0, bool modal = false );
46  TDEConfigWizard( TDEConfigPropagator *propagator, TQWidget *parent = 0,
47  char *name = 0, bool modal = false );
51  virtual ~TDEConfigWizard();
52 
56  void setPropagator( TDEConfigPropagator * );
60  TDEConfigPropagator *propagator() { return mPropagator; }
61 
65  TQFrame *createWizardPage( const TQString &title );
66 
71  virtual void usrReadConfig() = 0;
72 
78  virtual void usrWriteConfig() = 0;
79 
84  virtual TQString validate() { return TQString(); }
85 
86  protected slots:
87  void readConfig();
88 
89  void slotOk();
90 
91  void slotAboutToShowPage( TQWidget *page );
92 
93  protected:
94  void init();
95 
96  void setupRulesPage();
97  void updateRules();
98  void setupChangesPage();
99  void updateChanges();
100 
101  private:
102  TDEConfigPropagator *mPropagator;
103 
104  TQListView *mRuleView;
105  TQListView *mChangeView;
106 
107  TQWidget *mChangesPage;
108 };
109 
110 #endif
Configuration wizard base class.
TDEConfigPropagator * propagator()
Return propagator the wizard operates on.
virtual TQString validate()
Validates the supplied data.
virtual void usrReadConfig()=0
Use this function to read the configuration from the TDEConfigSkeleton object to the GUI.
virtual void usrWriteConfig()=0
This function is called when the wizard is finished.