source: trunk/doc/html/qtabdialog.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 32.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/dialogs/qtabdialog.cpp:53 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QTabDialog Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QTabDialog Class Reference</h1>
33
34<p>The QTabDialog class provides a stack of tabbed widgets.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qtabdialog-h.html">qtabdialog.h</a>&gt;</tt>
37<p>Inherits <a href="qdialog.html">QDialog</a>.
38<p><a href="qtabdialog-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QTabDialog"><b>QTabDialog</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )</li>
42<li class=fn><a href="#~QTabDialog"><b>~QTabDialog</b></a> ()</li>
43<li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;font )</li>
44<li class=fn>void <a href="#addTab"><b>addTab</b></a> ( QWidget&nbsp;*&nbsp;child, const&nbsp;QString&nbsp;&amp;&nbsp;label )</li>
45<li class=fn>void <a href="#addTab-2"><b>addTab</b></a> ( QWidget&nbsp;*&nbsp;child, const&nbsp;QIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;QString&nbsp;&amp;&nbsp;label )</li>
46<li class=fn>void <a href="#addTab-3"><b>addTab</b></a> ( QWidget&nbsp;*&nbsp;child, QTab&nbsp;*&nbsp;tab )</li>
47<li class=fn>void <a href="#insertTab"><b>insertTab</b></a> ( QWidget&nbsp;*&nbsp;child, const&nbsp;QString&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )</li>
48<li class=fn>void <a href="#insertTab-2"><b>insertTab</b></a> ( QWidget&nbsp;*&nbsp;child, const&nbsp;QIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;QString&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )</li>
49<li class=fn>void <a href="#insertTab-3"><b>insertTab</b></a> ( QWidget&nbsp;*&nbsp;child, QTab&nbsp;*&nbsp;tab, int&nbsp;index = -1 )</li>
50<li class=fn>void <a href="#changeTab-2"><b>changeTab</b></a> ( QWidget&nbsp;*&nbsp;w, const&nbsp;QString&nbsp;&amp;&nbsp;label )</li>
51<li class=fn>void <a href="#changeTab"><b>changeTab</b></a> ( QWidget&nbsp;*&nbsp;w, const&nbsp;QIconSet&nbsp;&amp;&nbsp;iconset, const&nbsp;QString&nbsp;&amp;&nbsp;label )</li>
52<li class=fn>bool <a href="#isTabEnabled"><b>isTabEnabled</b></a> ( QWidget&nbsp;*&nbsp;w ) const</li>
53<li class=fn>void <a href="#setTabEnabled"><b>setTabEnabled</b></a> ( QWidget&nbsp;*&nbsp;w, bool&nbsp;enable )</li>
54<li class=fn>bool isTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name ) const &nbsp;<em>(obsolete)</em></li>
55<li class=fn>void setTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name, bool&nbsp;enable ) &nbsp;<em>(obsolete)</em></li>
56<li class=fn>void <a href="#showPage"><b>showPage</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
57<li class=fn>void <a href="#removePage"><b>removePage</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
58<li class=fn>QString <a href="#tabLabel"><b>tabLabel</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
59<li class=fn>QWidget * <a href="#currentPage"><b>currentPage</b></a> () const</li>
60<li class=fn>void <a href="#setDefaultButton"><b>setDefaultButton</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
61<li class=fn>void <a href="#setDefaultButton-2"><b>setDefaultButton</b></a> ()</li>
62<li class=fn>bool <a href="#hasDefaultButton"><b>hasDefaultButton</b></a> () const</li>
63<li class=fn>void <a href="#setHelpButton"><b>setHelpButton</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
64<li class=fn>void <a href="#setHelpButton-2"><b>setHelpButton</b></a> ()</li>
65<li class=fn>bool <a href="#hasHelpButton"><b>hasHelpButton</b></a> () const</li>
66<li class=fn>void <a href="#setCancelButton"><b>setCancelButton</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
67<li class=fn>void <a href="#setCancelButton-2"><b>setCancelButton</b></a> ()</li>
68<li class=fn>bool <a href="#hasCancelButton"><b>hasCancelButton</b></a> () const</li>
69<li class=fn>void <a href="#setApplyButton"><b>setApplyButton</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
70<li class=fn>void <a href="#setApplyButton-2"><b>setApplyButton</b></a> ()</li>
71<li class=fn>bool <a href="#hasApplyButton"><b>hasApplyButton</b></a> () const</li>
72<li class=fn>void <a href="#setOkButton"><b>setOkButton</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
73<li class=fn>void <a href="#setOkButton-2"><b>setOkButton</b></a> ()</li>
74<li class=fn>bool <a href="#hasOkButton"><b>hasOkButton</b></a> () const</li>
75</ul>
76<h2>Signals</h2>
77<ul>
78<li class=fn>void <a href="#aboutToShow"><b>aboutToShow</b></a> ()</li>
79<li class=fn>void <a href="#applyButtonPressed"><b>applyButtonPressed</b></a> ()</li>
80<li class=fn>void <a href="#cancelButtonPressed"><b>cancelButtonPressed</b></a> ()</li>
81<li class=fn>void <a href="#defaultButtonPressed"><b>defaultButtonPressed</b></a> ()</li>
82<li class=fn>void <a href="#helpButtonPressed"><b>helpButtonPressed</b></a> ()</li>
83<li class=fn>void <a href="#currentChanged"><b>currentChanged</b></a> ( QWidget * )</li>
84<li class=fn>void selected ( const QString &amp; ) &nbsp;<em>(obsolete)</em></li>
85</ul>
86<h2>Protected Members</h2>
87<ul>
88<li class=fn>void <a href="#setTabBar"><b>setTabBar</b></a> ( QTabBar&nbsp;*&nbsp;tb )</li>
89<li class=fn>QTabBar * <a href="#tabBar"><b>tabBar</b></a> () const</li>
90</ul>
91<hr><a name="details"></a><h2>Detailed Description</h2>
92
93
94<p> The QTabDialog class provides a stack of tabbed widgets.
95<p>
96
97<p> A tabbed dialog is one in which several "tab pages" are available.
98By clicking on a tab page's tab or by pressing the indicated
99Alt+<em>letter</em> key combination, the user can select which tab page
100they want to use.
101<p> QTabDialog provides a tab bar consisting of single row of tabs at
102the top; each tab has an associated widget which is that tab's
103tab page. In addition, QTabDialog provides an OK button and the
104following optional buttons: Apply, Cancel, Defaults and Help.
105<p> The normal way to use QTabDialog is to do the following in the
106constructor:
107<ol type=1>
108<li> Create a QTabDialog.
109<li> Create a <a href="qwidget.html">QWidget</a> for each of the pages in the tab dialog, insert
110children into it, set up geometry management for it, and use
111<a href="#addTab">addTab</a>() (or <a href="#insertTab">insertTab</a>()) to set up a tab and keyboard accelerator
112for it.
113<li> Set up the buttons for the tab dialog using <a href="#setOkButton">setOkButton</a>(),
114<a href="#setApplyButton">setApplyButton</a>(), setDefaultsButton(), <a href="#setCancelButton">setCancelButton</a>() and
115<a href="#setHelpButton">setHelpButton</a>().
116<li> Connect to the signals and slots.
117</ol>
118<p> If you don't call addTab() the page you have created will not be
119visible. Don't confuse the object name you supply to the
120QWidget constructor and the tab label you supply to addTab();
121addTab() takes user-visible name that appears on the widget's tab
122and may identify an accelerator, whereas the widget name is used
123primarily for debugging.
124<p> Almost all applications have to connect the <a href="#applyButtonPressed">applyButtonPressed</a>()
125signal to something. applyButtonPressed() is emitted when either OK
126or Apply is clicked, and your slot must copy the dialog's state into
127the application.
128<p> There are also several other signals which may be useful:
129<ul>
130<li> <a href="#cancelButtonPressed">cancelButtonPressed</a>() is emitted when the user clicks Cancel.
131<li> <a href="#defaultButtonPressed">defaultButtonPressed</a>() is emitted when the user clicks Defaults;
132the slot it is connected to should reset the state of the dialog to
133the application defaults.
134<li> <a href="#helpButtonPressed">helpButtonPressed</a>() is emitted when the user clicks Help.
135<li> <a href="#aboutToShow">aboutToShow</a>() is emitted at the start of <a href="qdialog.html#show">show</a>(); if there is any
136chance that the state of the application may change between the
137creation of the tab dialog and the time show() is called, you must
138connect this signal to a slot that resets the state of the dialog.
139<li> <a href="#currentChanged">currentChanged</a>() is emitted when the user selects a page.
140</ul>
141<p> Each tab is either enabled or disabled at any given time (see
142<a href="#setTabEnabled">setTabEnabled</a>()). If a tab is enabled the tab text is drawn in
143black and the user can select that tab. If it is disabled the tab
144is drawn in a different way and the user cannot select that tab.
145Note that even if a tab is disabled, the page can still be visible;
146for example, if all of the tabs happen to be disabled.
147<p> You can change a tab's label and iconset using <a href="#changeTab">changeTab</a>(). A tab
148page can be removed with <a href="#removePage">removePage</a>() and shown with <a href="#showPage">showPage</a>(). The
149current page is given by <a href="#currentPage">currentPage</a>().
150<p> QTabDialog does not support tabs on the sides or bottom, nor can
151you set or retrieve the visible page. If you need more functionality
152than QTabDialog provides, consider creating a <a href="qdialog.html">QDialog</a> and using a
153<a href="qtabbar.html">QTabBar</a> with QTabWidgets.
154<p> Most of the functionality in QTabDialog is provided by a <a href="qtabwidget.html">QTabWidget</a>.
155<p> <img src=qtabdlg-m.png> <img src=qtabdlg-w.png>
156<p> <p>See also <a href="qdialog.html">QDialog</a> and <a href="dialogs.html">Dialog Classes</a>.
157
158<hr><h2>Member Function Documentation</h2>
159<h3 class=fn><a name="QTabDialog"></a>QTabDialog::QTabDialog ( <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 )
160</h3>
161Constructs a QTabDialog with only an OK button.
162The <em>parent</em>, <em>name</em>, <em>modal</em> and <a href="qt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments
163are passed on to the <a href="qdialog.html">QDialog</a> constructor.
164
165<h3 class=fn><a name="~QTabDialog"></a>QTabDialog::~QTabDialog ()
166</h3>
167Destroys the tab dialog.
168
169<h3 class=fn>void <a name="aboutToShow"></a>QTabDialog::aboutToShow ()<tt> [signal]</tt>
170</h3>
171
172<p> This signal is emitted by <a href="qdialog.html#show">show</a>() when it is time to set the state of
173the dialog's contents. The dialog should reflect the current state
174of the application when it appears; if there is any possibility that
175the state of the application may change between the time you call
176<a href="#QTabDialog">QTabDialog::QTabDialog</a>() and <a href="qdialog.html#show">QTabDialog::show</a>(), you should set the
177dialog's state in a slot and connect this signal to it.
178<p> This applies mainly to QTabDialog objects that are kept around
179hidden, rather than being created, shown, and deleted afterwards.
180<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="qdialog.html#show">show</a>(), and <a href="#cancelButtonPressed">cancelButtonPressed</a>().
181
182<h3 class=fn>void <a name="addTab"></a>QTabDialog::addTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label )
183</h3>
184Adds another tab and page to the tab view.
185<p> The new page is <em>child</em>; the tab's label is <em>label</em>.
186Note the difference between the widget name (which you supply to
187widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
188label. The name is internal to the program and invariant, whereas
189the label is shown on-screen and may vary according to language and
190other factors.
191<p> If the tab's <em>label</em> contains an ampersand, the letter following
192the ampersand is used as an accelerator for the tab, e.g. if the
193label is "Bro&wse" then Alt+W becomes an accelerator which will
194move the focus to this tab.
195<p> If you call <a href="#addTab">addTab</a>() after <a href="qdialog.html#show">show</a>() the screen will flicker and the
196user may be confused.
197<p> <p>See also <a href="#insertTab">insertTab</a>().
198
199<h3 class=fn>void <a name="addTab-2"></a>QTabDialog::addTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="qiconset.html">QIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label )
200</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
201<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>.
202
203<h3 class=fn>void <a name="addTab-3"></a>QTabDialog::addTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, <a href="qtab.html">QTab</a>&nbsp;*&nbsp;tab )
204</h3>
205This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
206<p> This is a lower-level method for adding tabs, similar to the other
207<a href="#addTab">addTab</a>() method. It is useful if you are using <a href="#setTabBar">setTabBar</a>() to set a
208<a href="qtabbar.html">QTabBar</a> subclass with an overridden <a href="qtabbar.html#paint">QTabBar::paint</a>() function for a
209subclass of <a href="qtab.html">QTab</a>.
210<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
211label or an icon that identifies the tab page.
212<p>
213<h3 class=fn>void <a name="applyButtonPressed"></a>QTabDialog::applyButtonPressed ()<tt> [signal]</tt>
214</h3>
215
216<p> This signal is emitted when either the Apply or OK button is clicked.
217<p> It should be connected to a slot (or several slots) that change the
218application's state according to the state of the dialog.
219<p> <p>See also <a href="#cancelButtonPressed">cancelButtonPressed</a>(), <a href="#defaultButtonPressed">defaultButtonPressed</a>(), and <a href="#setApplyButton">setApplyButton</a>().
220
221<h3 class=fn>void <a name="cancelButtonPressed"></a>QTabDialog::cancelButtonPressed ()<tt> [signal]</tt>
222</h3>
223
224<p> This signal is emitted when the Cancel button is clicked. It is
225automatically connected to <a href="qdialog.html#reject">QDialog::reject</a>(), which will hide the
226dialog.
227<p> The Cancel button should not change the application's state at all,
228so you should generally not need to connect it to any slot.
229<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#defaultButtonPressed">defaultButtonPressed</a>(), and <a href="#setCancelButton">setCancelButton</a>().
230
231<h3 class=fn>void <a name="changeTab"></a>QTabDialog::changeTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, const&nbsp;<a href="qiconset.html">QIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label )
232</h3>
233Changes tab page <em>w</em>'s iconset to <em>iconset</em> and label to <em>label</em>.
234<p>
235<h3 class=fn>void <a name="changeTab-2"></a>QTabDialog::changeTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label )
236</h3>
237This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
238<p> Defines a new <em>label</em> for the tab of page <em>w</em>
239
240<h3 class=fn>void <a name="currentChanged"></a>QTabDialog::currentChanged ( <a href="qwidget.html">QWidget</a>&nbsp;* )<tt> [signal]</tt>
241</h3>
242<p> This signal is emitted whenever the current page changes.
243<p> <p>See also <a href="#currentPage">currentPage</a>(), <a href="#showPage">showPage</a>(), and <a href="#tabLabel">tabLabel</a>().
244
245<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="currentPage"></a>QTabDialog::currentPage () const
246</h3> Returns a pointer to the page currently being displayed by the
247tab dialog. The tab dialog does its best to make sure that this value
248is never 0 (but if you try hard enough, it can be).
249
250<h3 class=fn>void <a name="defaultButtonPressed"></a>QTabDialog::defaultButtonPressed ()<tt> [signal]</tt>
251</h3>
252
253<p> This signal is emitted when the Defaults button is pressed. It
254should reset the dialog (but not the application) to the "factory
255defaults".
256<p> The application's state should not be changed until the user clicks
257Apply or OK.
258<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#cancelButtonPressed">cancelButtonPressed</a>(), and <a href="#setDefaultButton">setDefaultButton</a>().
259
260<h3 class=fn>bool <a name="hasApplyButton"></a>QTabDialog::hasApplyButton () const
261</h3>
262Returns TRUE if the tab dialog has an Apply button; otherwise
263returns FALSE.
264<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>().
265
266<h3 class=fn>bool <a name="hasCancelButton"></a>QTabDialog::hasCancelButton () const
267</h3>
268Returns TRUE if the tab dialog has a Cancel button; otherwise
269returns FALSE.
270<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>().
271
272<h3 class=fn>bool <a name="hasDefaultButton"></a>QTabDialog::hasDefaultButton () const
273</h3>
274Returns TRUE if the tab dialog has a Defaults button; otherwise
275returns FALSE.
276<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>().
277
278<h3 class=fn>bool <a name="hasHelpButton"></a>QTabDialog::hasHelpButton () const
279</h3>
280Returns TRUE if the tab dialog has a Help button; otherwise returns
281FALSE.
282<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>().
283
284<h3 class=fn>bool <a name="hasOkButton"></a>QTabDialog::hasOkButton () const
285</h3>
286Returns TRUE if the tab dialog has an OK button; otherwise returns
287FALSE.
288<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>().
289
290<h3 class=fn>void <a name="helpButtonPressed"></a>QTabDialog::helpButtonPressed ()<tt> [signal]</tt>
291</h3>
292
293<p> This signal is emitted when the Help button is pressed. It
294could be used to present information about how to use the dialog.
295<p> <p>See also <a href="#applyButtonPressed">applyButtonPressed</a>(), <a href="#cancelButtonPressed">cancelButtonPressed</a>(), and <a href="#setHelpButton">setHelpButton</a>().
296
297<h3 class=fn>void <a name="insertTab"></a>QTabDialog::insertTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )
298</h3>
299Inserts another tab and page to the tab view.
300<p> The new page is <em>child</em>; the tab's label is <em>label</em>.
301Note the difference between the widget name (which you supply to
302widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
303label. The name is internal to the program and invariant, whereas
304the label is shown on-screen and may vary according to language and
305other factors.
306<p> If the tab's <em>label</em> contains an ampersand, the letter following
307the ampersand is used as an accelerator for the tab, e.g. if the
308label is "Bro&wse" then Alt+W becomes an accelerator which will
309move the focus to this tab.
310<p> If <em>index</em> is not specified, the tab is simply added. Otherwise
311it is inserted at the specified position.
312<p> If you call <a href="#insertTab">insertTab</a>() after <a href="qdialog.html#show">show</a>(), the screen will flicker and the
313user may be confused.
314<p> <p>See also <a href="#addTab">addTab</a>().
315
316<h3 class=fn>void <a name="insertTab-2"></a>QTabDialog::insertTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, const&nbsp;<a href="qiconset.html">QIconSet</a>&nbsp;&amp;&nbsp;iconset, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;label, int&nbsp;index = -1 )
317</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
318<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>.
319
320<h3 class=fn>void <a name="insertTab-3"></a>QTabDialog::insertTab ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;child, <a href="qtab.html">QTab</a>&nbsp;*&nbsp;tab, int&nbsp;index = -1 )
321</h3>
322This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
323<p> This is a lower-level method for inserting tabs, similar to the other
324<a href="#insertTab">insertTab</a>() method. It is useful if you are using <a href="#setTabBar">setTabBar</a>() to set a
325<a href="qtabbar.html">QTabBar</a> subclass with an overridden <a href="qtabbar.html#paint">QTabBar::paint</a>() function for a
326subclass of <a href="qtab.html">QTab</a>.
327<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
328label or an icon that identifies the tab page. The <em>index</em> is the
329position where this tab page should be inserted.
330<p>
331<h3 class=fn>bool <a name="isTabEnabled"></a>QTabDialog::isTabEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w ) const
332</h3>
333Returns TRUE if the page <em>w</em> is enabled; otherwise returns FALSE.
334<p> <p>See also <a href="#setTabEnabled">setTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
335
336<h3 class=fn>bool <a name="isTabEnabled-2"></a>QTabDialog::isTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name ) const
337</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
338<p> Returns TRUE if the page with object name <em>name</em> is enabled and
339FALSE if it is disabled.
340<p> If <em>name</em> is 0 or not the name of any of the pages, <a href="#isTabEnabled">isTabEnabled</a>()
341returns FALSE.
342<p> <p>See also <a href="#setTabEnabled">setTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
343
344<h3 class=fn>void <a name="removePage"></a>QTabDialog::removePage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )
345</h3> Removes page <em>w</em> from this stack of widgets. Does not
346delete <em>w</em>.
347<p>See also <a href="#showPage">showPage</a>(), <a href="qtabwidget.html#removePage">QTabWidget::removePage</a>(), and <a href="qwidgetstack.html#removeWidget">QWidgetStack::removeWidget</a>().
348
349<h3 class=fn>void <a name="selected"></a>QTabDialog::selected ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [signal]</tt>
350</h3>
351
352<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
353<p> This signal is emitted whenever a tab is selected (raised),
354including during the first <a href="qdialog.html#show">show</a>().
355<p> <p>See also <a href="qwidget.html#raise">raise</a>().
356
357<h3 class=fn>void <a name="setApplyButton"></a>QTabDialog::setApplyButton ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )
358</h3>
359Adds an Apply button to the dialog. The button's text is set to <em>text</em>.
360<p> The Apply button should apply the current settings in the dialog box
361to the application while keeping the dialog visible.
362<p> When Apply is clicked, the <a href="#applyButtonPressed">applyButtonPressed</a>() signal is emitted.
363<p> If <em>text</em> is a
364<a href="qstring.html#operator!">null string</a>,
365no button is shown.
366<p> <p>See also <a href="#setCancelButton">setCancelButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#applyButtonPressed">applyButtonPressed</a>().
367
368<h3 class=fn>void <a name="setApplyButton-2"></a>QTabDialog::setApplyButton ()
369</h3>
370This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
371<p> Adds an Apply button to the dialog. The button's text is set to
372a localizable "Apply".
373
374<h3 class=fn>void <a name="setCancelButton"></a>QTabDialog::setCancelButton ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )
375</h3>
376Adds a Cancel button to the dialog. The button's text is set to <em>text</em>.
377<p> The cancel button should always return the application to the state
378it was in before the tab view popped up, or if the user has clicked
379Apply, back to the state immediately after the last Apply.
380<p> When Cancel is clicked, the <a href="#cancelButtonPressed">cancelButtonPressed</a>() signal is emitted.
381The dialog is closed at the same time.
382<p> If <em>text</em> is a
383<a href="qstring.html#operator!">null string</a>,
384no button is shown.
385<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#cancelButtonPressed">cancelButtonPressed</a>().
386
387<h3 class=fn>void <a name="setCancelButton-2"></a>QTabDialog::setCancelButton ()
388</h3>
389This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
390<p> Adds a Cancel button to the dialog. The button's text is set to
391a localizable "Cancel".
392
393<h3 class=fn>void <a name="setDefaultButton"></a>QTabDialog::setDefaultButton ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )
394</h3>
395Adds a Defaults button to the dialog. The button's text is set to <em>text</em>.
396<p> The Defaults button should set the dialog (but not the application)
397back to the application defaults.
398<p> When Defaults is clicked, the <a href="#defaultButtonPressed">defaultButtonPressed</a>() signal is emitted.
399<p> If <em>text</em> is a
400<a href="qstring.html#operator!">null string</a>,
401no button is shown.
402<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setCancelButton">setCancelButton</a>(), and <a href="#defaultButtonPressed">defaultButtonPressed</a>().
403
404<h3 class=fn>void <a name="setDefaultButton-2"></a>QTabDialog::setDefaultButton ()
405</h3>
406This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
407<p> Adds a Defaults button to the dialog. The button's text is set to
408a localizable "Defaults".
409
410<h3 class=fn>void <a name="setFont"></a>QTabDialog::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )<tt> [virtual]</tt>
411</h3>
412Sets the font for the tabs to <em>font</em>.
413<p> If the widget is visible, the display is updated with the new font
414immediately. There may be some geometry changes, depending on the
415size of the old and new fonts.
416
417<p>Reimplemented from <a href="qwidget.html#setFont">QWidget</a>.
418<h3 class=fn>void <a name="setHelpButton"></a>QTabDialog::setHelpButton ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )
419</h3>
420Adds a Help button to the dialog. The button's text is set to <em>text</em>.
421<p> When Help is clicked, the <a href="#helpButtonPressed">helpButtonPressed</a>() signal is emitted.
422<p> If <em>text</em> is a
423<a href="qstring.html#operator!">null string</a>,
424no button is shown.
425<p> <p>See also <a href="#setApplyButton">setApplyButton</a>(), <a href="#setCancelButton">setCancelButton</a>(), and <a href="#helpButtonPressed">helpButtonPressed</a>().
426
427<h3 class=fn>void <a name="setHelpButton-2"></a>QTabDialog::setHelpButton ()
428</h3>
429This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
430<p> Adds a Help button to the dialog. The button's text is set to
431a localizable "Help".
432
433<h3 class=fn>void <a name="setOkButton"></a>QTabDialog::setOkButton ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )
434</h3>
435Adds an OK button to the dialog and sets the button's text to <em>text</em>.
436<p> When the OK button is clicked, the <a href="#applyButtonPressed">applyButtonPressed</a>() signal is emitted,
437and the current settings in the dialog box should be applied to
438the application. The dialog then closes.
439<p> If <em>text</em> is a
440<a href="qstring.html#operator!">null string</a>,
441no button is shown.
442<p> <p>See also <a href="#setCancelButton">setCancelButton</a>(), <a href="#setDefaultButton">setDefaultButton</a>(), and <a href="#applyButtonPressed">applyButtonPressed</a>().
443
444<h3 class=fn>void <a name="setOkButton-2"></a>QTabDialog::setOkButton ()
445</h3>
446This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
447<p> Adds an OK button to the dialog. The button's text is set to
448a localizable "OK".
449
450<h3 class=fn>void <a name="setTabBar"></a>QTabDialog::setTabBar ( <a href="qtabbar.html">QTabBar</a>&nbsp;*&nbsp;tb )<tt> [protected]</tt>
451</h3>
452Replaces the <a href="qtabbar.html">QTabBar</a> heading the dialog by the given tab bar, <em>tb</em>.
453Note that this must be called <em>before</em> any tabs have been added,
454or the behavior is undefined.
455<p>See also <a href="#tabBar">tabBar</a>().
456
457<h3 class=fn>void <a name="setTabEnabled"></a>QTabDialog::setTabEnabled ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, bool&nbsp;enable )
458</h3>
459If <em>enable</em> is TRUE the page <em>w</em> is enabled; otherwise <em>w</em> is
460disabled. The page's tab is redrawn appropriately.
461<p> <a href="qtabwidget.html">QTabWidget</a> uses <a href="qwidget.html#setEnabled">QWidget::setEnabled</a>() internally, rather than keeping a
462separate flag.
463<p> Note that even a disabled tab and tab page may be visible. If the
464page is already visible QTabWidget will not hide it; if all the
465pages are disabled QTabWidget will show one of them.
466<p> <p>See also <a href="#isTabEnabled">isTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
467
468<h3 class=fn>void <a name="setTabEnabled-2"></a>QTabDialog::setTabEnabled ( const&nbsp;char&nbsp;*&nbsp;name, bool&nbsp;enable )
469</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
470<p> Finds the page with object name <em>name</em>, enables/disables it
471according to the value of <em>enable</em> and redraws the page's tab
472appropriately.
473<p> QTabDialog uses <a href="qwidget.html#setEnabled">QWidget::setEnabled</a>() internally, rather than keeping a
474separate flag.
475<p> Note that even a disabled tab/page may be visible. If the page is
476already visible QTabDialog will not hide it; if all the pages
477are disabled QTabDialog will show one of them.
478<p> The object name is used (rather than the tab label) because the tab
479text may not be invariant in multi-language applications.
480<p> <p>See also <a href="#isTabEnabled">isTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
481
482<h3 class=fn>void <a name="showPage"></a>QTabDialog::showPage ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )
483</h3> Ensures that widget <em>w</em> is shown. This is mainly useful for accelerators.
484<p> <b>Warning:</b> If used carelessly, this function can easily surprise or
485confuse the user.
486<p> <p>See also <a href="qtabbar.html#currentTab-prop">QTabBar::currentTab</a>.
487
488<h3 class=fn><a href="qtabbar.html">QTabBar</a>&nbsp;* <a name="tabBar"></a>QTabDialog::tabBar () const<tt> [protected]</tt>
489</h3>
490Returns the currently set <a href="qtabbar.html">QTabBar</a>.
491<p>See also <a href="#setTabBar">setTabBar</a>().
492
493<h3 class=fn><a href="qstring.html">QString</a> <a name="tabLabel"></a>QTabDialog::tabLabel ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )
494</h3> Returns the text in the tab for page <em>w</em>.
495
496<!-- eof -->
497<hr><p>
498This file is part of the <a href="index.html">Qt toolkit</a>.
499Copyright &copy; 1995-2007
500<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
501<table width=100% cellspacing=0 border=0><tr>
502<td>Copyright &copy; 2007
503<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
504<td align=right><div align=right>Qt 3.3.8</div>
505</table></div></address></body>
506</html>
Note: See TracBrowser for help on using the repository browser.