The QWizard class provides a framework for wizard dialogs.
.PP
A wizard is a special type of input dialog that consists of a sequence of dialog pages. A wizard's purpose is to walk the user through a process step by step. Wizards are useful for complex or infrequently occurring tasks that people may find difficult to learn or do.
.PP
QWizard provides page titles and displays Next, Back, Finish, Cancel, and Help push buttons, as appropriate to the current position in the page sequence. These buttons can be enabled/disabled using setBackEnabled(), setNextEnabled(), setFinishEnabled() and setHelpEnabled().
Create and populate dialog pages that inherit from TQWidget and add them to the wizard using addPage(). Use insertPage() to add a dialog page at a certain position in the page sequence. Use removePage() to remove a page from the page sequence.
Use currentPage() to retrieve a pointer to the currently displayed page. page() returns a pointer to the page at a certain position in the page sequence.
.PP
Use pageCount() to retrieve the total number of pages in the page sequence. indexOf() will return the index of a page in the page sequence.
.PP
QWizard provides functionality to mark pages as appropriate (or not) in the current context with setAppropriate(). The idea is that a page may be irrelevant and should be skipped depending on the data entered by the user on a preceding page.
.PP
It is generally considered good design to provide a greater number of simple pages with fewer choices rather than a smaller number of complex pages.
.PP
Example code is available here: wizard/wizard.cpp wizard/wizard.h
.PP
<center>
.ce 1
.B "[Image Omitted]"
.PP
</center> <blockquote><p align="center">\fI A QWizard page \fR</p> </blockquote>
.PP
See also Abstract Widget Classes, Dialog Classes, and Organizers.
Called when the Next button is clicked; this virtual function returns TRUE if \fIpage\fR is relevant for display in the current context; otherwise it is ignored by QWizard and returns FALSE. The default implementation returns the value set using setAppropriate(). The ultimate default is TRUE.
.PP
\fBWarning:\fR The last page of the wizard will be displayed if no page is relevant in the current context.
Called when the user clicks the Back button; this function shows the preceding relevant page in the sequence.
.PP
See also appropriate().
.SH "QPushButton * QWizard::backButton () const"
Returns a pointer to the dialog's Back button
.PP
By default, this button is connected to the back() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setBackEnabled() to enable/disable this button.
Returns a pointer to the current page in the sequence. Although the wizard does its best to make sure that this value is never 0, it can be if you try hard enough.
By default, this button is connected to the QDialog::accept() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setFinishEnabled() to enable/disable this button.
Called when the user clicks the Help button, this function emits the helpClicked() signal.
.SH "QPushButton * QWizard::helpButton () const"
Returns a pointer to the dialog's Help button
.PP
By default, this button is connected to the help() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setHelpEnabled() to enable/disable this button.
.SH "void QWizard::helpClicked ()\fC [signal]\fR"
This signal is emitted when the user clicks on the Help button.
Inserts \fIpage\fR at position \fIindex\fR into the page sequence, with title \fItitle\fR. If \fIindex\fR is -1, the page will be appended to the end of the wizard's page sequence.
This virtual function is responsible for laying out the title row.
.PP
\fIlayout\fR is the horizontal layout for the wizard, and \fItitle\fR is the title for this page. This function is called every time \fItitle\fR changes.
Called when the user clicks the Next button, this function shows the next relevant page in the sequence.
.PP
See also appropriate().
.SH "QPushButton * QWizard::nextButton () const"
Returns a pointer to the dialog's Next button
.PP
By default, this button is connected to the next() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setNextEnabled() to enable/disable this button.
Removes \fIpage\fR from the page sequence but does not delete the page. If \fIpage\fR is currently being displayed, QWizard will display the page that precedes it, or the first page if this was the first page.
If \fIappropriate\fR is TRUE then page \fIpage\fR is considered relevant in the current context and should be displayed in the page sequence; otherwise \fIpage\fR should not be displayed in the page sequence.
If \fIenable\fR is TRUE, page \fIpage\fR has a Next button; otherwise the Next button on \fIpage\fR is disabled. By default all pages have this button.
Makes \fIpage\fR the current page and emits the selected() signal.
.PP
This virtual function is called whenever a different page is to be shown, including the first time the QWizard is shown. By reimplementing it (and calling QWizard::showPage()), you can prepare each page prior to it being shown.
.PP
Examples:
.)l distributor/distributor.ui.h and wizard/wizard.cpp.