summaryrefslogtreecommitdiffstats
path: root/examples/life
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 09:01:42 +0900
commit81ade129093a279e6537db25710583fd2bba9427 (patch)
treea210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/life
parent35ced32e331ee29fda1642616c803637952f5b22 (diff)
downloadtqt-81ade129.tar.gz
tqt-81ade129.zip
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/life')
-rw-r--r--examples/life/life.cpp10
-rw-r--r--examples/life/lifedlg.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/life/life.cpp b/examples/life/life.cpp
index c86340a40..a9c8b0a07 100644
--- a/examples/life/life.cpp
+++ b/examples/life/life.cpp
@@ -41,14 +41,14 @@ void LifeWidget::clear()
for ( int t = 0; t < 2; t++ )
for ( int i = 0; i < MAXSIZE + 2; i++ )
for ( int j = 0; j < MAXSIZE + 2; j++ )
- cells[t][i][j] = FALSE;
+ cells[t][i][j] = false;
repaint();
}
// We assume that the size will never be beyond the maximum size set
-// this is not in general TRUE, but in practice it's good enough for
+// this is not in general true, but in practice it's good enough for
// this program
void LifeWidget::resizeEvent( TQResizeEvent * e )
@@ -62,8 +62,8 @@ void LifeWidget::setPoint( int i, int j )
{
if ( i < 1 || i > maxi || j < 1 || j > maxi )
return;
- cells[current][i][j] = TRUE;
- repaint( index2pos(i), index2pos(j), SCALE, SCALE, FALSE );
+ cells[current][i][j] = true;
+ repaint( index2pos(i), index2pos(j), SCALE, SCALE, false );
}
@@ -106,7 +106,7 @@ void LifeWidget::nextGeneration()
}
}
current = !current;
- repaint( FALSE ); // repaint without erase
+ repaint( false ); // repaint without erase
}
diff --git a/examples/life/lifedlg.cpp b/examples/life/lifedlg.cpp
index c24f7d508..1d4142436 100644
--- a/examples/life/lifedlg.cpp
+++ b/examples/life/lifedlg.cpp
@@ -61,7 +61,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
connect( timer, TQ_SIGNAL(timeout()), life, TQ_SLOT(nextGeneration()) );
pb = new TQPushButton( "Pause", this );
- pb->setToggleButton( TRUE );
+ pb->setToggleButton( true );
connect( pb, TQ_SIGNAL(toggled(bool)), timer, TQ_SLOT(pause(bool)) );
pb->resize( pb->sizeHint().width(), 25 );
pb->move( width() - SIDEBORDER - pb->width(), SIDEBORDER );
@@ -115,7 +115,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
cb->insertItem( "Sym Puffer " );
cb->insertItem( "], Near Ship, Pi Heptomino " );
cb->insertItem( "R Pentomino " );
- cb->setAutoResize( FALSE );
+ cb->setAutoResize( false );
cb->setCurrentItem( sel );
cb->show();
connect( cb, TQ_SIGNAL(activated(int)), TQ_SLOT(getPattern(int)) );