You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
290 lines
13 KiB
290 lines
13 KiB
'\" t
|
|
.TH TQWizard 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
|
|
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
|
|
.\" license file included in the distribution for a complete license
|
|
.\" statement.
|
|
.\"
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
TQWizard \- Framework for wizard dialogs
|
|
.SH SYNOPSIS
|
|
\fC#include <tqwizard.h>\fR
|
|
.PP
|
|
Inherits TQDialog.
|
|
.PP
|
|
.SS "Public Members"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "\fBTQWizard\fR ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )"
|
|
.br
|
|
.ti -1c
|
|
.BI "\fB~TQWizard\fR ()"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBaddPage\fR ( TQWidget * page, const TQString & title )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBinsertPage\fR ( TQWidget * page, const TQString & title, int index )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBremovePage\fR ( TQWidget * page )"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQString \fBtitle\fR ( TQWidget * page ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "void \fBsetTitle\fR ( TQWidget * page, const TQString & title )"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQFont \fBtitleFont\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "void \fBsetTitleFont\fR ( const TQFont & )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBshowPage\fR ( TQWidget * page )"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQWidget * \fBcurrentPage\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQWidget * \fBpage\fR ( int index ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBpageCount\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBindexOf\fR ( TQWidget * page ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual bool \fBappropriate\fR ( TQWidget * page ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetAppropriate\fR ( TQWidget * page, bool appropriate )"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQPushButton * \fBbackButton\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQPushButton * \fBnextButton\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQPushButton * \fBfinishButton\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQPushButton * \fBcancelButton\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQPushButton * \fBhelpButton\fR () const"
|
|
.br
|
|
.in -1c
|
|
.SS "Public Slots"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "virtual void \fBsetBackEnabled\fR ( TQWidget * page, bool enable )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetNextEnabled\fR ( TQWidget * page, bool enable )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetFinishEnabled\fR ( TQWidget * page, bool enable )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetHelpEnabled\fR ( TQWidget * page, bool enable )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void setFinish ( TQWidget *, bool ) \fI(obsolete)\fR"
|
|
.br
|
|
.in -1c
|
|
.SS "Signals"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "void \fBhelpClicked\fR ()"
|
|
.br
|
|
.ti -1c
|
|
.BI "void \fBselected\fR ( const TQString & )"
|
|
.br
|
|
.in -1c
|
|
.SS "Properties"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "TQFont \fBtitleFont\fR - the font used for page titles"
|
|
.br
|
|
.in -1c
|
|
.SS "Protected Members"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "virtual void \fBlayOutButtonRow\fR ( TQHBoxLayout * layout )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBlayOutTitleRow\fR ( TQHBoxLayout * layout, const TQString & title )"
|
|
.br
|
|
.in -1c
|
|
.SS "Protected Slots"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "virtual void \fBback\fR ()"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBnext\fR ()"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBhelp\fR ()"
|
|
.br
|
|
.in -1c
|
|
.SH DESCRIPTION
|
|
The TQWizard 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
|
|
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().
|
|
.PP
|
|
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.
|
|
.PP
|
|
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
|
|
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.
|
|
.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 TQWizard page \fR</p> </blockquote>
|
|
.PP
|
|
See also Abstract Widget Classes, Dialog Classes, and Organizers.
|
|
.SH MEMBER FUNCTION DOCUMENTATION
|
|
.SH "TQWizard::TQWizard ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )"
|
|
Constructs an empty wizard dialog. The \fIparent\fR, \fIname\fR, \fImodal\fR and \fIf\fR arguments are passed to the TQDialog constructor.
|
|
.SH "TQWizard::~TQWizard ()"
|
|
Destroys the object and frees any allocated resources, including all pages and controllers.
|
|
.SH "void TQWizard::addPage ( TQWidget * page, const TQString & title )\fC [virtual]\fR"
|
|
Adds \fIpage\fR to the end of the page sequence, with the title, \fItitle\fR.
|
|
.SH "bool TQWizard::appropriate ( TQWidget * page ) const\fC [virtual]\fR"
|
|
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.
|
|
.PP
|
|
\fBWarning:\fR The last page of the wizard will be displayed if no page is relevant in the current context.
|
|
.SH "void TQWizard::back ()\fC [virtual protected slot]\fR"
|
|
Called when the user clicks the Back button; this function shows the preceding relevant page in the sequence.
|
|
.PP
|
|
See also appropriate().
|
|
.SH "TQPushButton * TQWizard::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 TQWizard subclass. Use setBackEnabled() to enable/disable this button.
|
|
.SH "TQPushButton * TQWizard::cancelButton () const"
|
|
Returns a pointer to the dialog's Cancel button
|
|
.PP
|
|
By default, this button is connected to the TQDialog::reject() slot, which is virtual so you can reimplement it in a TQWizard subclass.
|
|
.SH "TQWidget * TQWizard::currentPage () const"
|
|
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.
|
|
.SH "TQPushButton * TQWizard::finishButton () const"
|
|
Returns a pointer to the dialog's Finish button
|
|
.PP
|
|
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.
|
|
.SH "void TQWizard::help ()\fC [virtual protected slot]\fR"
|
|
Called when the user clicks the Help button, this function emits the helpClicked() signal.
|
|
.SH "TQPushButton * TQWizard::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 TQWizard subclass. Use setHelpEnabled() to enable/disable this button.
|
|
.SH "void TQWizard::helpClicked ()\fC [signal]\fR"
|
|
This signal is emitted when the user clicks on the Help button.
|
|
.SH "int TQWizard::indexOf ( TQWidget * page ) const"
|
|
Returns the position of page \fIpage\fR. If the page is not part of the wizard -1 is returned.
|
|
.SH "void TQWizard::insertPage ( TQWidget * page, const TQString & title, int index )\fC [virtual]\fR"
|
|
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.
|
|
.SH "void TQWizard::layOutButtonRow ( TQHBoxLayout * layout )\fC [virtual protected]\fR"
|
|
This virtual function is responsible for adding the buttons below the bottom divider.
|
|
.PP
|
|
\fIlayout\fR is the horizontal layout of the entire wizard.
|
|
.SH "void TQWizard::layOutTitleRow ( TQHBoxLayout * layout, const TQString & title )\fC [virtual protected]\fR"
|
|
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.
|
|
.SH "void TQWizard::next ()\fC [virtual protected slot]\fR"
|
|
Called when the user clicks the Next button, this function shows the next relevant page in the sequence.
|
|
.PP
|
|
See also appropriate().
|
|
.SH "TQPushButton * TQWizard::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 TQWizard subclass. Use setNextEnabled() to enable/disable this button.
|
|
.SH "TQWidget * TQWizard::page ( int index ) const"
|
|
Returns a pointer to the page at position \fIindex\fR in the sequence, or 0 if \fIindex\fR is out of range. The first page has index 0.
|
|
.SH "int TQWizard::pageCount () const"
|
|
Returns the number of pages in the wizard.
|
|
.SH "void TQWizard::removePage ( TQWidget * page )\fC [virtual]\fR"
|
|
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.
|
|
.SH "void TQWizard::selected ( const TQString & )\fC [signal]\fR"
|
|
This signal is emitted when the current page changes. The parameter contains the title of the selected page.
|
|
.SH "void TQWizard::setAppropriate ( TQWidget * page, bool appropriate )\fC [virtual]\fR"
|
|
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.
|
|
.PP
|
|
See also appropriate().
|
|
.SH "void TQWizard::setBackEnabled ( TQWidget * page, bool enable )\fC [virtual slot]\fR"
|
|
If \fIenable\fR is TRUE, page \fIpage\fR has a Back button; otherwise \fIpage\fR has no Back button. By default all pages have this button.
|
|
.SH "void TQWizard::setFinish ( TQWidget *, bool )\fC [virtual slot]\fR"
|
|
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
|
|
.PP
|
|
Use setFinishEnabled instead
|
|
.SH "void TQWizard::setFinishEnabled ( TQWidget * page, bool enable )\fC [virtual slot]\fR"
|
|
If \fIenable\fR is TRUE, page \fIpage\fR has a Finish button; otherwise \fIpage\fR has no Finish button. By default \fIno\fR page has this button.
|
|
.SH "void TQWizard::setHelpEnabled ( TQWidget * page, bool enable )\fC [virtual slot]\fR"
|
|
If \fIenable\fR is TRUE, page \fIpage\fR has a Help button; otherwise \fIpage\fR has no Help button. By default all pages have this button.
|
|
.SH "void TQWizard::setNextEnabled ( TQWidget * page, bool enable )\fC [virtual slot]\fR"
|
|
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.
|
|
.SH "void TQWizard::setTitle ( TQWidget * page, const TQString & title )"
|
|
Sets the title for page \fIpage\fR to \fItitle\fR.
|
|
.SH "void TQWizard::setTitleFont ( const TQFont & )"
|
|
Sets the font used for page titles. See the "titleFont" property for details.
|
|
.SH "void TQWizard::showPage ( TQWidget * page )\fC [virtual]\fR"
|
|
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 TQWizard is shown. By reimplementing it (and calling TQWizard::showPage()), you can prepare each page prior to it being shown.
|
|
.PP
|
|
Examples:
|
|
.)l distributor/distributor.ui.h and wizard/wizard.cpp.
|
|
.SH "TQString TQWizard::title ( TQWidget * page ) const"
|
|
Returns the title of page \fIpage\fR.
|
|
.SH "TQFont TQWizard::titleFont () const"
|
|
Returns the font used for page titles. See the "titleFont" property for details.
|
|
.SS "Property Documentation"
|
|
.SH "TQFont titleFont"
|
|
This property holds the font used for page titles.
|
|
.PP
|
|
The default is TQApplication::font().
|
|
.PP
|
|
Set this property's value with setTitleFont() and get this property's value with titleFont().
|
|
|
|
.SH "SEE ALSO"
|
|
.BR http://doc.trolltech.com/tqwizard.html
|
|
.BR http://www.trolltech.com/faq/tech.html
|
|
.SH COPYRIGHT
|
|
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
|
|
license file included in the distribution for a complete license
|
|
statement.
|
|
.SH AUTHOR
|
|
Generated automatically from the source code.
|
|
.SH BUGS
|
|
If you find a bug in Qt, please report it as described in
|
|
.BR http://doc.trolltech.com/bughowto.html .
|
|
Good bug reports help us to help you. Thank you.
|
|
.P
|
|
The definitive TQt documentation is provided in HTML format; it is
|
|
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
|
|
a web browser. This man page is provided as a convenience for those
|
|
users who prefer man pages, although this format is not officially
|
|
supported by Trolltech.
|
|
.P
|
|
If you find errors in this manual page, please report them to
|
|
.BR qt-bugs@trolltech.com .
|
|
Please include the name of the manual page (tqwizard.3qt) and the Qt
|
|
version (3.3.8).
|