Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/4/head
Michele Calgaro 4 months ago
parent 97a2108800
commit 2381308044
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -108,7 +108,7 @@ GameBoard::redrawMap()
p = new TQPainter(xpm); p = new TQPainter(xpm);
fnt = p->font(); fnt = p->font();
fnt.setPointSize(dy * 4 / 11); fnt.setPointSize(dy * 4 / 11);
fnt.setItalic(TRUE); fnt.setItalic(true);
p->setFont(fnt); p->setFont(fnt);
p->setBrush(TQBrush(paperColor)); p->setBrush(TQBrush(paperColor));
p->setPen(TQt::black); p->setPen(TQt::black);
@ -136,7 +136,7 @@ GameBoard::redrawMap()
} }
if (kpos < 0) { if (kpos < 0) {
fnt.setPointSize(dy * 3 / 5); fnt.setPointSize(dy * 3 / 5);
fnt.setBold(TRUE); fnt.setBold(true);
p->setFont(fnt); p->setFont(fnt);
p->setPen(TQColor(0, 0xB3, 0)); p->setPen(TQColor(0, 0xB3, 0));
p->drawText(0, 0, w, h, TQt::AlignCenter, p->drawText(0, 0, w, h, TQt::AlignCenter,
@ -147,7 +147,7 @@ GameBoard::redrawMap()
if (vmove.size() == 0) { if (vmove.size() == 0) {
/* game over */ /* game over */
setEnabled(FALSE); setEnabled(false);
y = y * dy + 1; y = y * dy + 1;
x = x * dx + 1; x = x * dx + 1;
p->setBrush(TQBrush(TQt::red)); p->setBrush(TQBrush(TQt::red));
@ -172,7 +172,7 @@ GameBoard::redrawMap()
} }
} else { } else {
fnt.setPointSize(dy * 3 / 5); fnt.setPointSize(dy * 3 / 5);
fnt.setBold(TRUE); fnt.setBold(true);
p->setFont(fnt); p->setFont(fnt);
p->setPen(TQColor(0, 0xB3, 0)); p->setPen(TQColor(0, 0xB3, 0));
size = map_size * map_size; size = map_size * map_size;
@ -364,7 +364,7 @@ void
GameBoard::newGame(int size) GameBoard::newGame(int size)
{ {
setEnabled(TRUE); setEnabled(true);
if (xpm != nullptr) { if (xpm != nullptr) {
xpm->fill(paperColor); xpm->fill(paperColor);
update(); update();

@ -32,7 +32,7 @@ MainWindow::MainWindow(TQWidget* parent, const char* name)
menuBar()->insertItem(i18n("Knight's tour"), mMenu); menuBar()->insertItem(i18n("Knight's tour"), mMenu);
mGame = new TDEPopupMenu(this); mGame = new TDEPopupMenu(this);
mGame->setCheckable(TRUE); mGame->setCheckable(true);
idTip = mGame->insertItem(i18n("&Highlight tips"), idTip = mGame->insertItem(i18n("&Highlight tips"),
this, TQ_SLOT(toggleTips())); this, TQ_SLOT(toggleTips()));
idKnight = mGame->insertItem(i18n("&Show the knight"), idKnight = mGame->insertItem(i18n("&Show the knight"),
@ -85,15 +85,15 @@ MainWindow::loadSettings()
break; break;
} }
val = settings->readBoolEntry("/KnightTour/Tip", TRUE); val = settings->readBoolEntry("/KnightTour/Tip", true);
mGame->setItemChecked(idTip, !val); mGame->setItemChecked(idTip, !val);
toggleTips(); toggleTips();
val = settings->readBoolEntry("/KnightTour/Visibility", TRUE); val = settings->readBoolEntry("/KnightTour/Visibility", true);
mGame->setItemChecked(idKnight, !val); mGame->setItemChecked(idKnight, !val);
toggleKnight(); toggleKnight();
val = settings->readBoolEntry("/KnightTour/RandomCell", TRUE); val = settings->readBoolEntry("/KnightTour/RandomCell", true);
mGame->setItemChecked(idCell, !val); mGame->setItemChecked(idCell, !val);
randomCell(); randomCell();
} }
@ -129,7 +129,7 @@ MainWindow::newGame()
TQCheckBox *rnd; TQCheckBox *rnd;
TQButton *ok, *cancel; TQButton *ok, *cancel;
dlg = new TQDialog(this, nullptr, TRUE); dlg = new TQDialog(this, nullptr, true);
dlg->setCaption(i18n("Board size")); dlg->setCaption(i18n("Board size"));
vbox = new TQVBoxLayout(dlg); vbox = new TQVBoxLayout(dlg);

Loading…
Cancel
Save