summaryrefslogtreecommitdiffstats
path: root/examples/progress/progress.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-01 22:09:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-08 08:53:47 +0900
commitc03a4800879ab62692e017e01c825ba12a421ad0 (patch)
tree57aeff4300eb9fa64d193569f56b2d98305b49a2 /examples/progress/progress.cpp
parent030b165ac197ce4c2eb62c7700dc4c10604637aa (diff)
downloadtqt-c03a4800879ab62692e017e01c825ba12a421ad0.tar.gz
tqt-c03a4800879ab62692e017e01c825ba12a421ad0.zip
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/progress/progress.cpp')
-rw-r--r--examples/progress/progress.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/progress/progress.cpp b/examples/progress/progress.cpp
index 02b4efd8a..9654f1633 100644
--- a/examples/progress/progress.cpp
+++ b/examples/progress/progress.cpp
@@ -163,7 +163,7 @@ public:
cl_id = options->insertItem( "Custom label", this, TQ_SLOT(customLabel()) );
options->insertSeparator();
md_id = options->insertItem( "No minimum duration", this, TQ_SLOT(toggleMinimumDuration()) );
- options->setCheckable( TRUE );
+ options->setCheckable( true );
loopDriven();
defaultLabel();
@@ -179,34 +179,34 @@ public slots:
draw(drawItemRects(id));
}
- void stopDrawing() { got_stop = TRUE; }
+ void stopDrawing() { got_stop = true; }
void timerDriven()
{
- timer_driven = TRUE;
- options->setItemChecked( td_id, TRUE );
- options->setItemChecked( ld_id, FALSE );
+ timer_driven = true;
+ options->setItemChecked( td_id, true );
+ options->setItemChecked( ld_id, false );
}
void loopDriven()
{
- timer_driven = FALSE;
- options->setItemChecked( ld_id, TRUE );
- options->setItemChecked( td_id, FALSE );
+ timer_driven = false;
+ options->setItemChecked( ld_id, true );
+ options->setItemChecked( td_id, false );
}
void defaultLabel()
{
- default_label = TRUE;
- options->setItemChecked( dl_id, TRUE );
- options->setItemChecked( cl_id, FALSE );
+ default_label = true;
+ options->setItemChecked( dl_id, true );
+ options->setItemChecked( cl_id, false );
}
void customLabel()
{
- default_label = FALSE;
- options->setItemChecked( dl_id, FALSE );
- options->setItemChecked( cl_id, TRUE );
+ default_label = false;
+ options->setItemChecked( dl_id, false );
+ options->setItemChecked( cl_id, true );
}
void toggleMinimumDuration()
@@ -243,7 +243,7 @@ private:
pb->setProgress( pb->totalSteps() );
TQPainter p(this);
p.fillRect(0, 0, width(), height(), backgroundColor());
- enableDrawingItems(TRUE);
+ enableDrawingItems(true);
killTimers();
delete pb;
pb = 0;
@@ -277,15 +277,15 @@ private:
}
rects = n;
pb = newProgressDialog("Drawing rectangles.\n"
- "Using timer event.", n, FALSE);
+ "Using timer event.", n, false);
pb->setCaption("Please Wait");
connect(pb, TQ_SIGNAL(cancelled()), this, TQ_SLOT(stopDrawing()));
- enableDrawingItems(FALSE);
+ enableDrawingItems(false);
startTimer(0);
- got_stop = FALSE;
+ got_stop = false;
} else {
TQProgressDialog* lpb = newProgressDialog(
- "Drawing rectangles.\nUsing loop.", n, TRUE);
+ "Drawing rectangles.\nUsing loop.", n, true);
lpb->setCaption("Please Wait");
TQPainter p(this);