Making Quassel slowly ready for its first release...
[quassel.git] / src / qtui / configwizard.h
1 /***************************************************************************
2  *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) version 3.                                           *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef CONFIGWIZARD_H_
22 #define CONFIGWIZARD_H_
23
24 #include <QWizard>
25
26 class QLabel;
27 class QLineEdit;
28 class QComboBox;
29
30 class ConfigWizard : public QWizard {
31   Q_OBJECT
32   
33   public:
34     enum {
35       Page_Intro,
36       Page_AdminUser,
37       Page_StorageSelection,
38       Page_StorageDetails,
39       Page_Conclusion
40     };
41     
42     ConfigWizard(const QStringList &storageProviders, QWidget *parent = NULL);
43 };
44
45 class IntroPage : public QWizardPage {
46   Q_OBJECT
47   
48   public:
49     IntroPage(QWidget *parent = NULL);
50     
51     int nextId() const;
52     
53   private:
54     QLabel *label;
55 };
56
57 class AdminUserPage : public QWizardPage {
58   Q_OBJECT
59   
60   public:
61     AdminUserPage(QWidget *parent = NULL);
62     
63     int nextId() const;
64     
65   private:
66     QLabel *nameLabel;
67     QLineEdit *nameEdit;
68     QLabel *passwordLabel;
69     QLineEdit *passwordEdit;
70 };
71
72 class StorageSelectionPage : public QWizardPage {
73   Q_OBJECT
74   
75   public:
76     StorageSelectionPage(const QStringList &storageProviders, QWidget *parent = NULL);
77     
78     int nextId() const;
79     
80   private:
81     QComboBox *storageSelection;
82 };
83
84 class StorageDetailsPage : public QWizardPage {
85   Q_OBJECT
86   
87   public:
88     StorageDetailsPage(QWidget *parent = NULL);
89     
90     int nextId() const;
91     
92   private:
93     QLabel *hostLabel;
94     QLineEdit *hostEdit;
95     QLabel *portLabel;
96     QLineEdit *portEdit;
97     QLabel *databaseLabel;
98     QLineEdit *databaseEdit;
99     QLabel *userLabel;
100     QLineEdit *userEdit;
101     QLabel *passwordLabel;
102     QLineEdit *passwordEdit;
103 };
104
105 class ConclusionPage : public QWizardPage {
106   Q_OBJECT
107   
108   public:
109     ConclusionPage(const QStringList &storageProviders, QWidget *parent = NULL);
110     
111     void initializePage();
112     int nextId() const;
113     
114   private:
115     QLabel *adminuser;
116     QLabel *storage;
117     QStringList storageProviders;
118 };
119
120 #endif /*CONFIGWIZARD_H_*/