source: trunk/doc/src/examples/trivialwizard.qdoc@ 1168

Last change on this file since 1168 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 3.0 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the documentation of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:FDL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in a
14** written agreement between you and Nokia.
15**
16** GNU Free Documentation License
17** Alternatively, this file may be used under the terms of the GNU Free
18** Documentation License version 1.3 as published by the Free Software
19** Foundation and appearing in the file included in the packaging of this
20** file.
21**
22** If you have questions regarding the use of this file, please contact
23** Nokia at [email protected].
24** $QT_END_LICENSE$
25**
26****************************************************************************/
27
28/*!
29 \example dialogs/trivialwizard
30 \title Trivial Wizard Example
31
32 The Trivial Wizard example illustrates how to create a linear three-page
33 registration wizard using three instances of QWizardPage and one instance
34 of QWizard.
35
36 \image trivialwizard-example-flow.png
37
38 \section1 Introduction Page
39
40 \image trivialwizard-example-introduction.png
41
42 The introduction page is created with the \c createIntroPage()
43 function where a QWizardPage is created and its title is set to
44 "Introduction". A QLabel is used to hold the description of \c page.
45 A QVBoxLayout is used to hold the \c label. This \c page is returned
46 when the \c createIntroPage() function is called.
47
48 \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 0
49
50 \section1 Registration Page
51
52 \image trivialwizard-example-registration.png
53
54 The registration page is created with the \c createRegistrationPage()
55 function. QLineEdit objects are used to allow the user to input a name
56 and an e-mail address. A QGridLayout is used to hold the QLabel and
57 QLineEdit objects.
58
59 \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 2
60
61 \section1 Conclusion Page
62
63 \image trivialwizard-example-conclusion.png
64
65 The conclusion page is created in the \c createConclusionPage()
66 function. This function's content is similar to \c createIntroPage(). A
67 QLabel is used to inform the user that the registration process has
68 completed successfully.
69
70 \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 6
71
72 \section1 \c main() Function
73
74 The \c main() function instantiates a QWizard object, \c wizard, and
75 adds all three QWizardPage objects to it. The \c wizard window title is
76 set to "Trivial Wizard" and its \c show() function is invoked to display
77 it.
78
79 \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 10
80
81 \sa QWizard, {Class Wizard Example}, {License Wizard Example}
82*/
Note: See TracBrowser for help on using the repository browser.