~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/q3progressdialog.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/dialogs/q3progressdialog.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3ProgressDialog Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Q3ProgressDialog Class Reference</h1>
 
21
<p>The Q3ProgressDialog class provides feedback on the progress of a slow operation. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3ProgressDialog&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="qdialog.html">QDialog</a>.</p>
 
25
<ul>
 
26
<li><a href="q3progressdialog-members.html">List of all members, including inherited members</a></li>
 
27
<li><a href="q3progressdialog-obsolete.html">Obsolete members</a></li>
 
28
</ul>
 
29
<a name="properties"></a>
 
30
<h3>Properties</h3>
 
31
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
32
<tr><td width="45%" valign="top"><ul>
 
33
<li><div class="fn"/><b><a href="q3progressdialog.html#autoClose-prop">autoClose</a></b> : bool</li>
 
34
<li><div class="fn"/><b><a href="q3progressdialog.html#autoReset-prop">autoReset</a></b> : bool</li>
 
35
<li><div class="fn"/><b><a href="q3progressdialog.html#labelText-prop">labelText</a></b> : QString</li>
 
36
<li><div class="fn"/><b><a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a></b> : int</li>
 
37
</ul></td><td valign="top"><ul>
 
38
<li><div class="fn"/><b><a href="q3progressdialog.html#progress-prop">progress</a></b> : int</li>
 
39
<li><div class="fn"/><b><a href="q3progressdialog.html#totalSteps-prop">totalSteps</a></b> : int</li>
 
40
<li><div class="fn"/><b><a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a></b> : const bool</li>
 
41
</ul>
 
42
</td></tr>
 
43
</table>
 
44
<ul>
 
45
<li><div class="fn"/>2 properties inherited from <a href="qdialog.html#properties">QDialog</a></li>
 
46
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
47
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
48
</ul>
 
49
<a name="public-functions"></a>
 
50
<h3>Public Functions</h3>
 
51
<ul>
 
52
<li><div class="fn"/><b><a href="q3progressdialog.html#Q3ProgressDialog-3">Q3ProgressDialog</a></b> ( QWidget * <i>creator</i> = 0, Qt::WFlags <i>f</i> = 0 )</li>
 
53
<li><div class="fn"/><b><a href="q3progressdialog.html#Q3ProgressDialog-4">Q3ProgressDialog</a></b> ( const QString &amp; <i>labelText</i>, const QString &amp; <i>cancelButtonText</i>, int <i>totalSteps</i>, QWidget * <i>creator</i> = 0, Qt::WFlags <i>f</i> = 0 )</li>
 
54
<li><div class="fn"/><b><a href="q3progressdialog.html#dtor.Q3ProgressDialog">~Q3ProgressDialog</a></b> ()</li>
 
55
<li><div class="fn"/>bool <b><a href="q3progressdialog.html#autoClose-prop">autoClose</a></b> () const</li>
 
56
<li><div class="fn"/>bool <b><a href="q3progressdialog.html#autoReset-prop">autoReset</a></b> () const</li>
 
57
<li><div class="fn"/>QString <b><a href="q3progressdialog.html#labelText-prop">labelText</a></b> () const</li>
 
58
<li><div class="fn"/>int <b><a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a></b> () const</li>
 
59
<li><div class="fn"/>int <b><a href="q3progressdialog.html#progress-prop">progress</a></b> () const</li>
 
60
<li><div class="fn"/>void <b><a href="q3progressdialog.html#autoClose-prop">setAutoClose</a></b> ( bool <i>b</i> )</li>
 
61
<li><div class="fn"/>void <b><a href="q3progressdialog.html#autoReset-prop">setAutoReset</a></b> ( bool <i>b</i> )</li>
 
62
<li><div class="fn"/>void <b><a href="q3progressdialog.html#setBar">setBar</a></b> ( Q3ProgressBar * <i>bar</i> )</li>
 
63
<li><div class="fn"/>void <b><a href="q3progressdialog.html#setCancelButton">setCancelButton</a></b> ( QPushButton * <i>cancelButton</i> )</li>
 
64
<li><div class="fn"/>void <b><a href="q3progressdialog.html#setLabel">setLabel</a></b> ( QLabel * <i>label</i> )</li>
 
65
<li><div class="fn"/>virtual QSize <b><a href="q3progressdialog.html#sizeHint">sizeHint</a></b> () const</li>
 
66
<li><div class="fn"/>int <b><a href="q3progressdialog.html#totalSteps-prop">totalSteps</a></b> () const</li>
 
