|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the examples of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef LICENSEWIZARD_H |
|
43 #define LICENSEWIZARD_H |
|
44 |
|
45 #include <QWizard> |
|
46 |
|
47 QT_BEGIN_NAMESPACE |
|
48 class QCheckBox; |
|
49 class QLabel; |
|
50 class QLineEdit; |
|
51 class QRadioButton; |
|
52 QT_END_NAMESPACE |
|
53 |
|
54 //! [0] //! [1] |
|
55 class LicenseWizard : public QWizard |
|
56 { |
|
57 //! [0] |
|
58 Q_OBJECT |
|
59 |
|
60 public: |
|
61 //! [2] |
|
62 enum { Page_Intro, Page_Evaluate, Page_Register, Page_Details, |
|
63 Page_Conclusion }; |
|
64 //! [2] |
|
65 |
|
66 LicenseWizard(QWidget *parent = 0); |
|
67 |
|
68 private slots: |
|
69 void showHelp(); |
|
70 //! [3] |
|
71 }; |
|
72 //! [1] //! [3] |
|
73 |
|
74 //! [4] |
|
75 class IntroPage : public QWizardPage |
|
76 { |
|
77 Q_OBJECT |
|
78 |
|
79 public: |
|
80 IntroPage(QWidget *parent = 0); |
|
81 |
|
82 int nextId() const; |
|
83 |
|
84 private: |
|
85 QLabel *topLabel; |
|
86 QRadioButton *registerRadioButton; |
|
87 QRadioButton *evaluateRadioButton; |
|
88 }; |
|
89 //! [4] |
|
90 |
|
91 //! [5] |
|
92 class EvaluatePage : public QWizardPage |
|
93 { |
|
94 Q_OBJECT |
|
95 |
|
96 public: |
|
97 EvaluatePage(QWidget *parent = 0); |
|
98 |
|
99 int nextId() const; |
|
100 |
|
101 private: |
|
102 QLabel *nameLabel; |
|
103 QLabel *emailLabel; |
|
104 QLineEdit *nameLineEdit; |
|
105 QLineEdit *emailLineEdit; |
|
106 }; |
|
107 //! [5] |
|
108 |
|
109 class RegisterPage : public QWizardPage |
|
110 { |
|
111 Q_OBJECT |
|
112 |
|
113 public: |
|
114 RegisterPage(QWidget *parent = 0); |
|
115 |
|
116 int nextId() const; |
|
117 |
|
118 private: |
|
119 QLabel *nameLabel; |
|
120 QLabel *upgradeKeyLabel; |
|
121 QLineEdit *nameLineEdit; |
|
122 QLineEdit *upgradeKeyLineEdit; |
|
123 }; |
|
124 |
|
125 class DetailsPage : public QWizardPage |
|
126 { |
|
127 Q_OBJECT |
|
128 |
|
129 public: |
|
130 DetailsPage(QWidget *parent = 0); |
|
131 |
|
132 int nextId() const; |
|
133 |
|
134 private: |
|
135 QLabel *companyLabel; |
|
136 QLabel *emailLabel; |
|
137 QLabel *postalLabel; |
|
138 QLineEdit *companyLineEdit; |
|
139 QLineEdit *emailLineEdit; |
|
140 QLineEdit *postalLineEdit; |
|
141 }; |
|
142 |
|
143 //! [6] |
|
144 class ConclusionPage : public QWizardPage |
|
145 { |
|
146 Q_OBJECT |
|
147 |
|
148 public: |
|
149 ConclusionPage(QWidget *parent = 0); |
|
150 |
|
151 void initializePage(); |
|
152 int nextId() const; |
|
153 void setVisible(bool visible); |
|
154 |
|
155 private slots: |
|
156 void printButtonClicked(); |
|
157 |
|
158 private: |
|
159 QLabel *bottomLabel; |
|
160 QCheckBox *agreeCheckBox; |
|
161 }; |
|
162 //! [6] |
|
163 |
|
164 #endif |