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.
TQWizard 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.
TQWizard 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.
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 TQWizard and returns FALSE. The default implementation returns the value set using setAppropriate(). The ultimate default is TRUE.
By default, this button is connected to the back() slot, which is virtual so you can reimplement it in a TQWizard 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 TQDialog::accept() slot, which is virtual so you can reimplement it in a TQWizard subclass. Use setFinishEnabled() to enable/disable this button.
By default, this button is connected to the help() slot, which is virtual so you can reimplement it in a TQWizard subclass. Use setHelpEnabled() to enable/disable this 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.
By default, this button is connected to the next() slot, which is virtual so you can reimplement it in a TQWizard subclass. Use setNextEnabled() to enable/disable this button.
.SH "TQWidget * TQWizard::page ( int index ) const"
Removes \fIpage\fR from the page sequence but does not delete the page. If \fIpage\fR is currently being displayed, TQWizard 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.
This virtual function is called whenever a different page is to be shown, including the first time the TQWizard is shown. By reimplementing it (and calling TQWizard::showPage()), you can prepare each page prior to it being shown.