summaryrefslogtreecommitdiffstats
path: root/src/dialogs/qprogressdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs/qprogressdialog.cpp')
-rw-r--r--src/dialogs/qprogressdialog.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/dialogs/qprogressdialog.cpp b/src/dialogs/qprogressdialog.cpp
index e139ad3b3..2455ed131 100644
--- a/src/dialogs/qprogressdialog.cpp
+++ b/src/dialogs/qprogressdialog.cpp
@@ -75,8 +75,8 @@ public:
label( new TQLabel(labelText,that,"label") ),
cancel( 0 ),
bar( new TQProgressBar(totalSteps,that,"bar") ),
- shown_once( FALSE ),
- cancellation_flag( FALSE ),
+ shown_once( false ),
+ cancellation_flag( false ),
showTime( defaultShowTime )
{
label->setAlignment(that->style().styleHint(TQStyle::SH_ProgressDialog_TextLabelAlignment, that));
@@ -140,7 +140,7 @@ public:
for cancellation with wasCanceled(). For example:
\code
TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
- this, "progress", TRUE );
+ this, "progress", true );
for ( int i = 0; i < numFiles; i++ ) {
progress.setProgress( i );
tqApp->processEvents();
@@ -238,9 +238,9 @@ TQProgressBar *TQProgressDialog::bar() const
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and the widget flags, \a f, are
- passed to the TQDialog::TQDialog() constructor. If \a modal is FALSE (the
+ passed to the TQDialog::TQDialog() constructor. If \a modal is false (the
default), you must have an event loop proceeding for any redrawing
- of the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ of the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
\sa setLabelText(), setLabel(), setCancelButtonText(), setCancelButton(),
@@ -271,9 +271,9 @@ TQProgressDialog::TQProgressDialog( TQWidget *creator, const char *name,
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and widget flags, \a f, are passed to the
- TQDialog::TQDialog() constructor. If \a modal is FALSE (the default),
+ TQDialog::TQDialog() constructor. If \a modal is false (the default),
you will must have an event loop proceeding for any redrawing of
- the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
@@ -310,9 +310,9 @@ void TQProgressDialog::init( TQWidget *creator,
int totstps)
{
d = new TQProgressDialogData(this, creator, lbl, totstps);
- d->autoClose = TRUE;
- d->autoReset = TRUE;
- d->forceHide = FALSE;
+ d->autoClose = true;
+ d->autoReset = true;
+ d->forceHide = false;
setCancelButtonText( canc );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SIGNAL(cancelled()) );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SLOT(cancel()) );
@@ -355,7 +355,7 @@ void TQProgressDialog::setLabel( TQLabel *label )
if ( label->parentWidget() == this ) {
label->hide(); // until we resize
} else {
- label->reparent( this, 0, TQPoint(0,0), FALSE );
+ label->reparent( this, 0, TQPoint(0,0), false );
}
}
int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() );
@@ -408,7 +408,7 @@ void TQProgressDialog::setCancelButton( TQPushButton *cancelButton )
if ( cancelButton->parentWidget() == this ) {
cancelButton->hide(); // until we resize
} else {
- cancelButton->reparent( this, 0, TQPoint(0,0), FALSE );
+ cancelButton->reparent( this, 0, TQPoint(0,0), false );
}
connect( d->cancel, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(canceled()) );
#ifndef TQT_NO_ACCEL
@@ -512,7 +512,7 @@ void TQProgressDialog::setTotalSteps( int totalSteps )
/*!
Resets the progress dialog.
- The progress dialog becomes hidden if autoClose() is TRUE.
+ The progress dialog becomes hidden if autoClose() is true.
\sa setAutoClose(), setAutoReset()
*/
@@ -528,23 +528,23 @@ void TQProgressDialog::reset()
if ( d->autoClose || d->forceHide )
hide();
bar()->reset();
- d->cancellation_flag = FALSE;
- d->shown_once = FALSE;
+ d->cancellation_flag = false;
+ d->shown_once = false;
forceTimer->stop();
}
/*!
- Resets the progress dialog. wasCanceled() becomes TRUE until
+ Resets the progress dialog. wasCanceled() becomes true until
the progress dialog is reset.
The progress dialog becomes hidden.
*/
void TQProgressDialog::cancel()
{
- d->forceHide = TRUE;
+ d->forceHide = true;
reset();
- d->forceHide = FALSE;
- d->cancellation_flag = TRUE;
+ d->forceHide = false;
+ d->cancellation_flag = true;
}
/*!
@@ -596,7 +596,7 @@ void TQProgressDialog::setProgress( int progress )
bool need_show;
int elapsed = d->starttime.elapsed();
if ( elapsed >= d->showTime ) {
- need_show = TRUE;
+ need_show = true;
} else {
if ( elapsed > minWaitTime ) {
int estimate;
@@ -606,7 +606,7 @@ void TQProgressDialog::setProgress( int progress )
estimate = elapsed * (totalSteps() - progress) / progress;
need_show = estimate >= d->showTime;
} else {
- need_show = FALSE;
+ need_show = false;
}
}
if ( need_show ) {
@@ -614,7 +614,7 @@ void TQProgressDialog::setProgress( int progress )
int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() );
resize( w, h );
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}
}
#ifdef TQ_WS_MACX
@@ -759,7 +759,7 @@ void TQProgressDialog::closeEvent( TQCloseEvent *e )
\property TQProgressDialog::autoReset
\brief whether the progress dialog calls reset() as soon as progress() equals totalSteps()
- The default is TRUE.
+ The default is true.
\sa setAutoClose()
*/
@@ -778,7 +778,7 @@ bool TQProgressDialog::autoReset() const
\property TQProgressDialog::autoClose
\brief whether the dialog gets hidden by reset()
- The default is TRUE.
+ The default is true.
\sa setAutoReset()
*/
@@ -819,7 +819,7 @@ void TQProgressDialog::forceShow()
return;
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}