diff options
Diffstat (limited to 'doc/html/tqwizard.html')
-rw-r--r-- | doc/html/tqwizard.html | 337 |
1 files changed, 337 insertions, 0 deletions
diff --git a/doc/html/tqwizard.html b/doc/html/tqwizard.html new file mode 100644 index 000000000..c74d62536 --- /dev/null +++ b/doc/html/tqwizard.html @@ -0,0 +1,337 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/dialogs/tqwizard.cpp:55 --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>TQWizard Class</title> +<style type="text/css"><!-- +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 Classes</font></a> + | <a href="mainclasses.html"> +<font color="#004faf">Main Classes</font></a> + | <a href="annotated.html"> +<font color="#004faf">Annotated</font></a> + | <a href="groups.html"> +<font color="#004faf">Grouped 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>TQWizard Class Reference</h1> + +<p>The TQWizard class provides a framework for wizard dialogs. +<a href="#details">More...</a> +<p><tt>#include <<a href="tqwizard-h.html">tqwizard.h</a>></tt> +<p>Inherits <a href="tqdialog.html">TQDialog</a>. +<p><a href="tqwizard-members.html">List of all member functions.</a> +<h2>Public Members</h2> +<ul> +<li class=fn><a href="#TQWizard"><b>TQWizard</b></a> ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )</li> +<li class=fn><a href="#~TQWizard"><b>~TQWizard</b></a> ()</li> +<li class=fn>virtual void <a href="#addPage"><b>addPage</b></a> ( TQWidget * page, const TQString & title )</li> +<li class=fn>virtual void <a href="#insertPage"><b>insertPage</b></a> ( TQWidget * page, const TQString & title, int index )</li> +<li class=fn>virtual void <a href="#removePage"><b>removePage</b></a> ( TQWidget * page )</li> +<li class=fn>TQString <a href="#title"><b>title</b></a> ( TQWidget * page ) const</li> +<li class=fn>void <a href="#setTitle"><b>setTitle</b></a> ( TQWidget * page, const TQString & title )</li> +<li class=fn>TQFont <a href="#titleFont"><b>titleFont</b></a> () const</li> +<li class=fn>void <a href="#setTitleFont"><b>setTitleFont</b></a> ( const TQFont & )</li> +<li class=fn>virtual void <a href="#showPage"><b>showPage</b></a> ( TQWidget * page )</li> +<li class=fn>TQWidget * <a href="#currentPage"><b>currentPage</b></a> () const</li> +<li class=fn>TQWidget * <a href="#page"><b>page</b></a> ( int index ) const</li> +<li class=fn>int <a href="#pageCount"><b>pageCount</b></a> () const</li> +<li class=fn>int <a href="#indexOf"><b>indexOf</b></a> ( TQWidget * page ) const</li> +<li class=fn>virtual bool <a href="#appropriate"><b>appropriate</b></a> ( TQWidget * page ) const</li> +<li class=fn>virtual void <a href="#setAppropriate"><b>setAppropriate</b></a> ( TQWidget * page, bool appropriate )</li> +<li class=fn>TQPushButton * <a href="#backButton"><b>backButton</b></a> () const</li> +<li class=fn>TQPushButton * <a href="#nextButton"><b>nextButton</b></a> () const</li> +<li class=fn>TQPushButton * <a href="#finishButton"><b>finishButton</b></a> () const</li> +<li class=fn>TQPushButton * <a href="#cancelButton"><b>cancelButton</b></a> () const</li> +<li class=fn>TQPushButton * <a href="#helpButton"><b>helpButton</b></a> () const</li> +</ul> +<h2>Public Slots</h2> +<ul> +<li class=fn>virtual void <a href="#setBackEnabled"><b>setBackEnabled</b></a> ( TQWidget * page, bool enable )</li> +<li class=fn>virtual void <a href="#setNextEnabled"><b>setNextEnabled</b></a> ( TQWidget * page, bool enable )</li> +<li class=fn>virtual void <a href="#setFinishEnabled"><b>setFinishEnabled</b></a> ( TQWidget * page, bool enable )</li> +<li class=fn>virtual void <a href="#setHelpEnabled"><b>setHelpEnabled</b></a> ( TQWidget * page, bool enable )</li> +<li class=fn>virtual void setFinish ( TQWidget *, bool ) <em>(obsolete)</em></li> +</ul> +<h2>Signals</h2> +<ul> +<li class=fn>void <a href="#helpClicked"><b>helpClicked</b></a> ()</li> +<li class=fn>void <a href="#selected"><b>selected</b></a> ( const TQString & )</li> +</ul> +<h2>Properties</h2> +<ul> +<li class=fn>TQFont <a href="#titleFont-prop"><b>titleFont</b></a> - the font used for page titles</li> +</ul> +<h2>Protected Members</h2> +<ul> +<li class=fn>virtual void <a href="#layOutButtonRow"><b>layOutButtonRow</b></a> ( TQHBoxLayout * layout )</li> +<li class=fn>virtual void <a href="#layOutTitleRow"><b>layOutTitleRow</b></a> ( TQHBoxLayout * layout, const TQString & title )</li> +</ul> +<h2>Protected Slots</h2> +<ul> +<li class=fn>virtual void <a href="#back"><b>back</b></a> ()</li> +<li class=fn>virtual void <a href="#next"><b>next</b></a> ()</li> +<li class=fn>virtual void <a href="#help"><b>help</b></a> ()</li> +</ul> +<hr><a name="details"></a><h2>Detailed Description</h2> + + +The TQWizard class provides a framework for wizard dialogs. +<p> + + + +<p> 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. +<p> 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 <a href="#setBackEnabled">setBackEnabled</a>(), <a href="#setNextEnabled">setNextEnabled</a>(), +<a href="#setFinishEnabled">setFinishEnabled</a>() and <a href="#setHelpEnabled">setHelpEnabled</a>(). +<p> Create and populate dialog pages that inherit from <a href="tqwidget.html">TQWidget</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> TQWizard 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="tqwizard.png" alt="A TQWizard page"></center> <blockquote><p align="center"><em> A TQWizard 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="TQWizard"></a>TQWizard::TQWizard ( <a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0, bool modal = FALSE, WFlags 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="tqdialog.html">TQDialog</a> constructor. + +<h3 class=fn><a name="~TQWizard"></a>TQWizard::~TQWizard () +</h3> +Destroys the object and frees any allocated resources, including +all pages and controllers. + +<h3 class=fn>void <a name="addPage"></a>TQWizard::addPage ( <a href="tqwidget.html">TQWidget</a> * page, const <a href="tqstring.html">TQString</a> & 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>TQWizard::appropriate ( <a href="tqwidget.html">TQWidget</a> * 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 TQWizard 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>TQWizard::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="tqpushbutton.html">TQPushButton</a> * <a name="backButton"></a>TQWizard::backButton () const +</h3> +Returns a pointer to the dialog's Back button +<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 TQWizard subclass. Use +<a href="#setBackEnabled">setBackEnabled</a>() to enable/disable this button. + +<h3 class=fn><a href="tqpushbutton.html">TQPushButton</a> * <a name="cancelButton"></a>TQWizard::cancelButton () const +</h3> +Returns a pointer to the dialog's Cancel button +<p> By default, this button is connected to the <a href="tqdialog.html#reject">TQDialog::reject</a>() +slot, which is virtual so you can reimplement it in a TQWizard +subclass. + +<h3 class=fn><a href="tqwidget.html">TQWidget</a> * <a name="currentPage"></a>TQWizard::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="tqpushbutton.html">TQPushButton</a> * <a name="finishButton"></a>TQWizard::finishButton () const +</h3> +Returns a pointer to the dialog's Finish button +<p> By default, this button is connected to the <a href="tqdialog.html#accept">TQDialog::accept</a>() +slot, which is virtual so you can reimplement it in a TQWizard +subclass. Use <a href="#setFinishEnabled">setFinishEnabled</a>() to enable/disable this button. + +<h3 class=fn>void <a name="help"></a>TQWizard::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="tqpushbutton.html">TQPushButton</a> * <a name="helpButton"></a>TQWizard::helpButton () const +</h3> +Returns a pointer to the dialog's Help button +<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 TQWizard subclass. Use +<a href="#setHelpEnabled">setHelpEnabled</a>() to enable/disable this button. + +<h3 class=fn>void <a name="helpClicked"></a>TQWizard::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>TQWizard::indexOf ( <a href="tqwidget.html">TQWidget</a> * page ) const +</h3> +Returns the position 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>TQWizard::insertPage ( <a href="tqwidget.html">TQWidget</a> * page, const <a href="tqstring.html">TQString</a> & title, int index )<tt> [virtual]</tt> +</h3> +Inserts <em>page</em> at position <em>index</em> into the page sequence, with +title <em>title</em>. If <em>index</em> is -1, the page will be appended to +the end of the wizard's page sequence. + +<h3 class=fn>void <a name="layOutButtonRow"></a>TQWizard::layOutButtonRow ( <a href="qhboxlayout.html">TQHBoxLayout</a> * layout )<tt> [virtual protected]</tt> +</h3> +This virtual function is responsible for adding the buttons below +the bottom divider. +<p> <em>layout</em> is the horizontal layout of the entire wizard. + +<h3 class=fn>void <a name="layOutTitleRow"></a>TQWizard::layOutTitleRow ( <a href="qhboxlayout.html">TQHBoxLayout</a> * layout, const <a href="tqstring.html">TQString</a> & title )<tt> [virtual protected]</tt> +</h3> +This virtual function is responsible for laying out the title row. +<p> <em>layout</em> is the horizontal 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>TQWizard::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="tqpushbutton.html">TQPushButton</a> * <a name="nextButton"></a>TQWizard::nextButton () const +</h3> +Returns a pointer to the dialog's Next button +<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 TQWizard subclass. Use +<a href="#setNextEnabled">setNextEnabled</a>() to enable/disable this button. + +<h3 class=fn><a href="tqwidget.html">TQWidget</a> * <a name="page"></a>TQWizard::page ( int 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>TQWizard::pageCount () const +</h3> +Returns the number of pages in the wizard. + +<h3 class=fn>void <a name="removePage"></a>TQWizard::removePage ( <a href="tqwidget.html">TQWidget</a> * 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, TQWizard will +display the page that precedes it, or the first page if this was +the first page. + +<h3 class=fn>void <a name="selected"></a>TQWizard::selected ( const <a href="tqstring.html">TQString</a> & )<tt> [signal]</tt> +</h3> + +<p> This signal is emitted when the current page changes. The +parameter contains the title of the selected page. + +<h3 class=fn>void <a name="setAppropriate"></a>TQWizard::setAppropriate ( <a href="tqwidget.html">TQWidget</a> * page, bool 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>TQWizard::setBackEnabled ( <a href="tqwidget.html">TQWidget</a> * page, bool 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>TQWizard::setFinish ( <a href="tqwidget.html">TQWidget</a> *, 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>TQWizard::setFinishEnabled ( <a href="tqwidget.html">TQWidget</a> * page, bool 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> page has this +button. + +<h3 class=fn>void <a name="setHelpEnabled"></a>TQWizard::setHelpEnabled ( <a href="tqwidget.html">TQWidget</a> * page, bool 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>TQWizard::setNextEnabled ( <a href="tqwidget.html">TQWidget</a> * page, bool 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>TQWizard::setTitle ( <a href="tqwidget.html">TQWidget</a> * page, const <a href="tqstring.html">TQString</a> & title ) +</h3> +Sets the title for page <em>page</em> to <em>title</em>. + +<h3 class=fn>void <a name="setTitleFont"></a>TQWizard::setTitleFont ( const <a href="tqfont.html">TQFont</a> & ) +</h3><p>Sets the font used for page titles. +See the <a href="tqwizard.html#titleFont-prop">"titleFont"</a> property for details. +<h3 class=fn>void <a name="showPage"></a>TQWizard::showPage ( <a href="tqwidget.html">TQWidget</a> * page )<tt> [virtual]</tt> +</h3> +Makes <em>page</em> the current page and emits the <a href="#selected">selected</a>() signal. +<p> 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 <a href="#showPage">TQWizard::showPage</a>()), +you can prepare each page prior to it being shown. + +<p>Examples: <a href="distributor-example.html#x2673">distributor/distributor.ui.h</a> and <a href="wizard-example.html#x15">wizard/wizard.cpp</a>. +<h3 class=fn><a href="tqstring.html">TQString</a> <a name="title"></a>TQWizard::title ( <a href="tqwidget.html">TQWidget</a> * page ) const +</h3> +Returns the title of page <em>page</em>. + +<h3 class=fn><a href="tqfont.html">TQFont</a> <a name="titleFont"></a>TQWizard::titleFont () const +</h3><p>Returns the font used for page titles. +See the <a href="tqwizard.html#titleFont-prop">"titleFont"</a> property for details. +<hr><h2>Property Documentation</h2> +<h3 class=fn><a href="tqfont.html">TQFont</a> <a name="titleFont-prop"></a>titleFont</h3> +<p>This property holds the font used for page titles. +<p>The default is <a href="ntqapplication.html#font">TQApplication::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">TQt toolkit</a>. +Copyright © 1995-2007 +<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 © 2007 +<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> +<td align=right><div align=right>TQt 3.3.8</div> +</table></div></address></body> +</html> |