Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 2067

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/dialogs/qwizard.cpp:55 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QWizard Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWizard Class Reference</h1>

<p>The QWizard class provides a framework for wizard dialogs.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qwizard-h.html">qwizard.h</a>&gt;</tt>
<p>Inherits <a href="qdialog.html">QDialog</a>.
<p><a href="qwizard-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QWizard"><b>QWizard</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )</div></li>
<li><div class=fn><a href="#~QWizard"><b>~QWizard</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#addPage"><b>addPage</b></a> ( QWidget&nbsp;*&nbsp;page, const&nbsp;QString&nbsp;&amp;&nbsp;title )</div></li>
<li><div class=fn>virtual void <a href="#insertPage"><b>insertPage</b></a> ( QWidget&nbsp;*&nbsp;page, const&nbsp;QString&nbsp;&amp;&nbsp;title, int&nbsp;index )</div></li>
<li><div class=fn>virtual void <a href="#removePage"><b>removePage</b></a> ( QWidget&nbsp;*&nbsp;page )</div></li>
<li><div class=fn>QString <a href="#title"><b>title</b></a> ( QWidget&nbsp;*&nbsp;page ) const</div></li>
<li><div class=fn>void <a href="#setTitle"><b>setTitle</b></a> ( QWidget&nbsp;*&nbsp;page, const&nbsp;QString&nbsp;&amp;&nbsp;title )</div></li>
<li><div class=fn>QFont <a href="#titleFont"><b>titleFont</b></a> () const</div></li>
<li><div class=fn>void <a href="#setTitleFont"><b>setTitleFont</b></a> ( const QFont &amp; )</div></li>
<li><div class=fn>virtual void <a href="#showPage"><b>showPage</b></a> ( QWidget&nbsp;*&nbsp;page )</div></li>
<li><div class=fn>QWidget * <a href="#currentPage"><b>currentPage</b></a> () const</div></li>
<li><div class=fn>QWidget * <a href="#page"><b>page</b></a> ( int&nbsp;index ) const</div></li>
<li><div class=fn>int <a href="#pageCount"><b>pageCount</b></a> () const</div></li>
<li><div class=fn>int <a href="#indexOf"><b>indexOf</b></a> ( QWidget&nbsp;*&nbsp;page ) const</div></li>
<li><div class=fn>virtual bool <a href="#appropriate"><b>appropriate</b></a> ( QWidget&nbsp;*&nbsp;page ) const</div></li>
<li><div class=fn>virtual void <a href="#setAppropriate"><b>setAppropriate</b></a> ( QWidget&nbsp;*&nbsp;page, bool&nbsp;appropriate )</div></li>
<li><div class=fn>QPushButton * <a href="#backButton"><b>backButton</b></a> () const</div></li>
<li><div class=fn>QPushButton * <a href="#nextButton"><b>nextButton</b></a> () const</div></li>
<li><div class=fn>QPushButton * <a href="#finishButton"><b>finishButton</b></a> () const</div></li>
<li><div class=fn>QPushButton * <a href="#cancelButton"><b>cancelButton</b></a> () const</div></li>
<li><div class=fn>QPushButton * <a href="#helpButton"><b>helpButton</b></a> () const</div></li>
</ul>
<h2>Public Slots</h2>
<ul>
<li><div class=fn>virtual void <a href="#setBackEnabled"><b>setBackEnabled</b></a> ( QWidget&nbsp;*&nbsp;page, bool&nbsp;enable )</div></li>
<li><div class=fn>virtual void <a href="#setNextEnabled"><b>setNextEnabled</b></a> ( QWidget&nbsp;*&nbsp;page, bool&nbsp;enable )</div></li>
<li><div class=fn>virtual void <a href="#setFinishEnabled"><b>setFinishEnabled</b></a> ( QWidget&nbsp;*&nbsp;page, bool&nbsp;enable )</div></li>
<li><div class=fn>virtual void <a href="#setHelpEnabled"><b>setHelpEnabled</b></a> ( QWidget&nbsp;*&nbsp;page, bool&nbsp;enable )</div></li>
<li><div class=fn>virtual void setFinish ( QWidget *, bool ) &nbsp;<em>(obsolete)</em></div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#helpClicked"><b>helpClicked</b></a> ()</div></li>
<li><div class=fn>void <a href="#selected"><b>selected</b></a> ( const QString &amp; )</div></li>
</ul>
<h2>Properties</h2>
<ul>
<li><div class=fn>QFont <a href="#titleFont-prop"><b>titleFont</b></a>&nbsp;- the font used for page titles</div></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class=fn>virtual void <a href="#layOutButtonRow"><b>layOutButtonRow</b></a> ( QHBoxLayout&nbsp;*&nbsp;layout )</div></li>
<li><div class=fn>virtual void <a href="#layOutTitleRow"><b>layOutTitleRow</b></a> ( QHBoxLayout&nbsp;*&nbsp;layout, const&nbsp;QString&nbsp;&amp;&nbsp;title )</div></li>
</ul>
<h2>Protected Slots</h2>
<ul>
<li><div class=fn>virtual void <a href="#back"><b>back</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#next"><b>next</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#help"><b>help</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
 
