1 | /* |
2 | Copyright (c) 2009 Volker Krause <vkrause@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or (at your |
7 | option) any later version. |
8 | |
9 | This library is distributed in the hope that it will be useful, but WITHOUT |
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
12 | License for more details. |
13 | |
14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to the |
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. |
18 | */ |
19 | |
20 | #ifndef DIALOG_H |
21 | #define DIALOG_H |
22 | |
23 | #include "setupmanager.h" |
24 | #include <kassistantdialog.h> |
25 | |
26 | class Page; |
27 | class TypePage; |
28 | |
29 | class Dialog : public KAssistantDialog |
30 | { |
31 | Q_OBJECT |
32 | public: |
33 | explicit Dialog( QWidget *parent = 0, Qt::WindowFlags flags = 0 ); |
34 | |
35 | /* reimpl */ void next(); |
36 | /* reimpl */ void back(); |
37 | |
38 | // give room for certain pages to create objects too. |
39 | SetupManager* setupManager(); |
40 | |
41 | public slots: |
42 | Q_SCRIPTABLE QObject* addPage( const QString &uiFile, const QString &title ); |
43 | |
44 | void reject(); |
45 | |
46 | private slots: |
47 | void slotNextPage(); |
48 | #ifndef ACCOUNTWIZARD_NO_GHNS |
49 | void slotGhnsWanted(); |
50 | void slotGhnsNotWanted(); |
51 | #endif |
52 | void slotManualConfigWanted( bool ); |
53 | void slotNextOk(); |
54 | void slotBackOk(); |
55 | void clearDynamicPages(); |
56 | |
57 | private: |
58 | KPageWidgetItem* ( Page* page, const QString &title ); |
59 | |
60 | private: |
61 | SetupManager* mSetupManager; |
62 | KPageWidgetItem* mLastPage; |
63 | KPageWidgetItem* mProviderPage; |
64 | KPageWidgetItem* mTypePage; |
65 | KPageWidgetItem* mLoadPage; |
66 | QVector<KPageWidgetItem*> mDynamicPages; |
67 | }; |
68 | |
69 | #endif |
70 | |