~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to doc/api/qtcreator-dev-wizards.qdoc

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
    Implementing wizards requires:
33
33
    \list
34
 
    \o Deciding on a base class:
 
34
    \li Deciding on a base class:
35
35
       \list
36
 
       \o Core::IWizard is a very generic interface that does
37
 
          not make any assumption about what the wizard does and
38
 
          what its UI looks like.
 
36
       \li Core::IWizard is a very generic interface that does
 
37
           not make any assumption about what the wizard does and
 
38
           what its UI looks like.
39
39
 
40
 
       \o Core::BaseFileWizard should be used for wizards that
41
 
          generate files using a UI based on Utils::Wizard.
 
40
       \li Core::BaseFileWizard should be used for wizards that
 
41
           generate files using a UI based on Utils::Wizard.
42
42
       \endlist
43
43
 
44
 
    \o Providing a set of parameters that determine how the wizard shows up
45
 
       in the list of wizards in the  \gui{New File or Project} dialog.
46
 
 
47
 
       When deriving from Core::IWizard, virtual functions returning the
48
 
       values have to be implemented.
49
 
 
50
 
       When deriving from Core::BaseFileWizard, a parameter class
51
 
       Core::BaseFileWizardParameters needs to be passed to the constructor,
52
 
       on which the parameters can be set. This allows for easy creation
53
 
       of several wizard instances with slightly different parameters.
54
 
 
55
 
    \o Implementing the wizard UI
56
 
 
57
 
       Typically, this will be a class derived from Utils::Wizard.
58
 
       Utils::Wizard extends QWizard with the functionality to show a progress
59
 
       bar on the left.
60
 
 
61
 
    \o Implementing the wizard functionality
62
 
 
63
 
       When deriving from Core::BaseFileWizard, a list of Core::GeneratedFile
64
 
       needs to be populated with the files and their contents.
65
 
       \note The files are not actually written to the disk. This will be
66
 
       done by Core::BaseFileWizard after performing overwrite checks and prompting
67
 
       the user accordingly.
 
44
    \li Providing a set of parameters that determine how the wizard shows up
 
45
        in the list of wizards in the  \gui{New File or Project} dialog.
 
46
 
 
47
        When deriving from Core::IWizard, virtual functions returning the
 
48
        values have to be implemented.
 
49
 
 
50
        When deriving from Core::BaseFileWizard, a parameter class
 
51
        Core::BaseFileWizardParameters needs to be passed to the constructor,
 
52
        on which the parameters can be set. This allows for easy creation
 
53
        of several wizard instances with slightly different parameters.
 
54
 
 
55
    \li Implementing the wizard UI
 
56
 
 
57
        Typically, this will be a class derived from Utils::Wizard.
 
58
        Utils::Wizard extends QWizard with the functionality to show a progress
 
59
        bar on the left.
 
60
 
 
61
    \li Implementing the wizard functionality
 
62
 
 
63
        When deriving from Core::BaseFileWizard, a list of Core::GeneratedFile
 
64
        needs to be populated with the files and their contents.
 
65
        \note The files are not actually written to the disk. This will be
 
66
        done by Core::BaseFileWizard after performing overwrite checks and prompting
 
67
        the user accordingly.
68
68
 
69
69
    \endlist
70
70
 
72
72
 
73
73
    \table
74
74
    \header
75
 
    \o Class
76
 
    \o Description
77
 
 
78
 
    \row
79
 
    \o Core::IWizard
80
 
    \o Qt Creator wizard interface, implementations of which are registered with
81
 
       ExtensionSystem::PluginManager.
82
 
 
83
 
    \row
84
 
    \o Core::BaseFileWizard
85
 
    \o Inherits Core::IWizard and provides a base class for generating files with a UI
86
 
       based on QWizard.
87
 
 
88
 
    \row
89
 
    \o Core::BaseFileWizardParameters
90
 
    \o Contains parameters for Core::BaseFileWizard.
91
 
 
92
 
    \row
93
 
    \o Core::GeneratedFile
94
 
    \o A file as produced by Core::BaseFileWizard, containing name, contents and some
95
 
    attributes.
96
 
 
97
 
    \row
98
 
    \o Utils::FileWizardPage
99
 
    \o Introductory wizard page asking for file name and path.
100
 
 
101
 
    \row
102
 
    \o Utils::FileWizardDialog
103
 
    \o A wizard dialog presenting a Utils::FileWizardPage, which can be extended
104
 
       by custom pages.
105
 
 
106
 
    \row
107
 
    \o Utils::ProjectIntroPage