<p> 



<p> The QWizard class provides a framework for wizard dialogs.
<p> A wizard is a special type of input dialog that consists of a
sequence of dialog pages. A wizard's purpose is to assist a user by
automating a task by walking the user through the process step
by step. Wizards are useful for complex or infrequently occurring
tasks that people may find difficult to learn or do.
<p> QWizard provides page titles and displays Next, Back, Finish,
Cancel, and Help push buttons, as appropriate to the current
position in the page sequence.
<p> Create and populate dialog pages that inherit from <a href="qwidget.html">QWidget</a> and add
them to the wizard using <a href="#addPage">addPage</a>(). Use <a href="#insertPage">insertPage</a>() to add a dialog
page at a certain position in the page sequence. Use <a href="#removePage">removePage</a>() to
remove a page from the page sequence.
<p> Use <a href="#currentPage">currentPage</a>() to retrieve a pointer to the currently displayed
page. <a href="#page">page</a>() returns a pointer to the page at a certain position in
the page sequence.
<p> Use <a href="#pageCount">pageCount</a>() to retrieve the total number of pages in the page
sequence. <a href="#indexOf">indexOf</a>() will return the index of a page in the page
sequence.
<p> QWizard provides functionality to mark pages as appropriate (or not)
in the current context with <a href="#setAppropriate">setAppropriate</a>(). 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.
<p> 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.
<p> Example code is available here: <a href="wizard-wizard-cpp.html">wizard/wizard.cpp</a> <a href="wizard-wizard-h.html">wizard/wizard.h</a>
<p> <center><img src="qwizard.png" alt="A QWizard page"></center> <blockquote><p align="center"><em> A QWizard page
</em></p>
</blockquote><p> <p>See also <a href="abstractwidgets.html">Abstract Widget Classes</a>, <a href="dialogs.html">Dialog Classes</a> and <a href="organizers.html">Organizers</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QWizard"></a>QWizard::QWizard ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )
</h3>  Constructs an empty wizard dialog.
The <em>parent</em>, <em>name</em>, <em>modal</em> and <em>f</em> arguments are passed to
the <a href="qdialog.html">QDialog</a> constructor.
<p> 
<h3 class=fn><a name="~QWizard"></a>QWizard::~QWizard ()
</h3>
Destroys the object and frees any allocated resources, including
all pages and controllers.

<h3 class=fn>void <a name="addPage"></a>QWizard::addPage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title )<tt> [virtual]</tt>
</h3>  Adds <em>page</em> to the end of the page sequence, with the title, <em>title</em>.

<h3 class=fn>bool <a name="appropriate"></a>QWizard::appropriate ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page ) const<tt> [virtual]</tt>
</h3>
Called when the Next button is clicked; this virtual function
returns TRUE if <em>page</em> is relevant for display in the current
context; otherwise it is ignored by QWizard and returns FALSE. The
default implementation returns the value set using
<a href="#setAppropriate">setAppropriate</a>(). The ultimate default is TRUE.
<p> <b>Warning:</b> The last page of the wizard will be displayed if no page is relevant
in the current context.

<h3 class=fn>void <a name="back"></a>QWizard::back ()<tt> [virtual protected slot]</tt>
</h3>
Called when the user clicks the Back button; this function shows
the preceding relevant page in the sequence.
<p> <p>See also <a href="#appropriate">appropriate</a>().

