diff options
Diffstat (limited to 'kblackbox/kbbgame.cpp')
-rw-r--r-- | kblackbox/kbbgame.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kblackbox/kbbgame.cpp b/kblackbox/kbbgame.cpp index c663e2eb..f13c0106 100644 --- a/kblackbox/kbbgame.cpp +++ b/kblackbox/kbbgame.cpp @@ -174,7 +174,7 @@ KBBGame::~KBBGame() kConf->writeEntry( "tutorial", (int) tutorial ); delete gameBoard; - // All the rest has "this" for parent so it doesn't need to be deleted. + // All the rest has "this" for tqparent so it doesn't need to be deleted. } @@ -266,7 +266,7 @@ void KBBGame::newGame() if (running) { bool cancel; cancel = KMessageBox::warningContinueCancel(0, - i18n("Do you really want to give up this game?"),TQString::null,i18n("Give Up")) + i18n("Do you really want to give up this game?"),TQString(),i18n("Give Up")) == KMessageBox::Cancel; if (cancel) return; @@ -298,7 +298,7 @@ void KBBGame::newGame() randomBalls( balls ); remap( gameBoard, gr->getGraphicBoard() ); - gr->repaint( TRUE ); + gr->tqrepaint( TRUE ); setScore( 0 ); detourCounter = -1; ballsPlaced = 0; @@ -326,12 +326,12 @@ void KBBGame::gameFinished() "I guess you need more practice."); KMessageBox::information(this, - s.arg(KGlobal::locale()->formatNumber(score, 0))); + s.tqarg(KGlobal::locale()->formatNumber(score, 0))); } else { s = i18n( "You should place %1 balls!\n" "You have placed %2.") - .arg(KGlobal::locale()->formatNumber(balls, 0)) - .arg(KGlobal::locale()->formatNumber(ballsPlaced, 0)); + .tqarg(KGlobal::locale()->formatNumber(balls, 0)) + .tqarg(KGlobal::locale()->formatNumber(ballsPlaced, 0)); KMessageBox::sorry(this, s); } @@ -388,7 +388,7 @@ void KBBGame::giveUp() bool stop; stop = KMessageBox::warningContinueCancel(0, i18n( - "Do you really want to give up this game?"),TQString::null,i18n("Give Up")) + "Do you really want to give up this game?"),TQString(),i18n("Give Up")) == KMessageBox::Continue; if (stop) { @@ -428,7 +428,7 @@ void KBBGame::updateStats() void KBBGame::setScore( int n ) { score = n; - statusBar()->changeItem( i18n("Score: %1").arg(n), SSCORE ); + statusBar()->changeItem( i18n("Score: %1").tqarg(n), SSCORE ); } /* @@ -442,7 +442,7 @@ bool KBBGame::setSize( int w, int h ) if (running) { ok = KMessageBox::warningContinueCancel(0, i18n( - "This will be the end of the current game!"),TQString::null,i18n("End Game")) + "This will be the end of the current game!"),TQString(),i18n("End Game")) == KMessageBox::Continue; } else ok = TRUE; @@ -454,7 +454,7 @@ bool KBBGame::setSize( int w, int h ) gameBoard = new RectOnArray( gr->numC(), gr->numR() ); if (running) abortGame(); newGame(); - // gr->repaint( TRUE ); + // gr->tqrepaint( TRUE ); } } return ok; @@ -470,7 +470,7 @@ bool KBBGame::setBalls( int n ) if (balls != n) { if (running) { ok = KMessageBox::warningContinueCancel(0, - i18n("This will be the end of the current game!"),TQString::null,i18n("End Game")) + i18n("This will be the end of the current game!"),TQString(),i18n("End Game")) == KMessageBox::Continue; } else ok = TRUE; if (ok) { @@ -622,7 +622,7 @@ void KBBGame::gotInputAt( int col, int row, int state ) int w = gameBoard->width() - 2; int h = gameBoard->height() - 2; - if (state & LeftButton) { + if (state & Qt::LeftButton) { switch (type) { case WBALLBBG: // because of the tutorial mode case INNERBBG: @@ -681,7 +681,7 @@ void KBBGame::gotInputAt( int col, int row, int state ) } break; } - } else if (state & RightButton) { + } else if (state & Qt::RightButton) { switch (type) { case INNERBBG: r->set( col, row, MARK1BBG ); @@ -698,37 +698,37 @@ void KBBGame::gotInputAt( int col, int row, int state ) void KBBGame::initKAction() { // game - KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection()); - (void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, this, TQT_SLOT(giveUp()), actionCollection(), "game_giveup" ); - (void)new KAction( i18n("&Done"), SmallIcon("done"), 0, this, TQT_SLOT(gameFinished()), actionCollection(), "game_done" ); - (void)new KAction( i18n("&Resize"), 0, this, TQT_SLOT(slotResize()), actionCollection(), "game_resize" ); - KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); + (void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, TQT_TQOBJECT(this), TQT_SLOT(giveUp()), actionCollection(), "game_giveup" ); + (void)new KAction( i18n("&Done"), SmallIcon("done"), 0, TQT_TQOBJECT(this), TQT_SLOT(gameFinished()), actionCollection(), "game_done" ); + (void)new KAction( i18n("&Resize"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotResize()), actionCollection(), "game_resize" ); + KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); // settings - sizeAction = new KSelectAction( i18n("&Size"), 0, this, TQT_SLOT(slotSize()), actionCollection(), "options_size"); + sizeAction = new KSelectAction( i18n("&Size"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSize()), actionCollection(), "options_size"); TQStringList list; list.append(i18n(" 8 x 8 ")); list.append(i18n(" 10 x 10 ")); list.append(i18n(" 12 x 12 ")); sizeAction->setItems(list); - ballsAction = new KSelectAction( i18n("&Balls"), 0, this, TQT_SLOT(slotBalls()), actionCollection(), "options_balls"); + ballsAction = new KSelectAction( i18n("&Balls"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBalls()), actionCollection(), "options_balls"); list.clear(); list.append(i18n(" 4 ")); list.append(i18n(" 6 ")); list.append(i18n(" 8 ")); ballsAction->setItems(list); - tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, this, TQT_SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" ); + tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" ); // KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), //actionCollection()); // keyboard only - (void)new KAction( i18n("Move Down"), Qt::Key_Down, gr, TQT_SLOT(slotDown()), actionCollection(), "move_down" ); - (void)new KAction( i18n("Move Up"), Qt::Key_Up, gr, TQT_SLOT(slotUp()), actionCollection(), "move_up" ); - (void)new KAction( i18n("Move Left"), Qt::Key_Left, gr, TQT_SLOT(slotLeft()), actionCollection(), "move_left" ); - (void)new KAction( i18n("Move Right"), Qt::Key_Right, gr, TQT_SLOT(slotRight()), actionCollection(), "move_right" ); - (void)new KAction( i18n("Trigger Action"), Qt::Key_Return, gr, TQT_SLOT(slotInput()), actionCollection(), "move_trigger" ); + (void)new KAction( i18n("Move Down"), TQt::Key_Down, TQT_TQOBJECT(gr), TQT_SLOT(slotDown()), actionCollection(), "move_down" ); + (void)new KAction( i18n("Move Up"), TQt::Key_Up, TQT_TQOBJECT(gr), TQT_SLOT(slotUp()), actionCollection(), "move_up" ); + (void)new KAction( i18n("Move Left"), TQt::Key_Left, TQT_TQOBJECT(gr), TQT_SLOT(slotLeft()), actionCollection(), "move_left" ); + (void)new KAction( i18n("Move Right"), TQt::Key_Right, TQT_TQOBJECT(gr), TQT_SLOT(slotRight()), actionCollection(), "move_right" ); + (void)new KAction( i18n("Trigger Action"), TQt::Key_Return, TQT_TQOBJECT(gr), TQT_SLOT(slotInput()), actionCollection(), "move_trigger" ); } void KBBGame::slotResize() |