Q3Wizard Class Reference |
Q3Wizard ( QWidget * parent = 0, const char * name = 0, bool modal = false, Qt::WindowFlags f = 0 ) | |
~Q3Wizard () | |
virtual void | addPage ( QWidget * page, const QString & title ) |
virtual bool | appropriate ( QWidget * page ) const |
QPushButton * | backButton () const |
QPushButton * | cancelButton () const |
QWidget * | currentPage () const |
QPushButton * | finishButton () const |
QPushButton * | helpButton () const |
int | indexOf ( QWidget * page ) const |
virtual void | insertPage ( QWidget * page, const QString & title, int index ) |
QPushButton * | nextButton () const |
QWidget * | page ( int index ) const |
int | pageCount () const |
virtual void | removePage ( QWidget * page ) |
virtual void | setAppropriate ( QWidget * page, bool appropriate ) |
void | setTitle ( QWidget * page, const QString & title ) |
void | setTitleFont ( const QFont & ) |
virtual void | showPage ( QWidget * page ) |
QString | title ( QWidget * page ) const |
QFont | titleFont () const |
virtual bool | eventFilter ( QObject * o, QEvent * e ) |
virtual void | setBackEnabled ( QWidget * page, bool enable ) |
virtual void | setFinishEnabled ( QWidget * page, bool enable ) |
virtual void | setHelpEnabled ( QWidget * page, bool enable ) |
virtual void | setNextEnabled ( QWidget * page, bool enable ) |
void | helpClicked () |
void | selected ( const QString & title ) |
virtual void | layOutButtonRow ( QHBoxLayout * layout ) |
virtual void | layOutTitleRow ( QHBoxLayout * layout, const QString & title ) |
virtual void | back () |
virtual void | help () |
virtual void | next () |
The Q3Wizard class provides a framework for wizard dialogs.
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.
Q3Wizard 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 QWidget 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.
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.
Q3Wizard 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.
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.
This property holds the font used for page titles.
The default is QApplication::font().
Access functions:
QFont | titleFont () const |
void | setTitleFont ( const QFont & ) |
Constructs an empty wizard dialog. The parent, name, modal and f arguments are passed to the QDialog constructor.
Destroys the object and frees any allocated resources, including all pages and controllers.
Adds page to the end of the page sequence, with the title, title.
Called when the Next button is clicked; this virtual function returns true if page is relevant for display in the current context; otherwise it is ignored by Q3Wizard and returns false. The default implementation returns the value set using setAppropriate(). The ultimate default is true.
Warning: The last page of the wizard will be displayed if no page is relevant in the current context.
See also setAppropriate().
Called when the user clicks the Back button; this function shows the preceding relevant page in the sequence.
See also appropriate().
Returns a pointer to the dialog's Back button
By default, this button is connected to the back() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setBackEnabled() to enable/disable this button.
Returns a pointer to the dialog's Cancel button
By default, this button is connected to the QDialog::reject() slot, which is virtual so you can reimplement it in a Q3Wizard subclass.
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.
Reimplemented from QObject::eventFilter().
Returns a pointer to the dialog's Finish button
By default, this button is connected to the QDialog::accept() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setFinishEnabled() to enable/disable this button.
Called when the user clicks the Help button, this function emits the helpClicked() signal.
Returns a pointer to the dialog's Help button
By default, this button is connected to the help() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setHelpEnabled() to enable/disable this button.
This signal is emitted when the user clicks on the Help button.
Returns the position of page page. If the page is not part of the wizard -1 is returned.
Inserts page at position index into the page sequence, with title title. If index is -1, the page will be appended to the end of the wizard's page sequence.
This virtual function is responsible for adding the buttons below the bottom divider.
layout is the horizontal layout of the entire wizard.
This virtual function is responsible for laying out the title row.
layout is the horizontal layout for the wizard, and title is the title for this page. This function is called every time title changes.
Called when the user clicks the Next button, this function shows the next relevant page in the sequence.
See also appropriate().
Returns a pointer to the dialog's Next button
By default, this button is connected to the next() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setNextEnabled() to enable/disable this button.
Returns a pointer to the page at position index in the sequence, or 0 if index is out of range. The first page has index 0.
Returns the number of pages in the wizard.
Removes page from the page sequence but does not delete the page. If page is currently being displayed, Q3Wizard will display the page that precedes it, or the first page if this was the first page.
This signal is emitted when the current page changes. The title parameter contains the title of the selected page.
If appropriate is true then page page is considered relevant in the current context and should be displayed in the page sequence; otherwise page should not be displayed in the page sequence.
See also appropriate().
If enable is true, page page has a Back button; otherwise page has no Back button. By default all pages have this button.
If enable is true, page page has a Finish button; otherwise page has no Finish button. By default no page has this button.
If enable is true, page page has a Help button; otherwise page has no Help button. By default all pages have this button.
If enable is true, page page has a Next button; otherwise the Next button on page is disabled. By default all pages have this button.
Sets the title for page page to title.
See also title().
Makes page the current page and emits the selected() signal.
This virtual function is called whenever a different page is to be shown, including the first time the Q3Wizard is shown. By reimplementing it (and calling Q3Wizard::showPage()), you can prepare each page prior to it being shown.
Returns the title of page page.
See also setTitle().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com