67
<li><div class="fn"/>bool <b><a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a></b> () const</li>
 
68
</ul>
 
69
<ul>
 
70
<li><div class="fn"/>9 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
 
71
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
72
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
73
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
74
</ul>
 
75
<a name="public-slots"></a>
 
76
<h3>Public Slots</h3>
 
77
<ul>
 
78
<li><div class="fn"/>void <b><a href="q3progressdialog.html#cancel">cancel</a></b> ()</li>
 
79
<li><div class="fn"/>void <b><a href="q3progressdialog.html#reset">reset</a></b> ()</li>
 
80
<li><div class="fn"/>void <b><a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a></b> ( const QString &amp; <i>cancelButtonText</i> )</li>
 
81
<li><div class="fn"/>void <b><a href="q3progressdialog.html#labelText-prop">setLabelText</a></b> ( const QString &amp; )</li>
 
82
<li><div class="fn"/>void <b><a href="q3progressdialog.html#minimumDuration-prop">setMinimumDuration</a></b> ( int <i>ms</i> )</li>
 
83
<li><div class="fn"/>void <b><a href="q3progressdialog.html#progress-prop">setProgress</a></b> ( int <i>progress</i> )</li>
 
84
<li><div class="fn"/>void <b><a href="q3progressdialog.html#progress-prop">setProgress</a></b> ( int <i>progress</i>, int <i>totalSteps</i> )</li>
 
85
<li><div class="fn"/>void <b><a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a></b> ( int <i>totalSteps</i> )</li>
 
86
</ul>
 
87
<ul>
 
88
<li><div class="fn"/>5 public slots inherited from <a href="qdialog.html#public-slots">QDialog</a></li>
 
89
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
90
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
91
</ul>
 
92
<a name="signals"></a>
 
93
<h3>Signals</h3>
 
94
<ul>
 
95
<li><div class="fn"/>void <b><a href="q3progressdialog.html#canceled">canceled</a></b> ()</li>
 
96
</ul>
 
97
<ul>
 
98
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
99
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
100
</ul>
 
101
<a name="protected-slots"></a>
 
102
<h3>Protected Slots</h3>
 
103
<ul>
 
104
<li><div class="fn"/>void <b><a href="q3progressdialog.html#forceShow">forceShow</a></b> ()</li>
 
105
</ul>
 
106
<h3>Additional Inherited Members</h3>
 
107
<ul>
 
108
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
109
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
110
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
111
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
112
</ul>
 
113
<a name="details"></a>
 
114
<hr />
 
115
<h2>Detailed Description</h2>
 
116
<p>The Q3ProgressDialog class provides feedback on the progress of a slow operation.</p>
 
117
<p>A progress dialog is used to give the user an indication of how long an operation is going to take, and to demonstrate that the application has not frozen. It can also give the user an opportunity to abort the operation.</p>
 
118
<p>A common problem with progress dialogs is that it is difficult to know when to use them; operations take different amounts of time on different hardware. Q3ProgressDialog offers a solution to this problem: it estimates the time the operation will take (based on time for steps), and only shows itself if that estimate is beyond <a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a>() (4 seconds by default).</p>
 
119
<p>Use <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>() (or the constructor) to set the number of &quot;steps&quot; in the operation and call <a href="q3progressdialog.html#progress-prop">setProgress</a>() as the operation progresses. The step value can be chosen arbitrarily. It can be the number of files copied, the number of bytes received, the number of iterations through the main loop of your algorithm, or some other suitable unit. Progress starts at 0, and the progress dialog shows that the operation has finished when you call <a href="q3progressdialog.html#progress-prop">setProgress</a>() with <a href="q3progressdialog.html#totalSteps-prop">totalSteps</a>() as its argument.</p>
 
120
<p>The dialog automatically resets and hides itself at the end of the operation. Use <a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>() and <a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>() to change this behavior.</p>
 
121
<p>There are two ways of using Q3ProgressDialog: modal and modeless.</p>
 
122
<p>Using a modal Q3ProgressDialog is simpler for the programmer, but you must call <a href="qcoreapplication.html#processEvents">QApplication::processEvents</a>() or QEventLoop::processEvents(ExcludeUserInput) to keep the event loop running to ensure that the application doesn't freeze. Do the operation in a loop, call <a href="q3progressdialog.html#progress-prop">setProgress</a>() at intervals, and check for cancellation with <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>(). For example:</p>
 