<h3 class=fn><a href="qpushbutton.html">QPushButton</a>&nbsp;* <a name="backButton"></a>QWizard::backButton () const
</h3>
Returns a pointer to the Back button of the dialog.
<p> By default, this button is connected to the <a href="#back">back</a>() slot,
which is virtual so you can reimplement it in a QWizard subclass.

<h3 class=fn><a href="qpushbutton.html">QPushButton</a>&nbsp;* <a name="cancelButton"></a>QWizard::cancelButton () const
</h3>
Returns a pointer to the Cancel button of the dialog.
<p> By default, this button is connected to the <a href="qdialog.html#reject">QDialog::reject</a>() slot,
which is virtual so you can reimplement it in a QWizard subclass.

<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="currentPage"></a>QWizard::currentPage () const
</h3>  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.

<h3 class=fn><a href="qpushbutton.html">QPushButton</a>&nbsp;* <a name="finishButton"></a>QWizard::finishButton () const
</h3>
Returns a pointer to the Finish button of the dialog.
<p> By default, this button is connected to the <a href="qdialog.html#accept">QDialog::accept</a>() slot,
which is virtual so you can reimplement it in a QWizard subclass.

<h3 class=fn>void <a name="help"></a>QWizard::help ()<tt> [virtual protected slot]</tt>
</h3>  Called when the user clicks the Help button, this function emits the
<a href="#helpClicked">helpClicked</a>() signal.

<h3 class=fn><a href="qpushbutton.html">QPushButton</a>&nbsp;* <a name="helpButton"></a>QWizard::helpButton () const
</h3>
Returns a pointer to the Help button of the dialog.
<p> By default, this button is connected to the <a href="#help">help</a>() slot,
which is virtual so you can reimplement it in a QWizard subclass.

<h3 class=fn>void <a name="helpClicked"></a>QWizard::helpClicked ()<tt> [signal]</tt>
</h3>

<p> This signal is emitted when the user clicks on the Help button.

<h3 class=fn>int <a name="indexOf"></a>QWizard::indexOf ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page ) const
</h3>
Returns the sequence index of page <em>page</em>.
If the page is not part of the wizard -1 is returned.

<h3 class=fn>void <a name="insertPage"></a>QWizard::insertPage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title, int&nbsp;index )<tt> [virtual]</tt>
</h3>
Inserts <em>page</em> at index <em>index</em> into the page sequence, with
title <em>title</em>. If index is -1, the page will be appended to
the end of the wizard's page sequence.

<h3 class=fn>void <a name="layOutButtonRow"></a>QWizard::layOutButtonRow ( <a href="qhboxlayout.html">QHBoxLayout</a>&nbsp;*&nbsp;layout )<tt> [virtual protected]</tt>
</h3>  This virtual function is responsible for adding the bottom
divider and buttons below it.
<p> <em>layout</em> is the vertical layout of the entire wizard.

<h3 class=fn>void <a name="layOutTitleRow"></a>QWizard::layOutTitleRow ( <a href="qhboxlayout.html">QHBoxLayout</a>&nbsp;*&nbsp;layout, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title )<tt> [virtual protected]</tt>
</h3>
This virtual function is responsible for laying out the title row
and adding the vertical divider between the title and the wizard
page. <em>layout</em> is the vertical layout for the wizard, and <em>title</em> is the title for this page. This function is called every
time <em>title</em> changes.

<h3 class=fn>void <a name="next"></a>QWizard::next ()<tt> [virtual protected slot]</tt>
</h3>
Called when the user clicks the Next button, this function shows
the next relevant page in the sequence.
<p> <p>See also <a href="#appropriate">appropriate</a>().

<h3 class=fn><a href="qpushbutton.html">QPushButton</a>&nbsp;* <a name="nextButton"></a>QWizard::nextButton () const
</h3>
Returns a pointer to the Next button of the dialog.
<p> By default, this button is connected to the <a href="#next">next</a>() slot,
which is virtual so you can reimplement it in a QWizard subclass.

<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="page"></a>QWizard::page ( int&nbsp;index ) const
</h3>
Returns a pointer to the page at position <em>index</em> in the sequence,
or 0 if <em>index</em> is out of range. The first page has index 0.

