Qt logo

QWizard Class Reference


The QWizard class provides a framework for easily writing wizards. More...

#include <qwizard.h>

Inherits QDialog.

List of all member functions.

Public Members

Public Slots

Signals

Protected Members

Protected Slots


Detailed Description

The QWizard class provides a framework for easily writing wizards.

A wizard is a dialog that consists of a sequential number of steps, each consisting of a single page. QWizard provides a title for each page, and "Next", "Back", "Finish", "Cancel" and "Help" buttons, as appropriate.


Member Function Documentation

QWizard::QWizard ( QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 )

Constructs an empty wizard dialog.

QWizard::~QWizard ()

Destroys the object and frees any allocated resources, including, of course, all pages and controllers.

void QWizard::addPage ( QWidget * page, const QString & title ) [virtual]

Adds page to the end of the wizard, titled title.

bool QWizard::appropriate ( QWidget * w ) const [virtual]

This virtual function returns TRUE if w is appropriate for display in the current context of the wizard, and FALSE if QWizard should go on.

It is called when the Next button is clicked.

Warning: The last page of a wizard will be displayed if nothing else wants to, and the Next button was enabled when the user clicked.

The default implementation returns whatever was set using setAppropriate(). The ultimate default is TRUE.

void QWizard::back () [virtual protected slot]

Called when the user clicks the Back button, this function shows the page which the user saw prior to the current one.

QPushButton * QWizard::backButton () const

Returns the Back button of the dialog.

By default, this button is connected to the back() slot, which is virtual.

QPushButton * QWizard::cancelButton () const

Returns the Cancel button of the dialog.

By default, this button is connected to the QDialog::reject() slot, which is virtual so you may override it in a QWizard subclass.

QWidget * QWizard::currentPage () const

Returns a pointer to the page currently being displayed by the wizard. The wizard does its best to make sure that this value is never 0, but if you try hard enough it can be.

bool QWizard::eventFilter ( QObject * o, QEvent * e ) [virtual]

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QObject.

QPushButton * QWizard::finishButton () const

Returns the Finish button of the dialog.

By default, this button is connected to the QDialog::accept() slot, which is virtual so you may override it in a QWizard subclass.

void QWizard::help () [virtual protected slot]

This slot either makes the wizard help you, if it can. The only way it knows is to emit the helpClicked() signal, and perhaps the QWizardPage::helpClicked() signal too, if a QWizardPage is currently being displayed.

QPushButton * QWizard::helpButton () const

Returns the Help button of the dialog.

By default, this button is connected to the help() slot.

void QWizard::helpClicked () [signal]

This signal is emitted when the user clicks on the help button.

void QWizard::layOutButtonRow ( QHBoxLayout * layout ) [virtual protected]

This virtual function is responsible for adding the bottom divider and buttons below it.

layout is the vertical layout of the entire wizard.

void QWizard::layOutTitleRow ( QHBoxLayout * layout, const QString & title ) [virtual protected]

This virtual function is responsible for laying out the title row and adding the vertical divider between the title and the wizard page. layout is the vertical layout for the wizard, title is the title for this page, and this function is called every time title changes.

void QWizard::next () [virtual protected slot]

Called when the user clicks the Next button, this function shows the next appropriate page.

QPushButton * QWizard::nextButton () const

Returns the Next button of the dialog.

By default, this button is connected to the next() slot, which is virtual.

void QWizard::removePage ( QWidget * page ) [virtual]

Removes page from this wizard. Does not delete page. If page is currently being displayed, QWizard will display something else.

void QWizard::setFont ( const QFont & font ) [virtual]

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QWidget.

void QWizard::show () [virtual]

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QWidget.

void QWizard::showPage ( QWidget * page ) [virtual]

Makes page be the displayed page.

QString QWizard::title ( QWidget * page ) const

Returns the title of page.


Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):


This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.


Copyright © 1999 Troll TechTrademarks
Qt version 2.0.2