123
<pre>&nbsp;   Q3ProgressDialog progress(&quot;Copying files...&quot;, &quot;Abort Copy&quot;, numFiles,
 
124
                              this, &quot;progress&quot;, true);
 
125
    for (int i = 0; i &lt; numFiles; i++) {
 
126
        progress.setProgress(i);
 
127
        qApp-&gt;processEvents();
 
128
 
 
129
        if (progress.wasCanceled())
 
130
            break;
 
131
        //... copy one file
 
132
    }
 
133
    progress.setProgress(numFiles);</pre>
 
134
<p>A modeless progress dialog is suitable for operations that take place in the background, where the user is able to interact with the application. Such operations are typically based on <a href="qtimer.html">QTimer</a> (or <a href="qobject.html#timerEvent">QObject::timerEvent</a>()), <a href="qsocketnotifier.html">QSocketNotifier</a>, or <a href="porting4.html#qurloperator">QUrlOperator</a>; or performed in a separate thread. A <a href="q3progressbar.html">Q3ProgressBar</a> in the status bar of your main window is often an alternative to a modeless progress dialog.</p>
 
135
<p>You need to have an event loop to be running, connect the <a href="q3progressdialog.html#canceled">canceled</a>() signal to a slot that stops the operation, and call <a href="q3progressdialog.html#progress-prop">setProgress</a>() at intervals. For example:</p>
 
136
<pre>&nbsp;   Operation::Operation(QObject *parent = 0)
 
137
        : QObject(parent), steps(0)
 
138
    {
 
139
        pd = new Q3ProgressDialog(&quot;Operation in progress.&quot;, &quot;Cancel&quot;, 100);
 
140
        connect(pd, SIGNAL(canceled()), this, SLOT(cancel()));
 
141
        t = new QTimer(this);
 
142
        connect(t, SIGNAL(timeout()), this, SLOT(perform()));
 
143
        t-&gt;start(0);
 
144
    }
 
145
 
 
146
    void Operation::perform()
 
147
    {
 
148
        pd-&gt;setProgress(steps);
 
149
        //... perform one percent of the operation
 
150
        steps++;
 
151
        if (steps &gt; pd-&gt;totalSteps())
 
152
            t-&gt;stop();
 
153
    }
 
154
 
 
155
    void Operation::cancel()
 
156
    {
 
157
        t-&gt;stop();
 
158
        //... cleanup
 
159
    }</pre>
 
160
<p>In both modes the progress dialog may be customized by replacing the child widgets with custom widgets by using <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setBar">setBar</a>(), and <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(). The functions <a href="q3progressdialog.html#labelText-prop">setLabelText</a>() and <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>() set the texts shown.</p>
 
161
<p><img src="images/qprogdlg-m.png" alt="Screenshot in Motif style" /> <img src="images/qprogdlg-w.png" alt="Screenshot in Windows style" /></p>
 
162
<p>See also <a href="qdialog.html">QDialog</a>, <a href="q3progressbar.html">Q3ProgressBar</a>, and <a href="guibooks.html#fowler">GUI Design Handbook: Progress Indicator</a>.</p>
 
163
<hr />
 
164
<h2>Property Documentation</h2>
 
165
<h3 class="fn"><a name="autoClose-prop"></a>autoClose : bool</h3>
 
166
<p>This property holds whether the dialog gets hidden by reset().</p>
 
167
<p>The default is true.</p>
 
168
<p>Access functions:</p>
 
169
<ul>
 
170
<li><div class="fn"/><b>bool autoClose () const</b></li>
 
171
<li><div class="fn"/><b>void setAutoClose ( bool <i>b</i> )</b></li>
 
172
</ul>
 
173
<p>See also <a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>().</p>
 
174
<h3 class="fn"><a name="autoReset-prop"></a>autoReset : bool</h3>
 
175
<p>This property holds whether the progress dialog calls reset() as soon as progress() equals totalSteps().</p>
 
176
<p>The default is true.</p>
 
177
<p>Access functions:</p>
 
178
<ul>
 
179
<li><div class="fn"/><b>bool autoReset () const</b></li>
 
180
<li><div class="fn"/><b>void setAutoReset ( bool <i>b</i> )</b></li>
 
181
</ul>
 
182
<p>See also <a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>().</p>
 
183
<h3 class="fn"><a name="labelText-prop"></a>labelText : <a href="qstring.html">QString</a></h3>
 
184
<p>This property holds the label's text.</p>
 
185
<p>The default text is an empty string.</p>
 
186
<p>Access functions:</p>
 
