summaryrefslogtreecommitdiffstats
path: root/doc/html/progressbar-example.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
commitea318d1431c89e647598c510c4245c6571aa5f46 (patch)
tree996d29b80c30d453dda86d1a23162d441628f169 /doc/html/progressbar-example.html
parentaaf89d4b48f69c9293feb187db26362e550b5561 (diff)
downloadtqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz
tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/progressbar-example.html')
-rw-r--r--doc/html/progressbar-example.html118
1 files changed, 59 insertions, 59 deletions
diff --git a/doc/html/progressbar-example.html b/doc/html/progressbar-example.html
index 99a024dae..dc54be1dd 100644
--- a/doc/html/progressbar-example.html
+++ b/doc/html/progressbar-example.html
@@ -49,25 +49,25 @@ This example shows how to use a progress bar.
#ifndef PROGRESSBAR_H
#define PROGRESSBAR_H
-#include &lt;<a href="qbuttongroup-h.html">qbuttongroup.h</a>&gt;
-#include &lt;<a href="qtimer-h.html">qtimer.h</a>&gt;
+#include &lt;<a href="qbuttongroup-h.html">ntqbuttongroup.h</a>&gt;
+#include &lt;<a href="qtimer-h.html">ntqtimer.h</a>&gt;
class TQRadioButton;
class TQPushButton;
class TQProgressBar;
-class ProgressBar : public <a href="qbuttongroup.html">TQButtonGroup</a>
+class ProgressBar : public <a href="ntqbuttongroup.html">TQButtonGroup</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- ProgressBar( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
+ ProgressBar( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
protected:
- <a href="qradiobutton.html">TQRadioButton</a> *slow, *normal, *fast;
- <a href="qpushbutton.html">TQPushButton</a> *start, *pause, *reset;
- <a href="qprogressbar.html">TQProgressBar</a> *progress;
- <a href="qtimer.html">TQTimer</a> timer;
+ <a href="ntqradiobutton.html">TQRadioButton</a> *slow, *normal, *fast;
+ <a href="ntqpushbutton.html">TQPushButton</a> *start, *pause, *reset;
+ <a href="ntqprogressbar.html">TQProgressBar</a> *progress;
+ <a href="ntqtimer.html">TQTimer</a> timer;
protected slots:
void slotStart();
@@ -93,12 +93,12 @@ protected slots:
#include "progressbar.h"
-#include &lt;<a href="qradiobutton-h.html">qradiobutton.h</a>&gt;
-#include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
-#include &lt;<a href="qprogressbar-h.html">qprogressbar.h</a>&gt;
-#include &lt;<a href="qlayout-h.html">qlayout.h</a>&gt;
+#include &lt;<a href="qradiobutton-h.html">ntqradiobutton.h</a>&gt;
+#include &lt;<a href="qpushbutton-h.html">ntqpushbutton.h</a>&gt;
+#include &lt;<a href="qprogressbar-h.html">ntqprogressbar.h</a>&gt;
+#include &lt;<a href="qlayout-h.html">ntqlayout.h</a>&gt;
-#include &lt;<a href="qmotifstyle-h.html">qmotifstyle.h</a>&gt;
+#include &lt;<a href="qmotifstyle-h.html">ntqmotifstyle.h</a>&gt;
/*
* Constructor
@@ -106,21 +106,21 @@ protected slots:
* Creates child widgets of the ProgressBar widget
*/
-<a name="f346"></a>ProgressBar::ProgressBar( <a href="qwidget.html">TQWidget</a> *parent, const char *name )
- : <a href="qbuttongroup.html">TQButtonGroup</a>( 0, Horizontal, "Progress Bar", parent, name ), timer()
+<a name="f346"></a>ProgressBar::ProgressBar( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name )
+ : <a href="ntqbuttongroup.html">TQButtonGroup</a>( 0, Horizontal, "Progress Bar", parent, name ), timer()
{
- <a href="qframe.html#setMargin">setMargin</a>( 10 );
+ <a href="ntqframe.html#setMargin">setMargin</a>( 10 );
- <a href="qgridlayout.html">TQGridLayout</a>* toplayout = new <a href="qgridlayout.html">TQGridLayout</a>( <a href="qwidget.html#layout">layout</a>(), 2, 2, 5);
+ <a href="qgridlayout.html">TQGridLayout</a>* toplayout = new <a href="qgridlayout.html">TQGridLayout</a>( <a href="ntqwidget.html#layout">layout</a>(), 2, 2, 5);
- <a href="qbuttongroup.html#setRadioButtonExclusive">setRadioButtonExclusive</a>( TRUE );
+ <a href="ntqbuttongroup.html#setRadioButtonExclusive">setRadioButtonExclusive</a>( TRUE );
// insert three radiobuttons which the user can use
// to set the speed of the progress and two pushbuttons
// to start/pause/continue and reset the progress
- slow = new <a href="qradiobutton.html">TQRadioButton</a>( "S&amp;low", this );
- normal = new <a href="qradiobutton.html">TQRadioButton</a>( "&amp;Normal", this );
- fast = new <a href="qradiobutton.html">TQRadioButton</a>( "&amp;Fast", this );
+ slow = new <a href="ntqradiobutton.html">TQRadioButton</a>( "S&amp;low", this );
+ normal = new <a href="ntqradiobutton.html">TQRadioButton</a>( "&amp;Normal", this );
+ fast = new <a href="ntqradiobutton.html">TQRadioButton</a>( "&amp;Fast", this );
<a href="qvboxlayout.html">TQVBoxLayout</a>* vb1 = new <a href="qvboxlayout.html">TQVBoxLayout</a>;
<a name="x964"></a> toplayout-&gt;<a href="qgridlayout.html#addLayout">addLayout</a>( vb1, 0, 0 );
vb1-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( slow );
@@ -128,32 +128,32 @@ protected slots:
vb1-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( fast );
// two push buttons, one for start, for for reset.
- start = new <a href="qpushbutton.html">TQPushButton</a>( "&amp;Start", this );
- reset = new <a href="qpushbutton.html">TQPushButton</a>( "&amp;Reset", this );
+ start = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Start", this );
+ reset = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Reset", this );
<a href="qvboxlayout.html">TQVBoxLayout</a>* vb2 = new <a href="qvboxlayout.html">TQVBoxLayout</a>;
toplayout-&gt;<a href="qgridlayout.html#addLayout">addLayout</a>( vb2, 0, 1 );
vb2-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( start );
vb2-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( reset );
// Create the progressbar
- progress = new <a href="qprogressbar.html">TQProgressBar</a>( 100, this );
-<a name="x975"></a> // progress-&gt;<a href="qwidget.html#setStyle">setStyle</a>( new <a href="qmotifstyle.html">TQMotifStyle</a>() );
+ progress = new <a href="ntqprogressbar.html">TQProgressBar</a>( 100, this );
+<a name="x975"></a> // progress-&gt;<a href="ntqwidget.html#setStyle">setStyle</a>( new <a href="ntqmotifstyle.html">TQMotifStyle</a>() );
<a name="x965"></a> toplayout-&gt;<a href="qgridlayout.html#addMultiCellWidget">addMultiCellWidget</a>( progress, 1, 1, 0, 1 );
// connect the clicked() SIGNALs of the pushbuttons to SLOTs
-<a name="x962"></a> <a href="qobject.html#connect">connect</a>( start, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( slotStart() ) );
- <a href="qobject.html#connect">connect</a>( reset, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( slotReset() ) );
+<a name="x962"></a> <a href="ntqobject.html#connect">connect</a>( start, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( slotStart() ) );
+ <a href="ntqobject.html#connect">connect</a>( reset, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( slotReset() ) );
// connect the timeout() SIGNAL of the progress-timer to a SLOT
- <a href="qobject.html#connect">connect</a>( &amp;timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
+ <a href="ntqobject.html#connect">connect</a>( &amp;timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
// Let's start with normal speed...
-<a name="x972"></a> normal-&gt;<a href="qradiobutton.html#setChecked">setChecked</a>( TRUE );
+<a name="x972"></a> normal-&gt;<a href="ntqradiobutton.html#setChecked">setChecked</a>( TRUE );
// some contraints
-<a name="x974"></a> start-&gt;<a href="qwidget.html#setFixedWidth">setFixedWidth</a>( 80 );
- <a href="qwidget.html#setMinimumWidth">setMinimumWidth</a>( 300 );
+<a name="x974"></a> start-&gt;<a href="ntqwidget.html#setFixedWidth">setFixedWidth</a>( 80 );
+ <a href="ntqwidget.html#setMinimumWidth">setMinimumWidth</a>( 300 );
}
/*
@@ -166,20 +166,20 @@ protected slots:
void <a name="f347"></a>ProgressBar::slotStart()
{
// If the progress bar is at the beginning...
-<a name="x966"></a> if ( progress-&gt;<a href="qprogressbar.html#progress">progress</a>() == -1 ) {
+<a name="x966"></a> if ( progress-&gt;<a href="ntqprogressbar.html#progress">progress</a>() == -1 ) {
// ...set according to the checked speed-radiobutton
// the number of steps which are needed to complete the process
-<a name="x971"></a> if ( slow-&gt;<a href="qradiobutton.html#isChecked">isChecked</a>() )
-<a name="x969"></a> progress-&gt;<a href="qprogressbar.html#setTotalSteps">setTotalSteps</a>( 10000 );
- else if ( normal-&gt;<a href="qradiobutton.html#isChecked">isChecked</a>() )
- progress-&gt;<a href="qprogressbar.html#setTotalSteps">setTotalSteps</a>( 1000 );
+<a name="x971"></a> if ( slow-&gt;<a href="ntqradiobutton.html#isChecked">isChecked</a>() )
+<a name="x969"></a> progress-&gt;<a href="ntqprogressbar.html#setTotalSteps">setTotalSteps</a>( 10000 );
+ else if ( normal-&gt;<a href="ntqradiobutton.html#isChecked">isChecked</a>() )
+ progress-&gt;<a href="ntqprogressbar.html#setTotalSteps">setTotalSteps</a>( 1000 );
else
- progress-&gt;<a href="qprogressbar.html#setTotalSteps">setTotalSteps</a>( 50 );
+ progress-&gt;<a href="ntqprogressbar.html#setTotalSteps">setTotalSteps</a>( 50 );
// disable the speed-radiobuttons
-<a name="x973"></a> slow-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( FALSE );
- normal-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( FALSE );
- fast-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( FALSE );
+<a name="x973"></a> slow-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE );
+ normal-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE );
+ fast-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE );
}
// If the progress is not running...
@@ -187,12 +187,12 @@ void <a name="f347"></a>ProgressBar::slotStart()
// ...start the timer (and so the progress) with a interval of 1 ms...
timer.start( 1 );
// ...and rename the start/pause/continue button to Pause
-<a name="x963"></a> start-&gt;<a href="qbutton.html#setText">setText</a>( "&amp;Pause" );
+<a name="x963"></a> start-&gt;<a href="ntqbutton.html#setText">setText</a>( "&amp;Pause" );
} else { // if the prgress is running...
// ...stop the timer (and so the prgress)...
timer.stop();
// ...and rename the start/pause/continue button to Continue
- start-&gt;<a href="qbutton.html#setText">setText</a>( "&amp;Continue" );
+ start-&gt;<a href="ntqbutton.html#setText">setText</a>( "&amp;Continue" );
}
}
@@ -208,17 +208,17 @@ void <a name="f348"></a>ProgressBar::slotReset()
timer.stop();
// rename the start/pause/continue button to Start...
- start-&gt;<a href="qbutton.html#setText">setText</a>( "&amp;Start" );
+ start-&gt;<a href="ntqbutton.html#setText">setText</a>( "&amp;Start" );
// ...and enable this button
- start-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( TRUE );
+ start-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( TRUE );
// enable the speed-radiobuttons
- slow-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( TRUE );
- normal-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( TRUE );
- fast-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( TRUE );
+ slow-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( TRUE );
+ normal-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( TRUE );
+ fast-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( TRUE );
// reset the progressbar
-<a name="x967"></a> progress-&gt;<a href="qprogressbar.html#reset">reset</a>();
+<a name="x967"></a> progress-&gt;<a href="ntqprogressbar.html#reset">reset</a>();
}
/*
@@ -230,22 +230,22 @@ void <a name="f348"></a>ProgressBar::slotReset()
void <a name="f349"></a>ProgressBar::slotTimeout()
{
- int p = progress-&gt;<a href="qprogressbar.html#progress">progress</a>();
+ int p = progress-&gt;<a href="ntqprogressbar.html#progress">progress</a>();
#if 1
// If the progress is complete...
-<a name="x970"></a> if ( p == progress-&gt;<a href="qprogressbar.html#totalSteps">totalSteps</a>() ) {
+<a name="x970"></a> if ( p == progress-&gt;<a href="ntqprogressbar.html#totalSteps">totalSteps</a>() ) {
// ...rename the start/pause/continue button to Start...
- start-&gt;<a href="qbutton.html#setText">setText</a>( "&amp;Start" );
+ start-&gt;<a href="ntqbutton.html#setText">setText</a>( "&amp;Start" );
// ...and disable it...
- start-&gt;<a href="qwidget.html#setEnabled">setEnabled</a>( FALSE );
+ start-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE );
// ...and return
return;
}
#endif
// If the process is not complete increase it
-<a name="x968"></a> progress-&gt;<a href="qprogressbar.html#setProgress">setProgress</a>( ++p );
+<a name="x968"></a> progress-&gt;<a href="ntqprogressbar.html#setProgress">setProgress</a>( ++p );
}
</pre>
@@ -262,18 +262,18 @@ void <a name="f349"></a>ProgressBar::slotTimeout()
*****************************************************************************/
#include "progressbar.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
int main(int argc,char **argv)
{
- <a href="qapplication.html">TQApplication</a> a(argc,argv);
+ <a href="ntqapplication.html">TQApplication</a> a(argc,argv);
ProgressBar progressbar;
- progressbar.<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - ProgressBar");
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>(&amp;progressbar);
- progressbar.<a href="qwidget.html#show">show</a>();
+ progressbar.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - ProgressBar");
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(&amp;progressbar);
+ progressbar.<a href="ntqwidget.html#show">show</a>();
- return a.<a href="qapplication.html#exec">exec</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>