108
 
    \o Introductory wizard page asking for project name and path.
109
 
 
110
 
    \row
111
 
    \o ProjectExplorer::BaseProjectWizardDialog
112
 
    \o Base class for project wizard dialogs, presenting
 
75
    \li Class
 
76
    \li Description
 
77
 
 
78
    \row
 
79
    \li Core::IWizard
 
80
    \li Qt Creator wizard interface, implementations of which are registered with
 
81
        ExtensionSystem::PluginManager.
 
82
 
 
83
    \row
 
84
    \li Core::BaseFileWizard
 
85
    \li Inherits Core::IWizard and provides a base class for generating files with a UI
 
86
        based on QWizard.
 
87
 
 
88
    \row
 
89
    \li Core::BaseFileWizardParameters
 
90
    \li Contains parameters for Core::BaseFileWizard.
 
91
 
 
92
    \row
 
93
    \li Core::GeneratedFile
 
94
    \li A file as produced by Core::BaseFileWizard, containing name, contents and some
 
95
        attributes.
 
96
 
 
97
    \row
 
98
    \li Utils::FileWizardPage
 
99
    \li Introductory wizard page asking for file name and path.
 
100
 
 
101
    \row
 
102
    \li Utils::FileWizardDialog
 
103
    \li A wizard dialog presenting a Utils::FileWizardPage, which can be extended
 
104
        by custom pages.
 
105
 
 
106
    \row
 
107
    \li Utils::ProjectIntroPage
 
108
    \li Introductory wizard page asking for project name and path.
 
109
 
 
110
    \row
 
111
    \li ProjectExplorer::BaseProjectWizardDialog
 
112
    \li Base class for project wizard dialogs, presenting
113
113
        a Utils::ProjectIntroPage.
114
114
 
115
115
    \endtable
123
123
 
124
124
    \table
125
125
    \header
126
 
    \o Type
127
 
    \o Parameter Name
128
 
    \o Description
129
 
 
130
 
    \row
131
 
    \o Core::IWizard::WizardKind
132
 
    \o kind
133
 
    \o Enumeration value that indicates the type of the wizard (project, class, file).
134
 
 
135
 
    \row
136
 
    \o QIcon
137
 
    \o icon
138
 
    \o Icon to show.
139
 
 
140
 
    \row
141
 
    \o QString
142
 
    \o description
143
 
    \o Descriptive text.
144
 
 
145
 
    \row
146
 
    \o QString
147
 
    \o displayName
148
 
    \o Name to be shown in the list.
149
 
 
150
 
    \row
151
 
    \o QString
152
 
    \o id
153
 
    \o Unique identifier for the wizard. It also determines the order within a category.
154
 
 
155
 
    \row
156
 
    \o QString
157
 
    \o category
158
 
    \o Identifier of the category under which the wizard is to be listed. It also
159
 
       determines the order of the categories.
 
126
    \li Type
 
127
    \li Parameter Name
 
128
    \li Description
 
129
 
 
130
    \row
 
131
    \li Core::IWizard::WizardKind
 
132
    \li kind
 
133
    \li Enumeration value that indicates the type of the wizard (project, class, file).
 
134
 
 
135
    \row
 
136
    \li QIcon
 
137
    \li icon
 
138
    \li Icon to show.
 
139
 
 
140
    \row
 
141
    \li QString
 
142
    \li description
 
143
    \li Descriptive text.
 
144
 
 
145
    \row
 
146
    \li QString
 
147
    \li displayName
 
148
    \li Name to be shown in the list.
 
149
 
 
150
    \row
 
151
    \li QString
 
152
    \li id
 
153
    \li Unique identifier for the wizard. It also determines the order within a category.
 
154
 
 
155
    \row
 
156
    \li QString
 
157
    \li category
 
158
    \li Identifier of the category under which the wizard is to be listed. It also
 
159
        determines the order of the categories.
160
160
    \
161
161
    \row
162
 
    \o QString
163
 
    \o displayCategory
164
 
    \o Description of the category.
 
162
    \li QString
 
163
    \li displayCategory
 
164
    \li Description of the category.
165
165
    \endtable
166
166
 
167
167
    \section1 Example
240
240
    The complete code of \c webpagewizard.cpp looks as follows:
241
241
    \snippet webpagewizard/webpagewizard.cpp 0
242
242
 
243
 
    The registration of the wizard in the \c initialize() method
 
243
    The registration of the wizard in the \c initialize() function
244
244
    of a plugin looks like:
245
245
    \snippet webpagewizard/webpagewizardplugin.cpp 0
246
246
*/