187
<ul>
 
188
<li><div class="fn"/><b>QString labelText () const</b></li>
 
189
<li><div class="fn"/><b>void setLabelText ( const QString &amp; )</b></li>
 
190
</ul>
 
191
<h3 class="fn"><a name="minimumDuration-prop"></a>minimumDuration : int</h3>
 
192
<p>This property holds the time that must pass before the dialog appears.</p>
 
193
<p>If the expected duration of the task is less than the minimumDuration, the dialog will not appear at all. This prevents the dialog popping up for tasks that are quickly over. For tasks that are expected to exceed the minimumDuration, the dialog will pop up after the minimumDuration time or as soon as any progress is set.</p>
 
194
<p>If set to 0, the dialog is always shown as soon as any progress is set. The default is 4000 milliseconds.</p>
 
195
<p>Access functions:</p>
 
196
<ul>
 
197
<li><div class="fn"/><b>int minimumDuration () const</b></li>
 
198
<li><div class="fn"/><b>void setMinimumDuration ( int <i>ms</i> )</b></li>
 
199
</ul>
 
200
<h3 class="fn"><a name="progress-prop"></a>progress : int</h3>
 
201
<p>This property holds the current amount of progress made.</p>
 
202
<p>For the progress dialog to work as expected, you should initially set this property to 0 and finally set it to <a href="q3progressdialog.html#totalSteps-prop">Q3ProgressDialog::totalSteps</a>(); you can call setProgress() any number of times in-between.</p>
 
203
<p><b>Warning:</b> If the progress dialog is modal (see <a href="q3progressdialog-obsolete.html#Q3ProgressDialog">Q3ProgressDialog::Q3ProgressDialog</a>()), this function calls <a href="qcoreapplication.html#processEvents">QApplication::processEvents</a>(), so take care that this does not cause undesirable re-entrancy in your code. For example, don't use a <a href="q3progressdialog.html">Q3ProgressDialog</a> inside a <a href="qwidget.html#paintEvent">paintEvent</a>()!</p>
 
204
<p>Access functions:</p>
 
205
<ul>
 
206
<li><div class="fn"/><b>int progress () const</b></li>
 
207
<li><div class="fn"/><b>void setProgress ( int <i>progress</i> )</b></li>
 
208
<li><div class="fn"/><b>void setProgress ( int <i>progress</i>, int <i>totalSteps</i> )</b></li>
 
209
</ul>
 
210
<p>See also <a href="q3progressdialog.html#totalSteps-prop">totalSteps</a>.</p>
 
211
<h3 class="fn"><a name="totalSteps-prop"></a>totalSteps : int</h3>
 
212
<p>This property holds the total number of steps.</p>
 
213
<p>The default is 0.</p>
 
214
<p>Access functions:</p>
 
215
<ul>
 
216
<li><div class="fn"/><b>int totalSteps () const</b></li>
 
217
<li><div class="fn"/><b>void setTotalSteps ( int <i>totalSteps</i> )</b></li>
 
218
</ul>
 
219
<h3 class="fn"><a name="wasCanceled-prop"></a>wasCanceled : const bool</h3>
 
220
<p>This property holds whether the dialog was canceled.</p>
 
221
<p>Access functions:</p>
 
222
<ul>
 
223
<li><div class="fn"/><b>bool wasCanceled () const</b></li>
 
224
</ul>
 
225
<p>See also <a href="q3progressdialog.html#progress-prop">setProgress</a>().</p>
 
226
<hr />
 
227
<h2>Member Function Documentation</h2>
 
228
<h3 class="fn"><a name="Q3ProgressDialog-3"></a>Q3ProgressDialog::Q3ProgressDialog ( <a href="qwidget.html">QWidget</a> * <i>creator</i> = 0, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>f</i> = 0 )</h3>
 
229
<p>Constructs a progress dialog.</p>
 
230
<p>Default settings:</p>
 
231
<ul>
 
232
<li>The label text is empty.</li>
 
233
<li>The cancel button text is (translated) &quot;Cancel&quot;.</li>
 
234
<li>The total number of steps is 100.</li>
 
235
</ul>
 
236
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. The widget flags, <i>f</i>, are passed to the <a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor.</p>
 
237
<p>See also <a href="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
 
238
<h3 class="fn"><a name="Q3ProgressDialog-4"></a>Q3ProgressDialog::Q3ProgressDialog ( const <a href="qstring.html">QString</a> &amp; <i>labelText</i>, const <a href="qstring.html">QString</a> &amp; <i>cancelButtonText</i>, int <i>totalSteps</i>, <a href="qwidget.html">QWidget</a> * <i>creator</i> = 0, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>f</i> = 0 )</h3>
 
