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"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { 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 Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main 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 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 <<a href="qtabdialog-h.html">qtabdialog.h</a>></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 * parent = 0, const char * name = 0, bool modal = FALSE, WFlags 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 QFont & font )</li>
|
---|
44 | <li class=fn>void <a href="#addTab"><b>addTab</b></a> ( QWidget * child, const QString & label )</li>
|
---|
45 | <li class=fn>void <a href="#addTab-2"><b>addTab</b></a> ( QWidget * child, const QIconSet & iconset, const QString & label )</li>
|
---|
46 | <li class=fn>void <a href="#addTab-3"><b>addTab</b></a> ( QWidget * child, QTab * tab )</li>
|
---|
47 | <li class=fn>void <a href="#insertTab"><b>insertTab</b></a> ( QWidget * child, const QString & label, int index = -1 )</li>
|
---|
48 | <li class=fn>void <a href="#insertTab-2"><b>insertTab</b></a> ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 )</li>
|
---|
49 | <li class=fn>void <a href="#insertTab-3"><b>insertTab</b></a> ( QWidget * child, QTab * tab, int index = -1 )</li>
|
---|
50 | <li class=fn>void <a href="#changeTab-2"><b>changeTab</b></a> ( QWidget * w, const QString & label )</li>
|
---|
51 | <li class=fn>void <a href="#changeTab"><b>changeTab</b></a> ( QWidget * w, const QIconSet & iconset, const QString & label )</li>
|
---|
52 | <li class=fn>bool <a href="#isTabEnabled"><b>isTabEnabled</b></a> ( QWidget * w ) const</li>
|
---|
53 | <li class=fn>void <a href="#setTabEnabled"><b>setTabEnabled</b></a> ( QWidget * w, bool enable )</li>
|
---|
54 | <li class=fn>bool isTabEnabled ( const char * name ) const <em>(obsolete)</em></li>
|
---|
55 | <li class=fn>void setTabEnabled ( const char * name, bool enable ) <em>(obsolete)</em></li>
|
---|
56 | <li class=fn>void <a href="#showPage"><b>showPage</b></a> ( QWidget * w )</li>
|
---|
57 | <li class=fn>void <a href="#removePage"><b>removePage</b></a> ( QWidget * w )</li>
|
---|
58 | <li class=fn>QString <a href="#tabLabel"><b>tabLabel</b></a> ( QWidget * 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 QString & 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 QString & 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 QString & 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 QString & 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 QString & 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 & ) <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 * 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.
|
---|
98 | By clicking on a tab page's tab or by pressing the indicated
|
---|
99 | Alt+<em>letter</em> key combination, the user can select which tab page
|
---|
100 | they want to use.
|
---|
101 | <p> QTabDialog provides a tab bar consisting of single row of tabs at
|
---|
102 | the top; each tab has an associated widget which is that tab's
|
---|
103 | tab page. In addition, QTabDialog provides an OK button and the
|
---|
104 | following optional buttons: Apply, Cancel, Defaults and Help.
|
---|
105 | <p> The normal way to use QTabDialog is to do the following in the
|
---|
106 | constructor:
|
---|
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
|
---|
110 | children 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
|
---|
112 | for 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
|
---|
119 | visible. Don't confuse the object name you supply to the
|
---|
120 | QWidget constructor and the tab label you supply to addTab();
|
---|
121 | addTab() takes user-visible name that appears on the widget's tab
|
---|
122 | and may identify an accelerator, whereas the widget name is used
|
---|
123 | primarily for debugging.
|
---|
124 | <p> Almost all applications have to connect the <a href="#applyButtonPressed">applyButtonPressed</a>()
|
---|
125 | signal to something. applyButtonPressed() is emitted when either OK
|
---|
126 | or Apply is clicked, and your slot must copy the dialog's state into
|
---|
127 | the 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;
|
---|
132 | the slot it is connected to should reset the state of the dialog to
|
---|
133 | the 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
|
---|
136 | chance that the state of the application may change between the
|
---|
137 | creation of the tab dialog and the time show() is called, you must
|
---|
138 | connect 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
|
---|
143 | black and the user can select that tab. If it is disabled the tab
|
---|
144 | is drawn in a different way and the user cannot select that tab.
|
---|
145 | Note that even if a tab is disabled, the page can still be visible;
|
---|
146 | for 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
|
---|
148 | page can be removed with <a href="#removePage">removePage</a>() and shown with <a href="#showPage">showPage</a>(). The
|
---|
149 | current page is given by <a href="#currentPage">currentPage</a>().
|
---|
150 | <p> QTabDialog does not support tabs on the sides or bottom, nor can
|
---|
151 | you set or retrieve the visible page. If you need more functionality
|
---|
152 | than 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> * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )
|
---|
160 | </h3>
|
---|
161 | Constructs a QTabDialog with only an OK button.
|
---|
162 | The <em>parent</em>, <em>name</em>, <em>modal</em> and <a href="qt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments
|
---|
163 | are passed on to the <a href="qdialog.html">QDialog</a> constructor.
|
---|
164 |
|
---|
165 | <h3 class=fn><a name="~QTabDialog"></a>QTabDialog::~QTabDialog ()
|
---|
166 | </h3>
|
---|
167 | Destroys 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
|
---|
173 | the dialog's contents. The dialog should reflect the current state
|
---|
174 | of the application when it appears; if there is any possibility that
|
---|
175 | the 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
|
---|
177 | dialog's state in a slot and connect this signal to it.
|
---|
178 | <p> This applies mainly to QTabDialog objects that are kept around
|
---|
179 | hidden, 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> * child, const <a href="qstring.html">QString</a> & label )
|
---|
183 | </h3>
|
---|
184 | Adds 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>.
|
---|
186 | Note the difference between the widget name (which you supply to
|
---|
187 | widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
|
---|
188 | label. The name is internal to the program and invariant, whereas
|
---|
189 | the label is shown on-screen and may vary according to language and
|
---|
190 | other factors.
|
---|
191 | <p> If the tab's <em>label</em> contains an ampersand, the letter following
|
---|
192 | the ampersand is used as an accelerator for the tab, e.g. if the
|
---|
193 | label is "Bro&wse" then Alt+W becomes an accelerator which will
|
---|
194 | move 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
|
---|
196 | user 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> * child, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & 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> * child, <a href="qtab.html">QTab</a> * tab )
|
---|
204 | </h3>
|
---|
205 | This 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
|
---|
209 | subclass 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
|
---|
211 | label 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
|
---|
218 | application'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
|
---|
225 | automatically connected to <a href="qdialog.html#reject">QDialog::reject</a>(), which will hide the
|
---|
226 | dialog.
|
---|
227 | <p> The Cancel button should not change the application's state at all,
|
---|
228 | so 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> * w, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & label )
|
---|
232 | </h3>
|
---|
233 | Changes 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> * w, const <a href="qstring.html">QString</a> & label )
|
---|
236 | </h3>
|
---|
237 | This 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> * )<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> * <a name="currentPage"></a>QTabDialog::currentPage () const
|
---|
246 | </h3> Returns a pointer to the page currently being displayed by the
|
---|
247 | tab dialog. The tab dialog does its best to make sure that this value
|
---|
248 | is 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
|
---|
254 | should reset the dialog (but not the application) to the "factory
|
---|
255 | defaults".
|
---|
256 | <p> The application's state should not be changed until the user clicks
|
---|
257 | Apply 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>
|
---|
262 | Returns TRUE if the tab dialog has an Apply button; otherwise
|
---|
263 | returns 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>
|
---|
268 | Returns TRUE if the tab dialog has a Cancel button; otherwise
|
---|
269 | returns 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>
|
---|
274 | Returns TRUE if the tab dialog has a Defaults button; otherwise
|
---|
275 | returns 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>
|
---|
280 | Returns TRUE if the tab dialog has a Help button; otherwise returns
|
---|
281 | FALSE.
|
---|
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>
|
---|
286 | Returns TRUE if the tab dialog has an OK button; otherwise returns
|
---|
287 | FALSE.
|
---|
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
|
---|
294 | could 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> * child, const <a href="qstring.html">QString</a> & label, int index = -1 )
|
---|
298 | </h3>
|
---|
299 | Inserts 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>.
|
---|
301 | Note the difference between the widget name (which you supply to
|
---|
302 | widget constructors and to <a href="#setTabEnabled">setTabEnabled</a>(), for example) and the tab
|
---|
303 | label. The name is internal to the program and invariant, whereas
|
---|
304 | the label is shown on-screen and may vary according to language and
|
---|
305 | other factors.
|
---|
306 | <p> If the tab's <em>label</em> contains an ampersand, the letter following
|
---|
307 | the ampersand is used as an accelerator for the tab, e.g. if the
|
---|
308 | label is "Bro&wse" then Alt+W becomes an accelerator which will
|
---|
309 | move the focus to this tab.
|
---|
310 | <p> If <em>index</em> is not specified, the tab is simply added. Otherwise
|
---|
311 | it 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
|
---|
313 | user 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> * child, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & label, int 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> * child, <a href="qtab.html">QTab</a> * tab, int index = -1 )
|
---|
321 | </h3>
|
---|
322 | This 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
|
---|
326 | subclass 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
|
---|
328 | label or an icon that identifies the tab page. The <em>index</em> is the
|
---|
329 | position 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> * w ) const
|
---|
332 | </h3>
|
---|
333 | Returns 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 char * 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
|
---|
339 | FALSE 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>()
|
---|
341 | returns 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> * w )
|
---|
345 | </h3> Removes page <em>w</em> from this stack of widgets. Does not
|
---|
346 | delete <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 <a href="qstring.html">QString</a> & )<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),
|
---|
354 | including 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 <a href="qstring.html">QString</a> & text )
|
---|
358 | </h3>
|
---|
359 | Adds 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
|
---|
361 | to 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>,
|
---|
365 | no 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>
|
---|
370 | This 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
|
---|
372 | a localizable "Apply".
|
---|
373 |
|
---|
374 | <h3 class=fn>void <a name="setCancelButton"></a>QTabDialog::setCancelButton ( const <a href="qstring.html">QString</a> & text )
|
---|
375 | </h3>
|
---|
376 | Adds 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
|
---|
378 | it was in before the tab view popped up, or if the user has clicked
|
---|
379 | Apply, back to the state immediately after the last Apply.
|
---|
380 | <p> When Cancel is clicked, the <a href="#cancelButtonPressed">cancelButtonPressed</a>() signal is emitted.
|
---|
381 | The dialog is closed at the same time.
|
---|
382 | <p> If <em>text</em> is a
|
---|
383 | <a href="qstring.html#operator!">null string</a>,
|
---|
384 | no 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>
|
---|
389 | This 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
|
---|
391 | a localizable "Cancel".
|
---|
392 |
|
---|
393 | <h3 class=fn>void <a name="setDefaultButton"></a>QTabDialog::setDefaultButton ( const <a href="qstring.html">QString</a> & text )
|
---|
394 | </h3>
|
---|
395 | Adds 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)
|
---|
397 | back 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>,
|
---|
401 | no 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>
|
---|
406 | This 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
|
---|
408 | a localizable "Defaults".
|
---|
409 |
|
---|
410 | <h3 class=fn>void <a name="setFont"></a>QTabDialog::setFont ( const <a href="qfont.html">QFont</a> & font )<tt> [virtual]</tt>
|
---|
411 | </h3>
|
---|
412 | Sets the font for the tabs to <em>font</em>.
|
---|
413 | <p> If the widget is visible, the display is updated with the new font
|
---|
414 | immediately. There may be some geometry changes, depending on the
|
---|
415 | size 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 <a href="qstring.html">QString</a> & text )
|
---|
419 | </h3>
|
---|
420 | Adds 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>,
|
---|
424 | no 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>
|
---|
429 | This 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
|
---|
431 | a localizable "Help".
|
---|
432 |
|
---|
433 | <h3 class=fn>void <a name="setOkButton"></a>QTabDialog::setOkButton ( const <a href="qstring.html">QString</a> & text )
|
---|
434 | </h3>
|
---|
435 | Adds 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,
|
---|
437 | and the current settings in the dialog box should be applied to
|
---|
438 | the application. The dialog then closes.
|
---|
439 | <p> If <em>text</em> is a
|
---|
440 | <a href="qstring.html#operator!">null string</a>,
|
---|
441 | no 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>
|
---|
446 | This 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
|
---|
448 | a localizable "OK".
|
---|
449 |
|
---|
450 | <h3 class=fn>void <a name="setTabBar"></a>QTabDialog::setTabBar ( <a href="qtabbar.html">QTabBar</a> * tb )<tt> [protected]</tt>
|
---|
451 | </h3>
|
---|
452 | Replaces the <a href="qtabbar.html">QTabBar</a> heading the dialog by the given tab bar, <em>tb</em>.
|
---|
453 | Note that this must be called <em>before</em> any tabs have been added,
|
---|
454 | or 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> * w, bool enable )
|
---|
458 | </h3>
|
---|
459 | If <em>enable</em> is TRUE the page <em>w</em> is enabled; otherwise <em>w</em> is
|
---|
460 | disabled. 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
|
---|
462 | separate flag.
|
---|
463 | <p> Note that even a disabled tab and tab page may be visible. If the
|
---|
464 | page is already visible QTabWidget will not hide it; if all the
|
---|
465 | pages 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 char * name, bool 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
|
---|
471 | according to the value of <em>enable</em> and redraws the page's tab
|
---|
472 | appropriately.
|
---|
473 | <p> QTabDialog uses <a href="qwidget.html#setEnabled">QWidget::setEnabled</a>() internally, rather than keeping a
|
---|
474 | separate flag.
|
---|
475 | <p> Note that even a disabled tab/page may be visible. If the page is
|
---|
476 | already visible QTabDialog will not hide it; if all the pages
|
---|
477 | are disabled QTabDialog will show one of them.
|
---|
478 | <p> The object name is used (rather than the tab label) because the tab
|
---|
479 | text 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> * 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
|
---|
485 | confuse 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> * <a name="tabBar"></a>QTabDialog::tabBar () const<tt> [protected]</tt>
|
---|
489 | </h3>
|
---|
490 | Returns 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> * w )
|
---|
494 | </h3> Returns the text in the tab for page <em>w</em>.
|
---|
495 |
|
---|
496 | <!-- eof -->
|
---|
497 | <hr><p>
|
---|
498 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
499 | Copyright © 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 © 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>
|
---|