| Home · All Classes · Annotated · Functions |
The QWizard class provides a simple wizard implementation More...
#include <QWizard>
Inherits QWidget.
The QWizard class provides a simple wizard implementation
To use the Wizard follow these steps:
Note: if one page of the wizard has controls which enable and disable other pages use connectPageEnabler instead of calling setAppropriate manually.
This property holds the text shown on the "next" button.
This property that is shown on the "next" button. By default this property is initialized to "&Next >"
Access functions:
This property holds the text shown on the "back" button.
This property that is shown on the "back" button. By default this property is initialized to "< &Back"
Access functions:
Create a new Qtopia QWizard with parent parent and flags f. This is a small compact wizard with a simple label at the top for each page and only two buttons at the bottom to control pages. On the phone edition, the page switching is performed via context bar buttons and the page GUI buttons are not displayed.
On the first appropriate page of the QWizard the two buttons are labelled cancel and next. On the last appropriate page they are labelled previous and finish. On all other pages the buttons are labelled previous and next. The context menu contains cancel and finish, as well as previous and next options.
Deconstructs QWizard.
This signal is emitted before the page page is shown. By connecting to this signal some last minute preparations on page can be done.
This signal is emitted if the user has clicked on the Finish button.
Add the widget page w to this QWizard. It will be added at the end of the sequence of pages. Note: the windowTitle property of the widget is used to set the QWizard page title and finishButton is false for each page by default. If this is the last page finishButton( w, true ) must be called.
This method re-parents w onto the internal stacked widget in the QWizard. Note: re-parenting warnings can be safely ignored.
If no title is set a page title will be created using the index of the page and the object name of the widget.
Connect the source object o signal s to the page w set appropriate. The signal must supply a boolean. The signals are mux'ed using a QSignalMapper so that when the object widget is toggled, the page's appropriate setting is toggled. Useful for turning pages "on" and "Off" depending on a choices checkbox. Since pages are initially enabled, toggle check boxes should be initially checked, so the toggling to checked/true toggles the page to enabled/true.
Returns a pointer to the page at the current position or 0 if there is no pages in the QWizard.
Returns the index of widget w, or -1 if w is not a child.
Load widget pages parented onto object p into the pagelist. If p is 0 (NULL) then it loads pages parented onto itself. The QWizard will treat any QWidget which is a direct child of object p (that is, resides in p's children() list) as a page. This indicates that making widgets a child of the QWizard in a UI file, and using p = 0 will make them pages. loadPages() should be called before trying to do anything with pages set by parenting, or calls to setAppropriate() and page() which assume pages will fail. The widget pages requires the windowTitle or caption property to be set as this is used for the title of the page.
QWizard *wiz = new QWizard;
QWidget page1 = new QWidget( wiz );
page1->setWindowTitle( "First page" ); // specifically set title
QWidget *page2 = new MyPage2( wiz ); // custom ctor sets windowTitle
wiz->loadPages(); // OK to set things on pages now
wiz->setAppropriate( page1, false );
page2->setWindowTitle( "Second page" ); // can change title later
Returns a pointer to the page at position index in the sequence, or 0 if there is no such index. The first page has index 0.
This signal is emitted if the user has clicked on the Cancel button.
If app is true then page w is considered relevant in the current context and should be displayed in the page sequence; otherwise the page should not be displayed in the page sequence.
If enabled is true, the Finish button on page w may be enabled, otherwise it is disabled. Note: Finish is displayed in the place of the Next button, and Next has priority. To set finish, first use setNextEnabled( w, false ) which also disables Finish in the context menu.
This should not need to be called generally because the last appropriate page in the sequence will automatically have a finish button displayed.
If enabled is true, the Next button on page w is enabled, otherwise it is disabled. This can be used to disable moving forward in a QWizard until the page has been validly completed.
If enabled is true, the Prev button on page w is enabled, otherwise it is disabled. On the first appropriate page in the sequence Prev is always disabled and a cancel button is displayed instead.
Display the page with index page. Emits aboutToShowPage( page ) signal.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |