1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QTabDialog 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: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center>QTabDialog Class Reference</h1><br clear="all">
<p>
The QTabDialog class provides a stack of tabbed widgets.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qtabdialog-h.html">qtabdialog.h</a>></code>
<p>
Inherits <a href="qdialog.html">QDialog</a>.
<p><a href="qtabdialog-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><a href="#33f89e"><b>QTabDialog</b></a>(QWidget*parent=0, constchar*name=0, boolmodal=FALSE, WFlagsf=0)</div>
<li><div class="fn"><a href="#026f5d"><b>~QTabDialog</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#632ea3"><b>setFont</b></a>(constQFont&font)</div>
<li><div class="fn">void<a href="#74f2ce"><b>addTab</b></a>(QWidget*, constQString&)</div>
<li><div class="fn">void<a href="#193b2b"><b>addTab</b></a>(QWidget*child, constQIconSet&iconset, constQString&label)</div>
<li><div class="fn">void<a href="#7430da"><b>addTab</b></a>(QWidget*, QTab*)</div>
<li><div class="fn">void<a href="#dc0940"><b>insertTab</b></a>(QWidget*, constQString&, intindex=-1)</div>
<li><div class="fn">void<a href="#4b21b5"><b>insertTab</b></a>(QWidget*child, constQIconSet&iconset, constQString&label, intindex=-1)</div>
<li><div class="fn">void<a href="#bf4c79"><b>insertTab</b></a>(QWidget*, QTab*, intindex=-1)</div>
<li><div class="fn">void<a href="#dfac34"><b>changeTab</b></a>(QWidget*, constQString&)</div>
<li><div class="fn">void<a href="#ad8370"><b>changeTab</b></a>(QWidget*child, constQIconSet&iconset, constQString&label)</div>
<li><div class="fn">bool<a href="#0982a9"><b>isTabEnabled</b></a>(QWidget*)const</div>
<li><div class="fn">void<a href="#2eb676"><b>setTabEnabled</b></a>(QWidget*, bool)</div>
<li><div class="fn">boolisTabEnabled(constchar*)const<em>(obsolete)</em></div>
<li><div class="fn">voidsetTabEnabled(constchar*, bool)<em>(obsolete)</em></div>
<li><div class="fn">void<a href="#120e0c"><b>showPage</b></a>(QWidget*)</div>
<li><div class="fn">void<a href="#aa2b1a"><b>removePage</b></a>(QWidget*)</div>
<li><div class="fn">QString<a href="#c9a7fd"><b>tabLabel</b></a>(QWidget*)</div>
<li><div class="fn">QWidget*<a href="#d3dfea"><b>currentPage</b></a>()const</div>
<li><div class="fn">void<a href="#95ea78"><b>setDefaultButton</b></a>(constQString&text)</div>
<li><div class="fn">void<a href="#13066f"><b>setDefaultButton</b></a>()</div>
<li><div class="fn">bool<a href="#ae19ce"><b>hasDefaultButton</b></a>()const</div>
<li><div class="fn">void<a href="#5380da"><b>setHelpButton</b></a>(constQString&text)</div>
<li><div class="fn">void<a href="#164267"><b>setHelpButton</b></a>()</div>
<li><div class="fn">bool<a href="#6c4ad3"><b>hasHelpButton</b></a>()const</div>
<li><div class="fn">void<a href="#3ca594"><b>setCancelButton</b></a>(constQString&text)</div>
<li><div class="fn">void<a href="#d664dc"><b>setCancelButton</b></a>()</div>
<li><div class="fn">bool<a href="#967ad3"><b>hasCancelButton</b></a>()const</div>
<li><div class="fn">void<a href="#6295a7"><b>setApplyButton</b></a>(constQString&text)</div>
<li><div class="fn">void<a href="#7511c7"><b>setApplyButton</b></a>()</div>
<li><div class="fn">bool<a href="#e23a4e"><b>hasApplyButton</b></a>()const</div>
<li><div class="fn">void<a href="#240b7c"><b>setOkButton</b></a>(constQString&text)</div>
<li><div class="fn">void<a href="#37815b"><b>setOkButton</b></a>()</div>
<li><div class="fn">bool<a href="#9413cf"><b>hasOkButton</b></a>()const</div>
</ul>
<h2>Signals</h2>
<ul>
<li><div class="fn">void<a href="#46a10a"><b>aboutToShow</b></a>()</div>
<li><div class="fn">void<a href="#7ccecd"><b>applyButtonPressed</b></a>()</div>
<li><div class="fn">void<a href="#466766"><b>cancelButtonPressed</b></a>()</div>
<li><div class="fn">void<a href="#ff00e5"><b>defaultButtonPressed</b></a>()</div>
<li><div class="fn">void<a href="#661457"><b>helpButtonPressed</b></a>()</div>
<li><div class="fn">void<a href="#edcfe8"><b>currentChanged</b></a>(QWidget*)</div>
<li><div class="fn">voidselected(constQString&)<em>(obsolete)</em></div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn">void<a href="#b6a5a0"><b>setTabBar</b></a>(QTabBar*)</div>
<li><div class="fn">QTabBar*<a href="#6c3219"><b>tabBar</b></a>()const</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QTabDialog class provides a stack of tabbed widgets.
<p>
A tabbed dialog is one in which several "pages" are available, and
the user selects which page to see and use by clicking on its tab,
or by pressing the indicated Alt-(letter) key combination.
<p>QTabDialog does not provide more than one row of tabs, and does not
provide tabs along the sides or bottom of the pages. It also does
not offer any way to find out which page is currently visible or to
set the visible page.
<p>QTabDialog provides an OK button and optionally Apply, Cancel,
Defaults, and Help buttons.
<p>The normal way to use QTabDialog is to do the following in the
constructor: <ol> <li> Create a QTabDialog. <li> Create a <a href="qwidget.html">QWidget</a>
for each of the pages in the tab dialog, insert children into it,
set up geometry management for it, and use <a href="#193b2b">addTab</a>() to set up a tab
and keyboard accelerator for it. <li> Set up the buttons for the tab
dialog (Apply, Cancel and so on). <li> Connect to the
signals and slots. </ol>
<p>If you don't call addTab(), the page you have created will not be
visible. Please don't confuse the object name you supply to the
QWidget constructor and the tab label you supply to addTab():
addTab() takes a name which indicates an accelerator and is
meaningful and descriptive to the user, while the widget name is
used primarily for debugging.
<p>Almost all applications have to connect the <a href="#7ccecd">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="#466766">cancelButtonPressed</a>() is emitted when the user clicks Cancel. <li>
<a href="#ff00e5">defaultButtonPressed</a>() is emitted when the user clicks Defaults;
<li>
<a href="#661457">helpButtonPressed</a>() is emitted when the user clicks Help;
the
slot it is connected to should reset the state of the dialog to the
application defaults. <li> <a href="#46a10a">aboutToShow</a>() is emitted at the start of
<a href="#46b852">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 it show()
is called, you must connect this signal to a slot which resets the
state of the dialog. <li> <a href="#edcfe8">currentChanged</a>() is emitted when the user
selects some page. </ul>
<p>Each tab is either enabled or disabled at any given time. 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 can not select that tab. Note that even though a tab
is disabled, the page can still be visible, for example if all of
the tabs happen to be disabled.
<p>While tab dialogs can be a very good way to split up a complex
dialog, it's also very easy to make a royal mess out of a tab
dialog. Here is some advice. For more, see e.g. the <a
href="http://world.std.com/~uieweb/tabbed.htm">UIE web page on tab
dialogs.</a>
<p><ol><li> Make sure that each page forms a logical whole which is
adequately described by the label on the tab.
<p>If two related functions are on different pages, users will often
not find one of the functions, or will spend far too long searching
for it.
<li> Do not join several independent dialogs into one tab dialog.
Several aspects of one complex dialog is acceptable (such as the
various aspects of "preferences") but a tab dialog is no substitute
for a pop-up menu leading to several smaller dialogs.
<p>The OK button (and the other buttons) apply to the <em>entire</em> dialog.
If the tab dialog is really several independent smaller dialogs,
users often press Cancel to cancel just the changes he/she has made
on the current page: Many users will treat that page as independent
of the other pages.
<li> Do not use tab dialogs for frequent operations. The tab dialog
is probably the most complex widget in common use at the moment, and
subjecting the user to this complexity during his/her normal use of
your application is most often a bad idea.
<p>The tab dialog is good for complex operations which have to be
performed seldom, like Preferences dialogs. Not for common
operations, like setting left/right alignment in a word processor.
(Often, these common operations are actually independent dialogs and
should be treated as such.)
<p>The tab dialog is not a navigational aid, it is an organizational
aid. It is a good way to organize aspects of a complex operation
(such as setting up caching and proxies in a web browser), but a bad
way to navigate towards a simple operation (such as emptying the
cache in a web browser - emptying the cache is <em>not</em> part of
setting up the cache, it is a separate and independent operation).
<li> The changes should take effect when the user presses Apply or
OK. Not before.
<p>Providing Apply, Cancel or OK buttons on the individual pages is
likely to weaken the users' mental model of how tab dialogs work.
If you think a page needs its own buttons, consider making it a
separate dialog.
<li> There should be no implicit ordering of the pages. If there
is, it is probably better to use a wizard dialog.
<p>If some of the pages seem to be ordered and others not, perhaps they
ought not to be joined in a tab dialog.
<p></ol>
<p>Most of the functionality in QTabDialog is provided by a <a href="qtabwidget.html">QTabWidget</a>.
<p><img src=qtabdlg-m.png> <img src=qtabdlg-w.png>
<p>See also <a href="qdialog.html">QDialog</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="33f89e"></a>QTabDialog::QTabDialog(<a href="qwidget.html">QWidget</a>*parent=0, constchar*name=0, boolmodal=FALSE, WFlagsf=0)</h3>
<p>Constructs a QTabDialog with only an Ok button.
<h3 class="fn"><a name="026f5d"></a>QTabDialog::~QTabDialog()</h3>
<p>Destructs the tab dialog.
<h3 class="fn">void<a name="46a10a"></a>QTabDialog::aboutToShow() <code>[signal]</code></h3>
<p>This signal is emitted by <a href="#46b852">show</a>() when it's time to set the state of
the dialog's contents. The dialog should reflect the current state
of the application when if appears; if there is any chance that the
state of the application can change between the time you call
<a href="#33f89e">QTabDialog::QTabDialog</a>() and <a href="#46b852">QTabDialog::show</a>(), you should set the
dialog's state in a slot and connect this signal to it.
<p>This applies mainly to QTabDialog objects that are kept around
hidden rather than being created, show()<a href="n.html">n</a> and deleted afterwards.
<p>See also <a href="#7ccecd">applyButtonPressed</a>(), <a href="#46b852">show</a>() and <a href="#466766">cancelButtonPressed</a>().
<h3 class="fn">void<a name="7430da"></a>QTabDialog::addTab(<a href="qwidget.html">QWidget</a>*child, <a href="qtab.html">QTab</a>*tab)</h3>
<p>This is a lower-level method for adding tabs, similar to the other
<a href="#193b2b">addTab</a>() method. It is useful if you are using <a href="#b6a5a0">setTabBar</a>() to set a
<a href="qtabbar.html">QTabBar</a> subclass with an overridden <a href="qtabbar.html#cc2aeb">QTabBar::paint</a>() routine for a
subclass of <a href="qtab.html">QTab</a>.
<h3 class="fn">void<a name="193b2b"></a>QTabDialog::addTab(<a href="qwidget.html">QWidget</a>*child, const<a href="qiconset.html">QIconSet</a>&iconset, const<a href="qstring.html">QString</a>&label)</h3>
<p>Adds another tab and page to the tab view.
<p>This function is the same as addTab() but with an additional
iconset.
<h3 class="fn">void<a name="74f2ce"></a>QTabDialog::addTab(<a href="qwidget.html">QWidget</a>*child, const<a href="qstring.html">QString</a>&label)</h3>
<p>Adds another tab and page to the tab view.
<p>The tab will be labelled <em>label</em> and <em>child</em> constitutes the new
page. Note the difference between the widget name (which you supply
to widget constructors and to e.g. <a href="#2eb676">setTabEnabled</a>()) and the tab
label: The name is internal to the program and invariant, while the
label is shown on screen and may vary according to e.g. language.
<p><em>label</em> is written in the <a href="qbutton.html">QButton</a> style, where &P makes Qt create
an accelerator key on Alt-P for this page. For example:
<p><pre> td->addTab( graphicsPane, "&Graphics" );
td->addTab( soundPane, "&Sound" );
</pre>
<p>If the user presses Alt-S the sound page of the tab dialog is shown,
if the user presses Alt-P the graphics page is shown.
<p>If you call <a href="#193b2b">addTab</a>() after <a href="#46b852">show</a>(), the screen will flicker and the
user will be confused.
<h3 class="fn">void<a name="7ccecd"></a>QTabDialog::applyButtonPressed() <code>[signal]</code></h3>
<p>This signal is emitted when the Apply or OK buttons are clicked.
<p>It should be connected to a slot (or several slots) which change the
application's state according to the state of the dialog.
<p>See also <a href="#466766">cancelButtonPressed</a>(), <a href="#ff00e5">defaultButtonPressed</a>() and <a href="#6295a7">setApplyButton</a>().
<h3 class="fn">void<a name="466766"></a>QTabDialog::cancelButtonPressed() <code>[signal]</code></h3>
<p>This signal is emitted when the Cancel button is clicked. It is
automatically connected to <a href="qdialog.html#604679">QDialog::reject</a>(), which will hide the
dialog.
<p>The Cancel button should not change the application's state in any
way, so generally you should not need to connect it to any slot.
<p>See also <a href="#7ccecd">applyButtonPressed</a>(), <a href="#ff00e5">defaultButtonPressed</a>() and <a href="#3ca594">setCancelButton</a>().
<h3 class="fn">void<a name="ad8370"></a>QTabDialog::changeTab(<a href="qwidget.html">QWidget</a>*w, const<a href="qiconset.html">QIconSet</a>&iconset, const<a href="qstring.html">QString</a>&label)</h3>
<p>Defines a new <em>iconset</em> and a new <em>label</em> for the tab of page <em>w</em>
<h3 class="fn">void<a name="dfac34"></a>QTabDialog::changeTab(<a href="qwidget.html">QWidget</a>*w, const<a href="qstring.html">QString</a>&label)</h3>
<p>Defines a new <em>label</em> for the tab of page <em>w</em>
<h3 class="fn">void<a name="edcfe8"></a>QTabDialog::currentChanged(<a href="qwidget.html">QWidget</a>*) <code>[signal]</code></h3>
<p>This signal is emitted whenever the current page changes.
<p>See also <a href="#d3dfea">currentPage</a>(), <a href="#120e0c">showPage</a>() and <a href="#c9a7fd">tabLabel</a>().
<h3 class="fn"><a href="qwidget.html">QWidget</a>*<a name="d3dfea"></a>QTabDialog::currentPage()const</h3>
<p>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="ff00e5"></a>QTabDialog::defaultButtonPressed() <code>[signal]</code></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>See also <a href="#7ccecd">applyButtonPressed</a>(), <a href="#466766">cancelButtonPressed</a>() and <a href="#13066f">setDefaultButton</a>().
<h3 class="fn">bool<a name="e23a4e"></a>QTabDialog::hasApplyButton()const</h3>
<p>Returns TRUE if the tab dialog has an Apply button, FALSE if not.
<p>See also <a href="#6295a7">setApplyButton</a>(), <a href="#7ccecd">applyButtonPressed</a>(), <a href="#967ad3">hasCancelButton</a>() and <a href="#ae19ce">hasDefaultButton</a>().
<h3 class="fn">bool<a name="967ad3"></a>QTabDialog::hasCancelButton()const</h3>
<p>Returns TRUE if the tab dialog has a Cancel button, FALSE if not.
<p>See also <a href="#3ca594">setCancelButton</a>(), <a href="#466766">cancelButtonPressed</a>(), <a href="#e23a4e">hasApplyButton</a>() and <a href="#ae19ce">hasDefaultButton</a>().
<h3 class="fn">bool<a name="ae19ce"></a>QTabDialog::hasDefaultButton()const</h3>
<p>Returns TRUE if the tab dialog has a Defaults button, FALSE if not.
<p>See also <a href="#13066f">setDefaultButton</a>(), <a href="#ff00e5">defaultButtonPressed</a>(), <a href="#e23a4e">hasApplyButton</a>() and <a href="#967ad3">hasCancelButton</a>().
<h3 class="fn">bool<a name="6c4ad3"></a>QTabDialog::hasHelpButton()const</h3>
<p>Returns TRUE if the tab dialog has a Help button, FALSE if not.
<p>See also <a href="#164267">setHelpButton</a>(), <a href="#661457">helpButtonPressed</a>(), <a href="#e23a4e">hasApplyButton</a>() and <a href="#967ad3">hasCancelButton</a>().
<h3 class="fn">bool<a name="9413cf"></a>QTabDialog::hasOkButton()const</h3>
<p>Returns TRUE if the tab dialog has an OK button, FALSE if not.
<p>See also <a href="#240b7c">setOkButton</a>(), <a href="#e23a4e">hasApplyButton</a>(), <a href="#967ad3">hasCancelButton</a>() and <a href="#ae19ce">hasDefaultButton</a>().
<h3 class="fn">void<a name="661457"></a>QTabDialog::helpButtonPressed() <code>[signal]</code></h3>
<p>This signal is emitted when the Help button is pressed. It
should give instructions about how to use the dialog.
<p>See also <a href="#7ccecd">applyButtonPressed</a>(), <a href="#466766">cancelButtonPressed</a>() and <a href="#164267">setHelpButton</a>().
<h3 class="fn">void<a name="bf4c79"></a>QTabDialog::insertTab(<a href="qwidget.html">QWidget</a>*child, <a href="qtab.html">QTab</a>*tab, intindex=-1)</h3>
<p>This is a lower-level method for inserting tabs, similar to the other
<a href="#4b21b5">insertTab</a>() method. It is useful if you are using <a href="#b6a5a0">setTabBar</a>() to set a
<a href="qtabbar.html">QTabBar</a> subclass with an overridden <a href="qtabbar.html#cc2aeb">QTabBar::paint</a>() routine for a
subclass of <a href="qtab.html">QTab</a>.
<h3 class="fn">void<a name="4b21b5"></a>QTabDialog::insertTab(<a href="qwidget.html">QWidget</a>*child, const<a href="qiconset.html">QIconSet</a>&iconset, const<a href="qstring.html">QString</a>&label, intindex=-1)</h3>
<p>Inserts another tab and page to the tab view.
<p>This function is the same as insertTab() but with an additional
iconset.
<h3 class="fn">void<a name="dc0940"></a>QTabDialog::insertTab(<a href="qwidget.html">QWidget</a>*child, const<a href="qstring.html">QString</a>&label, intindex=-1)</h3>
<p>Inserts another tab and page to the tab view.
<p>The tab will be labelled <em>label</em> and <em>child</em> constitutes the new
page. Note the difference between the widget name (which you supply
to widget constructors and to e.g. <a href="#2eb676">setTabEnabled</a>()) and the tab
label: The name is internal to the program and invariant, while the
label is shown on screen and may vary according to e.g. language.
<p><em>label</em> is written in the <a href="qbutton.html">QButton</a> style, where &P makes Qt create
an accelerator key on Alt-P for this page. For example:
<p><pre> td->insertTab( graphicsPane, "&Graphics" );
td->insertTab( soundPane, "&Sound" );
</pre>
<p>If <em>index</em> is not specified, the tab is simply added. Otherwise
it's inserted at the specified position.
<p>If the user presses Alt-S the sound page of the tab dialog is shown,
if the user presses Alt-P the graphics page is shown.
<p>If you call <a href="#4b21b5">insertTab</a>() after <a href="#46b852">show</a>(), the screen will flicker and the
user will be confused.
<h3 class="fn">bool<a name="0982a9"></a>QTabDialog::isTabEnabled(<a href="qwidget.html">QWidget</a>*w)const</h3>
<p>Returns TRUE if the page <em>w</em> is enabled, and
false if it is disabled.
<p>See also <a href="#2eb676">setTabEnabled</a>() and <a href="qwidget.html#f9af61">QWidget::isEnabled</a>().
<h3 class="fn">bool<a name="c090cd"></a>QTabDialog::isTabEnabled(constchar*name)const</h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of Qt. 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="#0982a9">isTabEnabled</a>()
returns FALSE.
<p>See also <a href="#2eb676">setTabEnabled</a>() and <a href="qwidget.html#f9af61">QWidget::isEnabled</a>().
<h3 class="fn">void<a name="0da949"></a>QTabDialog::paintEvent(<a href="qpaintevent.html">QPaintEvent</a>*) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#e3d821">QWidget.</a>
<h3 class="fn">void<a name="aa2b1a"></a>QTabDialog::removePage(<a href="qwidget.html">QWidget</a>*w)</h3>
<p>Removes page <em>w</em> from this stack of widgets. Does not
delete <em>w.</em>
<p>See also <a href="#120e0c">showPage</a>(), <a href="qtabwidget.html#e6bb7c">QTabWidget::removePage</a>() and <a href="qwidgetstack.html#69ed68">QWidgetStack::removeWidget</a>().
<h3 class="fn">void<a name="d1aeb0"></a>QTabDialog::resizeEvent(<a href="qresizeevent.html">QResizeEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#7d375f">QWidget.</a>
<h3 class="fn">void<a name="bb38cb"></a>QTabDialog::selected(const<a href="qstring.html">QString</a>&tabLabel) <code>[signal]</code></h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code.<p>
<p>This signal is emitted whenever a tab is selected (raised),
including during the first <a href="#46b852">show</a>().
<p>See also <a href="qwidget.html#4c1b49">raise</a>().
<h3 class="fn">void<a name="7511c7"></a>QTabDialog::setApplyButton()</h3>
<p>Adds an Apply button to the dialog. The button's text is set to
a localizable "Apply".
<h3 class="fn">void<a name="6295a7"></a>QTabDialog::setApplyButton(const<a href="qstring.html">QString</a>&text)</h3>
<p>Add 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="#7ccecd">applyButtonPressed</a>() signal is emitted.
<p>See also <a href="#3ca594">setCancelButton</a>(), <a href="#13066f">setDefaultButton</a>() and <a href="#7ccecd">applyButtonPressed</a>().
<h3 class="fn">void<a name="d664dc"></a>QTabDialog::setCancelButton()</h3>
<p>Adds a Cancel button to the dialog. The button's text is set to
a localizable "Cancel".
<h3 class="fn">void<a name="3ca594"></a>QTabDialog::setCancelButton(const<a href="qstring.html">QString</a>&text)</h3>
<p>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 the the state immediately after the last Apply.
<p>When Cancel is clicked, the <a href="#466766">cancelButtonPressed</a>() signal is emitted.
The dialog is closed at the same time.
<p>If <em>text</em> is a
<a href="qstring.html#e21796">null string</a>,
no button is shown.
<p>See also <a href="#6295a7">setApplyButton</a>(), <a href="#13066f">setDefaultButton</a>() and <a href="#466766">cancelButtonPressed</a>().
<h3 class="fn">void<a name="13066f"></a>QTabDialog::setDefaultButton()</h3>
<p>Adds a Defaults button to the dialog. The button's text is set to
a localizable "Defaults".
<h3 class="fn">void<a name="95ea78"></a>QTabDialog::setDefaultButton(const<a href="qstring.html">QString</a>&text)</h3>
<p>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="#ff00e5">defaultButtonPressed</a>() signal is emitted.
<p>If <em>text</em> is a
<a href="qstring.html#e21796">null string</a>,
no button is shown.
<p>See also <a href="#6295a7">setApplyButton</a>(), <a href="#3ca594">setCancelButton</a>() and <a href="#ff00e5">defaultButtonPressed</a>().
<h3 class="fn">void<a name="632ea3"></a>QTabDialog::setFont(const<a href="qfont.html">QFont</a>&font) <code>[virtual]</code></h3>
<p>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="qwidget.html#c52788">QWidget.</a>
<h3 class="fn">void<a name="164267"></a>QTabDialog::setHelpButton()</h3>
<p>Adds a Help button to the dialog. The button's text is set to
a localizable "Help".
<h3 class="fn">void<a name="5380da"></a>QTabDialog::setHelpButton(const<a href="qstring.html">QString</a>&text)</h3>
<p>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="#661457">helpButtonPressed</a>() signal is emitted.
<p>If <em>text</em> is a
<a href="qstring.html#e21796">null string</a>,
no button is shown.
<p>See also <a href="#6295a7">setApplyButton</a>(), <a href="#3ca594">setCancelButton</a>() and <a href="#661457">helpButtonPressed</a>().
<h3 class="fn">void<a name="37815b"></a>QTabDialog::setOkButton()</h3>
<p>Adds an OK to the dialog. The button's text is set to
a localizable "OK".
<h3 class="fn">void<a name="240b7c"></a>QTabDialog::setOkButton(const<a href="qstring.html">QString</a>&text)</h3>
<p>Set the OK button's text to <em>text.</em>
<p>When the OK button is clicked, the <a href="#7ccecd">applyButtonPressed</a>() signal is emitted,
and the current settings in the dialog box should be applied to
the application. Then the dialog closes.
<p>If <em>text</em> is a
<a href="qstring.html#e21796">null string</a>,
no button is shown.
<p>See also <a href="#3ca594">setCancelButton</a>(), <a href="#13066f">setDefaultButton</a>() and <a href="#7ccecd">applyButtonPressed</a>().
<h3 class="fn">void<a name="b6a5a0"></a>QTabDialog::setTabBar(<a href="qtabbar.html">QTabBar</a>*tb) <code>[protected]</code></h3>
<p>Replaces the <a href="qtabbar.html">QTabBar</a> heading the dialog by the given tab bar.
Note that this must be called <em>before</em> any tabs have been added,
or the behavior is undefined.
<p>See also <a href="#6c3219">tabBar</a>().
<h3 class="fn">void<a name="2eb676"></a>QTabDialog::setTabEnabled(<a href="qwidget.html">QWidget</a>*w, boolenable)</h3>
<p>Enables/disables page <em>w</em> according to the value of <em>enable,</em> and
redraws the page's tab appropriately.
<p><a href="qtabwidget.html">QTabWidget</a> uses <a href="qwidget.html#4b103c">QWidget::setEnabled</a>() internally, rather than keep a
separate flag.
<p>Note that even a disabled tab/page may be visible. If the page is
visible already, QTabWidget will not hide it, and if all the pages
are disabled, QTabWidget will show one of them.
<p>See also <a href="#0982a9">isTabEnabled</a>() and <a href="qwidget.html#4b103c">QWidget::setEnabled</a>().
<h3 class="fn">void<a name="ae8c84"></a>QTabDialog::setTabEnabled(constchar*name, boolenable)</h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code.<p>
<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>QTabDialog uses <a href="qwidget.html#4b103c">QWidget::setEnabled</a>() internally, rather than keep a
separate flag.
<p>Note that even a disabled tab/page may be visible. If the page is
visible already, QTabDialog will not hide it, and if all the pages
are disabled, QTabDialog 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>See also <a href="#0982a9">isTabEnabled</a>() and <a href="qwidget.html#4b103c">QWidget::setEnabled</a>().
<h3 class="fn">void<a name="46b852"></a>QTabDialog::show() <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Examples:
<a href="tabdialog-main-cpp.html#show">tabdialog/main.cpp</a>
<p>Reimplemented from <a href="qwidget.html#200ee5">QWidget.</a>
<h3 class="fn">void<a name="120e0c"></a>QTabDialog::showPage(<a href="qwidget.html">QWidget</a>*w)</h3>
<p>Ensures that <em>w</em> is shown. This is useful mainly for accelerators.<p><b>Warning:</b> Used carelessly, this function can easily surprise or
confuse the user.
<p>See also <a href="qtabbar.html#23184d">QTabBar::setCurrentTab</a>().
<h3 class="fn">void<a name="f110be"></a>QTabDialog::styleChange(<a href="qstyle.html">QStyle</a>&s) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#5e2e23">QWidget.</a>
<h3 class="fn"><a href="qtabbar.html">QTabBar</a>*<a name="6c3219"></a>QTabDialog::tabBar()const <code>[protected]</code></h3>
<p>Returns the currently set <a href="qtabbar.html">QTabBar</a>.
<p>See also <a href="#b6a5a0">setTabBar</a>().
<h3 class="fn"><a href="qstring.html">QString</a><a name="c9a7fd"></a>QTabDialog::tabLabel(<a href="qwidget.html">QWidget</a>*w)</h3>
<p>Returns the text in the tab for page <em>w.</em>
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright © 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 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|