<h3 class=fn>int <a name="pageCount"></a>QWizard::pageCount () const
</h3>  Returns the number of pages in the wizard. 
<h3 class=fn>void <a name="removePage"></a>QWizard::removePage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page )<tt> [virtual]</tt>
</h3>  Removes <em>page</em> from the page sequence but does not delete the page.
If <em>page</em> is currently being displayed, QWizard will display the page before
it in the wizard, or the first page if this was the first page.

<h3 class=fn>void <a name="selected"></a>QWizard::selected ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [signal]</tt>
</h3>

<p> This signal is emitted when the current page changes. The parameter
contains the title of the page.

<h3 class=fn>void <a name="setAppropriate"></a>QWizard::setAppropriate ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, bool&nbsp;appropriate )<tt> [virtual]</tt>
</h3>
If <em>appropriate</em> is TRUE then page <em>page</em> is considered relevant
in the current context and should be displayed in the page sequence;
otherwise <em>page</em> should not be displayed in the page sequence.
<p> <p>See also <a href="#appropriate">appropriate</a>().

<h3 class=fn>void <a name="setBackEnabled"></a>QWizard::setBackEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, bool&nbsp;enable )<tt> [virtual slot]</tt>
</h3>
If <em>enable</em> is TRUE, page <em>page</em> has a Back button; otherwise <em>page</em> has no Back button.
By default all pages have this button.

<h3 class=fn>void <a name="setFinish"></a>QWizard::setFinish ( <a href="qwidget.html">QWidget</a>&nbsp;*, bool )<tt> [virtual slot]</tt>
</h3>

<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Use setFinishEnabled instead

<h3 class=fn>void <a name="setFinishEnabled"></a>QWizard::setFinishEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, bool&nbsp;enable )<tt> [virtual slot]</tt>
</h3>
If <em>enable</em> is TRUE, page <em>page</em> has a Finish button; otherwise <em>page</em> has no Finish button.
By default <em>no</em> pages have this button.

<h3 class=fn>void <a name="setHelpEnabled"></a>QWizard::setHelpEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, bool&nbsp;enable )<tt> [virtual slot]</tt>
</h3>
If <em>enable</em> is TRUE, page <em>page</em> has a Help button; otherwise <em>page</em> has no Help button.
By default all pages have this button.

<h3 class=fn>void <a name="setNextEnabled"></a>QWizard::setNextEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, bool&nbsp;enable )<tt> [virtual slot]</tt>
</h3>
If <em>enable</em> is TRUE, page <em>page</em> has a Next button; otherwise
the Next button on <em>page</em> is disabled. By default all pages have
this button.

<h3 class=fn>void <a name="setTitle"></a>QWizard::setTitle ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title )
</h3>  Sets the title for page <em>page</em> to <em>title</em>.

<h3 class=fn>void <a name="setTitleFont"></a>QWizard::setTitleFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp; )
</h3><p>Sets the font used for page titles.
See the <a href="qwizard.html#titleFont-prop">"titleFont"</a> property for details.
<h3 class=fn>void <a name="showPage"></a>QWizard::showPage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page )<tt> [virtual]</tt>
</h3>  Makes <em>page</em> the current page and emits the <a href="#selected">selected</a>() signal. 
<p>Example: <a href="wizard-example.html#x153">wizard/wizard.cpp</a>.
<h3 class=fn><a href="qstring.html">QString</a> <a name="title"></a>QWizard::title ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;page ) const
</h3>  Returns the title of page <em>page</em>.

<h3 class=fn><a href="qfont.html">QFont</a> <a name="titleFont"></a>QWizard::titleFont () const
</h3><p>Returns the font used for page titles.
See the <a href="qwizard.html#titleFont-prop">"titleFont"</a> property for details.
<hr><h2>Property Documentation</h2>
<h3 class=fn><a href="qfont.html">QFont</a> <a name="titleFont-prop"></a>titleFont</h3>
<p>This property holds the font used for page titles.
<p>The default is <a href="qapplication.html#font">QApplication::font</a>().

<p>Set this property's value with <a href="#setTitleFont">setTitleFont</a>() and get this property's value with <a href="#titleFont">titleFont</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>