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.
tqt3/doc/html/ntqtabdialog.html

507 lines
32 KiB

<!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/qtabdialog.cpp:53 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQTabDialog 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&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>TQTabDialog Class Reference</h1>
<p>The TQTabDialog class provides a stack of tabbed widgets.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qtabdialog-h.html">ntqtabdialog.h</a>&gt;</tt>
<p>Inherits <a href="ntqdialog.html">TQDialog</a>.
<p><a href="qtabdialog-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#TQTabDialog"><b>TQTabDialog</b></a> ( TQWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )</li>
<li class=fn><a href="#~TQTabDialog"><b>~TQTabDialog</b></a> ()</li>
<li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const&nbsp;TQFont&nbsp;&amp;&nbsp;font )</li>
<li class=fn>void <a href="#addTab"><b>addTab</b></a> ( TQWidget&nbsp;*&nbsp;child, const&nbsp;TQString&nbsp;&amp;&nbsp;label )</li>
<li class=fn>void <a href="#addTab-2"><b>addTab</b></a> ( TQWidget&nbsp;*&nbsp;child, const&nbsp;TQIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;TQString&nbsp;&amp;&nbsp;label )</li>
<li class=fn>void <a href="#addTab-3"><b>addTab</b></a> ( TQWidget&nbsp;*&nbsp;child, TQTab&nbsp;*&nbsp;tab )</li>
<li class=fn>void <a href="#insertTab"><b>insertTab</b></a> ( TQWidget&nbsp;*&nbsp;child, const&nbsp;TQString&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )</li>
<li class=fn>void <a href="#insertTab-2"><b>insertTab</b></a> ( TQWidget&nbsp;*&nbsp;child, const&nbsp;TQIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;TQString&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )</li>
<li class=fn>void <a href="#insertTab-3"><b>insertTab</b></a> ( TQWidget&nbsp;*&nbsp;child, TQTab&nbsp;*&nbsp;tab, int&nbsp;index = -1 )</li>
<li class=fn>void <a href="#changeTab-2"><b>changeTab</b></a> ( TQWidget&nbsp;*&nbsp;w, const&nbsp;TQString&nbsp;&amp;&nbsp;label )</li>
<li class=fn>void <a href="#changeTab"><b>changeTab</b></a> ( TQWidget&nbsp;*&nbsp;w, const&nbsp;TQIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;TQString&nbsp;&amp;&nbsp;label )</li>
<li class=fn>bool <a href="#isTabEnabled"><b>isTabEnabled</b></a> ( TQWidget&nbsp;*&nbsp;w ) const</li>
<li class=fn>void <a href="#setTabEnabled"><b>setTabEnabled</b></a> ( TQWidget&nbsp;*&nbsp;w, bool&nbsp;enable )</li>
<li class=fn>bool isTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name ) const &nbsp;<em>(obsolete)</em></li>
<li class=fn>void setTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name, bool&nbsp;enable ) &nbsp;<em>(obsolete)</em></li>
<li class=fn>void <a href="#showPage"><b>showPage</b></a> ( TQWidget&nbsp;*&nbsp;w )</li>
<li class=fn>void <a href="#removePage"><b>removePage</b></a> ( TQWidget&nbsp;*&nbsp;w )</li>
<li class=fn>TQString <a href="#tabLabel"><b>tabLabel</b></a> ( TQWidget&nbsp;*&nbsp;w )</li>
<li class=fn>TQWidget * <a href="#currentPage"><b>currentPage</b></a> () const</li>
<li class=fn>void <a href="#setDefaultButton"><b>setDefaultButton</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
<li class=fn>void <a href="#setDefaultButton-2"><b>setDefaultButton</b></a> ()</li>
<li class=fn>bool <a href="#hasDefaultButton"><b>hasDefaultButton</b></a> () const</li>
<li class=fn>void <a href="#setHelpButton"><b>setHelpButton</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
<li class=fn>void <a href="#setHelpButton-2"><b>setHelpButton</b></a> ()</li>
<li class=fn>bool <a href="#hasHelpButton"><b>hasHelpButton</b></a> () const</li>
<li class=fn>void <a href="#setCancelButton"><b>setCancelButton</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
<li class=fn>void <a href="#setCancelButton-2"><b>setCancelButton</b></a> ()</li>
<li class=fn>bool <a href="#hasCancelButton"><b>hasCancelButton</b></a> () const</li>
<li class=fn>void <a href="#setApplyButton"><b>setApplyButton</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
<li class=fn>void <a href="#setApplyButton-2"><b>setApplyButton</b></a> ()</li>
<li class=fn>bool <a href="#hasApplyButton"><b>hasApplyButton</b></a> () const</li>
<li class=fn>void <a href="#setOkButton"><b>setOkButton</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
<li class=fn>void <a href="#setOkButton-2"><b>setOkButton</b></a> ()</li>
<li class=fn>bool <a href="#hasOkButton"><b>hasOkButton</b></a> () const</li>
</ul>
<h2>Signals</h2>
<ul>
<li class=fn>void <a href="#aboutToShow"><b>aboutToShow</b></a> ()</li>
<li class=fn>void <a href="#applyButtonPressed"><b>applyButtonPressed</b></a> ()</li>
<li class=fn>void <a href="#cancelButtonPressed"><b>cancelButtonPressed</b></a> ()</li>
<li class=fn>void <a href="#defaultButtonPressed"><b>defaultButtonPressed</b></a> ()</li>
<li class=fn>void <a href="#helpButtonPressed"><b>helpButtonPressed</b></a> ()</li>
<li class=fn>void <a href="#currentChanged"><b>currentChanged</b></a> ( TQWidget * )</li>
<li class=fn>void selected ( const TQString &amp; ) &nbsp;<em>(obsolete)</em></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li class=fn>void <a href="#setTabBar"><b>setTabBar</b></a> ( TQTabBar&nbsp;*&nbsp;tb )</li>
<li class=fn>TQTabBar * <a href="#tabBar"><b>tabBar</b></a> () const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
<p> The TQTabDialog class provides a stack of tabbed widgets.
<p>
<p> A tabbed dialog is one in which several "tab pages" are available.
By clicking on a tab page's tab or by pressing the indicated
Alt+<em>letter</em> key combination, the user can select which tab page
they want to use.
<p> TQTabDialog provides a tab bar consisting of single row of tabs at
the top; each tab has an associated widget which is that tab's
tab page. In addition, TQTabDialog provides an OK button and the
following optional buttons: Apply, Cancel, Defaults and Help.
<p> The normal way to use TQTabDialog is to do the following in the
constructor:
<ol type=1>
<li> Create a TQTabDialog.
<li> Create a <a href="ntqwidget.html">TQWidget</a> for each of the pages in the tab dialog, insert
children into it, set up geometry management for it, and use
<a href="#addTab">addTab</a>() (or <a href="#insertTab">insertTab</a>()) to set up a tab and keyboard accelerator
for it.
<li> Set up the buttons for the tab dialog using <a href="#setOkButton">setOkButton</a>(),
<a href="#setApplyButton">setApplyButton</a>(), setDefaultsButton(), <a href="#setCancelButton">setCancelButton</a>() and
<a href="#setHelpButton">setHelpButton</a>().
<li> Connect to the signals and slots.
</ol>
<p> If you don't call addTab() the page you have created will not be
visible. Don't confuse the object name you supply to the
TQWidget constructor and the tab label you supply to addTab();
addTab() takes user-visible name that appears on the widget's tab
and may identify an accelerator, whereas the widget name is used
primarily for debugging.
<p> Almost all applications have to connect the <a href="#applyButtonPressed">applyButtonPressed</a>()
signal to something. applyButtonPressed() is emitted when either OK
or Apply is clicked, and your slot must copy the dialog's state into
the application.
<p> There are also several other signals which may be useful:
<ul>
<li> <a href="#cancelButtonPressed">cancelButtonPressed</a>() is emitted when the user clicks Cancel.
<li> <a href="#defaultButtonPressed">defaultButtonPressed</a>() is emitted when the user clicks Defaults;
the slot it is connected to should reset the state of the dialog to
the application defaults.
<li> <a href="#helpButtonPressed">helpButtonPressed</a>() is emitted when the user clicks Help.
<li> <a href="#aboutToShow">aboutToShow</a>() is emitted at the start of <a href="ntqdialog.html#show">show</a>(); if there is any
chance that the state of the application may change between the
creation of the tab dialog and the time show() is called, you must
connect this signal to a slot that resets the state of the dialog.
<li> <a href="#currentChanged">currentChanged</a>() is emitted when the user selects a page.
</ul>
<p> Each tab is either enabled or disabled at any given time (see
<a href="#setTabEnabled">setTabEnabled</a>()). If a tab is enabled the tab text is drawn in
black and the user can select that tab. If it is disabled the tab
is drawn in a different way and the user cannot select that tab.
Note that even if a tab is disabled, the page can still be visible;
for example, if all of the tabs happen to be disabled.
<p> You can change a tab's label and iconset using <a href="#changeTab">changeTab</a>(). A tab
page can be removed with <a href="#removePage">removePage</a>() and shown with <a href="#showPage">showPage</a>(). The
current page is given by <a href="#currentPage">currentPage</a>().
<p> TQTabDialog does not support tabs on the sides or bottom, nor can
you set or retrieve the visible page. If you need more functionality
than TQTabDialog provides, consider creating a <a href="ntqdialog.html">TQDialog</a> and using a
<a href="ntqtabbar.html">TQTabBar</a> with TQTabWidgets.
<p> Most of the functionality in TQTabDialog is provided by a <a href="ntqtabwidget.html">TQTabWidget</a>.
<p> <img src=qtabdlg-m.png> <img src=qtabdlg-w.png>
<p> <p>See also <a href="ntqdialog.html">TQDialog</a> and <a href="dialogs.html">Dialog Classes</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQTabDialog"></a>TQTabDialog::TQTabDialog ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )
</h3>
Constructs a TQTabDialog with only an OK button.
The <em>parent</em>, <em>name</em>, <em>modal</em> and <a href="ntqt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments
are passed on to the <a href="ntqdialog.html">TQDialog</a> constructor.
<h3 class=fn><a name="~TQTabDialog"></a>TQTabDialog::~TQTabDialog ()
</h3>
Destroys the tab dialog.
<h3 class=fn>void <a name="aboutToShow"></a>TQTabDialog::aboutToShow ()<tt> [signal]</tt>
</h3>
<p> This signal is emitted by <a href="ntqdialog.html#show">show</a>() when it is time to set the state of
the dialog's contents. The dialog should reflect the current state
of the application when it appears; if there is any possibility that
the state of the application may change between the time you call
<a href="#TQTabDialog">TQTabDialog::TQTabDialog</a>() and <a href="ntqdialog.html#show">TQTabDialog::show</a>(), you should set the
dialog's state in a slot and connect this signal to it.
<p> This applies mainly to TQTabDialog objects that are kept around
hidden, rather than being created, shown, and deleted afterwards.
<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="ntqdialog.html#show">show</a>(), and <a href="#cancelButtonPressed">cancelButtonPressed</a>().
<h3 class=fn>void <a name="addTab"></a>TQTabDialog::addTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label )
</h3>
Adds another tab and page to the tab view.
<p> The new page is <em>child</em>; the tab's label is <em>label</em>.
Note the difference between the widget name (which you supply to
widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
label. The name is internal to the program and invariant, whereas
the label is shown on-screen and may vary according to language and
other factors.
<p> If the tab's <em>label</em> contains an ampersand, the letter following
the ampersand is used as an accelerator for the tab, e.g. if the
label is "Bro&wse" then Alt+W becomes an accelerator which will
move the focus to this tab.
<p> If you call <a href="#addTab">addTab</a>() after <a href="ntqdialog.html#show">show</a>() the screen will flicker and the
user may be confused.
<p> <p>See also <a href="#insertTab">insertTab</a>().
<h3 class=fn>void <a name="addTab-2"></a>TQTabDialog::addTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="ntqiconset.html">TQIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label )
</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This version of the function shows the <em>iconset</em> as well as the <em>label</em> on the tab of <em>child</em>.
<h3 class=fn>void <a name="addTab-3"></a>TQTabDialog::addTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, <a href="qtab.html">TQTab</a>&nbsp;*&nbsp;tab )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This is a lower-level method for adding tabs, similar to the other
<a href="#addTab">addTab</a>() method. It is useful if you are using <a href="#setTabBar">setTabBar</a>() to set a
<a href="ntqtabbar.html">TQTabBar</a> subclass with an overridden <a href="ntqtabbar.html#paint">TQTabBar::paint</a>() function for a
subclass of <a href="qtab.html">TQTab</a>.
<p> The <em>child</em> is the widget to be placed on the new tab page. The <em>tab</em> is the tab to display on the tab page -- normally this shows a
label or an icon that identifies the tab page.
<p>
<h3 class=fn>void <a name="applyButtonPressed"></a>TQTabDialog::applyButtonPressed ()<tt> [signal]</tt>
</h3>
<p> This signal is emitted when either the Apply or OK button is clicked.
<p> It should be connected to a slot (or several slots) that change the
application's state according to the state of the dialog.
<p> <p>See also <a href="#cancelButtonPressed">cancelButtonPressed</a>(), <a href="#defaultButtonPressed">defaultButtonPressed</a>(), and <a href="#setApplyButton">setApplyButton</a>().
<h3 class=fn>void <a name="cancelButtonPressed"></a>TQTabDialog::cancelButtonPressed ()<tt> [signal]</tt>
</h3>
<p> This signal is emitted when the Cancel button is clicked. It is
automatically connected to <a href="ntqdialog.html#reject">TQDialog::reject</a>(), which will hide the
dialog.
<p> The Cancel button should not change the application's state at all,
so you should generally not need to connect it to any slot.
<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#defaultButtonPressed">defaultButtonPressed</a>(), and <a href="#setCancelButton">setCancelButton</a>().
<h3 class=fn>void <a name="changeTab"></a>TQTabDialog::changeTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w, const&nbsp;<a href="ntqiconset.html">TQIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label )
</h3>
Changes tab page <em>w</em>'s iconset to <em>iconset</em> and label to <em>label</em>.
<p>
<h3 class=fn>void <a name="changeTab-2"></a>TQTabDialog::changeTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Defines a new <em>label</em> for the tab of page <em>w</em>
<h3 class=fn>void <a name="currentChanged"></a>TQTabDialog::currentChanged ( <a href="ntqwidget.html">TQWidget</a>&nbsp;* )<tt> [signal]</tt>
</h3>
<p> This signal is emitted whenever the current page changes.
<p> <p>See also <a href="#currentPage">currentPage</a>(), <a href="#showPage">showPage</a>(), and <a href="#tabLabel">tabLabel</a>().
<h3 class=fn><a href="ntqwidget.html">TQWidget</a>&nbsp;* <a name="currentPage"></a>TQTabDialog::currentPage () const
</h3> Returns a pointer to the page currently being displayed by the
tab dialog. The tab dialog does its best to make sure that this value
is never 0 (but if you try hard enough, it can be).
<h3 class=fn>void <a name="defaultButtonPressed"></a>TQTabDialog::defaultButtonPressed ()<tt> [signal]</tt>
</h3>
<p> This signal is emitted when the Defaults button is pressed. It
should reset the dialog (but not the application) to the "factory
defaults".
<p> The application's state should not be changed until the user clicks
Apply or OK.
<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#cancelButtonPressed">cancelButtonPressed</a>(), and <a href="#setDefaultButton">setDefaultButton</a>().
<h3 class=fn>bool <a name="hasApplyButton"></a>TQTabDialog::hasApplyButton () const
</h3>
Returns TRUE if the tab dialog has an Apply button; otherwise
returns FALSE.
<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#hasCancelButton">hasCancelButton</a>(), and <a href="#hasDefaultButton">hasDefaultButton</a>().
<h3 class=fn>bool <a name="hasCancelButton"></a>TQTabDialog::hasCancelButton () const
</h3>
Returns TRUE if the tab dialog has a Cancel button; otherwise
returns FALSE.
<p> <p>See also <a href="#setCancelButton">setCancelButton</a>(), <a href="#cancelButtonPressed">cancelButtonPressed</a>(), <a href="#hasApplyButton">hasApplyButton</a>(), and <a href="#hasDefaultButton">hasDefaultButton</a>().
<h3 class=fn>bool <a name="hasDefaultButton"></a>TQTabDialog::hasDefaultButton () const
</h3>
Returns TRUE if the tab dialog has a Defaults button; otherwise
returns FALSE.
<p> <p>See also <a href="#setDefaultButton">setDefaultButton</a>(), <a href="#defaultButtonPressed">defaultButtonPressed</a>(), <a href="#hasApplyButton">hasApplyButton</a>(), and <a href="#hasCancelButton">hasCancelButton</a>().
<h3 class=fn>bool <a name="hasHelpButton"></a>TQTabDialog::hasHelpButton () const
</h3>
Returns TRUE if the tab dialog has a Help button; otherwise returns
FALSE.
<p> <p>See also <a href="#setHelpButton">setHelpButton</a>(), <a href="#helpButtonPressed">helpButtonPressed</a>(), <a href="#hasApplyButton">hasApplyButton</a>(), and <a href="#hasCancelButton">hasCancelButton</a>().
<h3 class=fn>bool <a name="hasOkButton"></a>TQTabDialog::hasOkButton () const
</h3>
Returns TRUE if the tab dialog has an OK button; otherwise returns
FALSE.
<p> <p>See also <a href="#setOkButton">setOkButton</a>(), <a href="#hasApplyButton">hasApplyButton</a>(), <a href="#hasCancelButton">hasCancelButton</a>(), and <a href="#hasDefaultButton">hasDefaultButton</a>().
<h3 class=fn>void <a name="helpButtonPressed"></a>TQTabDialog::helpButtonPressed ()<tt> [signal]</tt>
</h3>
<p> This signal is emitted when the Help button is pressed. It
could be used to present information about how to use the dialog.
<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#cancelButtonPressed">cancelButtonPressed</a>(), and <a href="#setHelpButton">setHelpButton</a>().
<h3 class=fn>void <a name="insertTab"></a>TQTabDialog::insertTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )
</h3>
Inserts another tab and page to the tab view.
<p> The new page is <em>child</em>; the tab's label is <em>label</em>.
Note the difference between the widget name (which you supply to
widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
label. The name is internal to the program and invariant, whereas
the label is shown on-screen and may vary according to language and
other factors.
<p> If the tab's <em>label</em> contains an ampersand, the letter following
the ampersand is used as an accelerator for the tab, e.g. if the
label is "Bro&wse" then Alt+W becomes an accelerator which will
move the focus to this tab.
<p> If <em>index</em> is not specified, the tab is simply added. Otherwise
it is inserted at the specified position.
<p> If you call <a href="#insertTab">insertTab</a>() after <a href="ntqdialog.html#show">show</a>(), the screen will flicker and the
user may be confused.
<p> <p>See also <a href="#addTab">addTab</a>().
<h3 class=fn>void <a name="insertTab-2"></a>TQTabDialog::insertTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="ntqiconset.html">TQIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )
</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This version of the function shows the <em>iconset</em> as well as the <em>label</em> on the tab of <em>child</em>.
<h3 class=fn>void <a name="insertTab-3"></a>TQTabDialog::insertTab ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;child, <a href="qtab.html">TQTab</a>&nbsp;*&nbsp;tab, int&nbsp;index = -1 )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This is a lower-level method for inserting tabs, similar to the other
<a href="#insertTab">insertTab</a>() method. It is useful if you are using <a href="#setTabBar">setTabBar</a>() to set a
<a href="ntqtabbar.html">TQTabBar</a> subclass with an overridden <a href="ntqtabbar.html#paint">TQTabBar::paint</a>() function for a
subclass of <a href="qtab.html">TQTab</a>.
<p> The <em>child</em> is the widget to be placed on the new tab page. The <em>tab</em> is the tab to display on the tab page -- normally this shows a
label or an icon that identifies the tab page. The <em>index</em> is the
position where this tab page should be inserted.
<p>
<h3 class=fn>bool <a name="isTabEnabled"></a>TQTabDialog::isTabEnabled ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w ) const
</h3>
Returns TRUE if the page <em>w</em> is enabled; otherwise returns FALSE.
<p> <p>See also <a href="#setTabEnabled">setTabEnabled</a>() and <a href="ntqwidget.html#enabled-prop">TQWidget::enabled</a>.
<h3 class=fn>bool <a name="isTabEnabled-2"></a>TQTabDialog::isTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name ) const
</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> Returns TRUE if the page with object name <em>name</em> is enabled and
FALSE if it is disabled.
<p> If <em>name</em> is 0 or not the name of any of the pages, <a href="#isTabEnabled">isTabEnabled</a>()
returns FALSE.
<p> <p>See also <a href="#setTabEnabled">setTabEnabled</a>() and <a href="ntqwidget.html#enabled-prop">TQWidget::enabled</a>.
<h3 class=fn>void <a name="removePage"></a>TQTabDialog::removePage ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w )
</h3> Removes page <em>w</em> from this stack of widgets. Does not
delete <em>w</em>.
<p>See also <a href="#showPage">showPage</a>(), <a href="ntqtabwidget.html#removePage">TQTabWidget::removePage</a>(), and <a href="ntqwidgetstack.html#removeWidget">TQWidgetStack::removeWidget</a>().
<h3 class=fn>void <a name="selected"></a>TQTabDialog::selected ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp; )<tt> [signal]</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> This signal is emitted whenever a tab is selected (raised),
including during the first <a href="ntqdialog.html#show">show</a>().
<p> <p>See also <a href="ntqwidget.html#raise">raise</a>().
<h3 class=fn>void <a name="setApplyButton"></a>TQTabDialog::setApplyButton ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )
</h3>
Adds an Apply button to the dialog. The button's text is set to <em>text</em>.
<p> The Apply button should apply the current settings in the dialog box
to the application while keeping the dialog visible.
<p> When Apply is clicked, the <a href="#applyButtonPressed">applyButtonPressed</a>() signal is emitted.
<p> If <em>text</em> is a
<a href="ntqstring.html#operator!">null string</a>,
no button is shown.
<p> <p>See also <a href="#setCancelButton">setCancelButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#applyButtonPressed">applyButtonPressed</a>().
<h3 class=fn>void <a name="setApplyButton-2"></a>TQTabDialog::setApplyButton ()
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds an Apply button to the dialog. The button's text is set to
a localizable "Apply".
<h3 class=fn>void <a name="setCancelButton"></a>TQTabDialog::setCancelButton ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )
</h3>
Adds a Cancel button to the dialog. The button's text is set to <em>text</em>.
<p> The cancel button should always return the application to the state
it was in before the tab view popped up, or if the user has clicked
Apply, back to the state immediately after the last Apply.
<p> When Cancel is clicked, the <a href="#cancelButtonPressed">cancelButtonPressed</a>() signal is emitted.
The dialog is closed at the same time.
<p> If <em>text</em> is a
<a href="ntqstring.html#operator!">null string</a>,
no button is shown.
<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#cancelButtonPressed">cancelButtonPressed</a>().
<h3 class=fn>void <a name="setCancelButton-2"></a>TQTabDialog::setCancelButton ()
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds a Cancel button to the dialog. The button's text is set to
a localizable "Cancel".
<h3 class=fn>void <a name="setDefaultButton"></a>TQTabDialog::setDefaultButton ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )
</h3>
Adds a Defaults button to the dialog. The button's text is set to <em>text</em>.
<p> The Defaults button should set the dialog (but not the application)
back to the application defaults.
<p> When Defaults is clicked, the <a href="#defaultButtonPressed">defaultButtonPressed</a>() signal is emitted.
<p> If <em>text</em> is a
<a href="ntqstring.html#operator!">null string</a>,
no button is shown.
<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setCancelButton">setCancelButton</a>(), and <a href="#defaultButtonPressed">defaultButtonPressed</a>().
<h3 class=fn>void <a name="setDefaultButton-2"></a>TQTabDialog::setDefaultButton ()
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds a Defaults button to the dialog. The button's text is set to
a localizable "Defaults".
<h3 class=fn>void <a name="setFont"></a>TQTabDialog::setFont ( const&nbsp;<a href="ntqfont.html">TQFont</a>&nbsp;&amp;&nbsp;font )<tt> [virtual]</tt>
</h3>
Sets the font for the tabs to <em>font</em>.
<p> If the widget is visible, the display is updated with the new font
immediately. There may be some geometry changes, depending on the
size of the old and new fonts.
<p>Reimplemented from <a href="ntqwidget.html#setFont">TQWidget</a>.
<h3 class=fn>void <a name="setHelpButton"></a>TQTabDialog::setHelpButton ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )
</h3>
Adds a Help button to the dialog. The button's text is set to <em>text</em>.
<p> When Help is clicked, the <a href="#helpButtonPressed">helpButtonPressed</a>() signal is emitted.
<p> If <em>text</em> is a
<a href="ntqstring.html#operator!">null string</a>,
no button is shown.
<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setCancelButton">setCancelButton</a>(), and <a href="#helpButtonPressed">helpButtonPressed</a>().
<h3 class=fn>void <a name="setHelpButton-2"></a>TQTabDialog::setHelpButton ()
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds a Help button to the dialog. The button's text is set to
a localizable "Help".
<h3 class=fn>void <a name="setOkButton"></a>TQTabDialog::setOkButton ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )
</h3>
Adds an OK button to the dialog and sets the button's text to <em>text</em>.
<p> When the OK button is clicked, the <a href="#applyButtonPressed">applyButtonPressed</a>() signal is emitted,
and the current settings in the dialog box should be applied to
the application. The dialog then closes.
<p> If <em>text</em> is a
<a href="ntqstring.html#operator!">null string</a>,
no button is shown.
<p> <p>See also <a href="#setCancelButton">setCancelButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#applyButtonPressed">applyButtonPressed</a>().
<h3 class=fn>void <a name="setOkButton-2"></a>TQTabDialog::setOkButton ()
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds an OK button to the dialog. The button's text is set to
a localizable "OK".
<h3 class=fn>void <a name="setTabBar"></a>TQTabDialog::setTabBar ( <a href="ntqtabbar.html">TQTabBar</a>&nbsp;*&nbsp;tb )<tt> [protected]</tt>
</h3>
Replaces the <a href="ntqtabbar.html">TQTabBar</a> heading the dialog by the given tab bar, <em>tb</em>.
Note that this must be called <em>before</em> any tabs have been added,
or the behavior is undefined.
<p>See also <a href="#tabBar">tabBar</a>().
<h3 class=fn>void <a name="setTabEnabled"></a>TQTabDialog::setTabEnabled ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w, bool&nbsp;enable )
</h3>
If <em>enable</em> is TRUE the page <em>w</em> is enabled; otherwise <em>w</em> is
disabled. The page's tab is redrawn appropriately.
<p> <a href="ntqtabwidget.html">TQTabWidget</a> uses <a href="ntqwidget.html#setEnabled">TQWidget::setEnabled</a>() internally, rather than keeping a
separate flag.
<p> Note that even a disabled tab and tab page may be visible. If the
page is already visible TQTabWidget will not hide it; if all the
pages are disabled TQTabWidget will show one of them.
<p> <p>See also <a href="#isTabEnabled">isTabEnabled</a>() and <a href="ntqwidget.html#enabled-prop">TQWidget::enabled</a>.
<h3 class=fn>void <a name="setTabEnabled-2"></a>TQTabDialog::setTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name, bool&nbsp;enable )
</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> Finds the page with object name <em>name</em>, enables/disables it
according to the value of <em>enable</em> and redraws the page's tab
appropriately.
<p> TQTabDialog uses <a href="ntqwidget.html#setEnabled">TQWidget::setEnabled</a>() internally, rather than keeping a
separate flag.
<p> Note that even a disabled tab/page may be visible. If the page is
already visible TQTabDialog will not hide it; if all the pages
are disabled TQTabDialog will show one of them.
<p> The object name is used (rather than the tab label) because the tab
text may not be invariant in multi-language applications.
<p> <p>See also <a href="#isTabEnabled">isTabEnabled</a>() and <a href="ntqwidget.html#enabled-prop">TQWidget::enabled</a>.
<h3 class=fn>void <a name="showPage"></a>TQTabDialog::showPage ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w )
</h3> Ensures that widget <em>w</em> is shown. This is mainly useful for accelerators.
<p> <b>Warning:</b> If used carelessly, this function can easily surprise or
confuse the user.
<p> <p>See also <a href="ntqtabbar.html#currentTab-prop">TQTabBar::currentTab</a>.
<h3 class=fn><a href="ntqtabbar.html">TQTabBar</a>&nbsp;* <a name="tabBar"></a>TQTabDialog::tabBar () const<tt> [protected]</tt>
</h3>
Returns the currently set <a href="ntqtabbar.html">TQTabBar</a>.
<p>See also <a href="#setTabBar">setTabBar</a>().
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="tabLabel"></a>TQTabDialog::tabLabel ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;w )
</h3> Returns the text in the tab for page <em>w</em>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 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 &copy; 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>