239
<p>Constructs a progress dialog.</p>
 
240
<p>The <i>labelText</i> is text used to remind the user what is progressing.</p>
 
241
<p>The <i>cancelButtonText</i> is the text to display on the cancel button, or 0 if no cancel button is to be shown.</p>
 
242
<p>The <i>totalSteps</i> is the total number of steps in the operation for which this progress dialog shows progress. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0). As each file is processed call setProgress(1), setProgress(2), etc., finally calling setProgress(50) after examining the last file.</p>
 
243
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. The widget flags, <i>f</i>, are passed to the <a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor.</p>
 
244
<p>See also <a href="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
 
245
<h3 class="fn"><a name="dtor.Q3ProgressDialog"></a>Q3ProgressDialog::~Q3ProgressDialog ()</h3>
 
246
<p>Destroys the progress dialog.</p>
 
247
<h3 class="fn"><a name="cancel"></a>void Q3ProgressDialog::cancel ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
248
<p>Resets the progress dialog. <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>() becomes true until the progress dialog is reset. The progress dialog becomes hidden.</p>
 
249
<h3 class="fn"><a name="canceled"></a>void Q3ProgressDialog::canceled ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
250
<p>This signal is emitted when the cancel button is clicked. It is connected to the <a href="q3progressdialog.html#cancel">cancel</a>() slot by default.</p>
 
251
<p>See also <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>().</p>
 
252
<h3 class="fn"><a name="forceShow"></a>void Q3ProgressDialog::forceShow ()&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
253
<p>Shows the dialog if it is still hidden after the algorithm has been started and <a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a> milliseconds have passed.</p>
 
254
<p>See also <a href="q3progressdialog.html#minimumDuration-prop">setMinimumDuration</a>().</p>
 
255
<h3 class="fn"><a name="reset"></a>void Q3ProgressDialog::reset ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
256
<p>Resets the progress dialog. The progress dialog becomes hidden if <a href="q3progressdialog.html#autoClose-prop">autoClose</a>() is true.</p>
 
257
<p>See also <a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>() and <a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>().</p>
 
258
<h3 class="fn"><a name="setBar"></a>void Q3ProgressDialog::setBar ( <a href="q3progressbar.html">Q3ProgressBar</a> * <i>bar</i> )</h3>
 
259
<p>Sets the progress bar widget to <i>bar</i>. The progress dialog resizes to fit. The progress dialog takes ownership of the progress <i>bar</i> which will be deleted when necessary, so do not use a progress bar allocated on the stack.</p>
 
260
<h3 class="fn"><a name="setCancelButton"></a>void Q3ProgressDialog::setCancelButton ( <a href="qpushbutton.html">QPushButton</a> * <i>cancelButton</i> )</h3>
 
261
<p>Sets the cancel button to the push button, <i>cancelButton</i>. The progress dialog takes ownership of this button which will be deleted when necessary, so do not pass the address of an object that is on the stack, i.e. use new() to create the button.</p>
 
262
<p>See also <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>().</p>
 
263
<h3 class="fn"><a name="setCancelButtonText"></a>void Q3ProgressDialog::setCancelButtonText ( const <a href="qstring.html">QString</a> &amp; <i>cancelButtonText</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
264
<p>Sets the cancel button's text to <i>cancelButtonText</i>.</p>
 
265
<p>See also <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>().</p>
 
266
<h3 class="fn"><a name="setLabel"></a>void Q3ProgressDialog::setLabel ( <a href="qlabel.html">QLabel</a> * <i>label</i> )</h3>
 
267
<p>Sets the label to <i>label</i>. The progress dialog resizes to fit. The label becomes owned by the progress dialog and will be deleted when necessary, so do not pass the address of an object on the stack.</p>
 
268
<p>See also <a href="q3progressdialog.html#labelText-prop">setLabelText</a>().</p>
 
269
<h3 class="fn"><a name="sizeHint"></a><a href="qsize.html">QSize</a> Q3ProgressDialog::sizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
270
<p>Returns a size that fits the contents of the progress dialog. The progress dialog resizes itself as required, so you should not need to call this yourself.</p>
 
271
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget</a>.</p>
 
272
<p /><address><hr /><div align="center">
 
273
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
274
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
275
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
276
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
277
</tr></table></div></address></body>
 
278
</html>