diff options
Diffstat (limited to 'kreversi/kreversi.cpp')
-rw-r--r-- | kreversi/kreversi.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kreversi/kreversi.cpp b/kreversi/kreversi.cpp index d01c2f6e..0305dda9 100644 --- a/kreversi/kreversi.cpp +++ b/kreversi/kreversi.cpp @@ -88,7 +88,7 @@ KReversi::KReversi() KNotifyClient::startDaemon(); // The game. - m_game = new QReversiGame(); + m_game = new TQReversiGame(); m_cheating = false; m_gameOver = false; m_humanColor = Black; @@ -104,7 +104,7 @@ KReversi::KReversi() top = new TQGridLayout(w, 2, 2); // The reversi game view. - m_gameView = new QReversiGameView(w, m_game); + m_gameView = new TQReversiGameView(w, m_game); top->addMultiCellWidget(m_gameView, 0, 1, 0, 0); // Populate the GUI. @@ -116,15 +116,15 @@ KReversi::KReversi() // The only part of the view that is left in this class is the // indicator of whose turn it is in the status bar. The rest is // in the game view. - connect(m_game, TQT_SIGNAL(sig_newGame()), this, TQT_SLOT(showTurn())); + connect(m_game, TQT_SIGNAL(sig_newGame()), TQT_TQOBJECT(this), TQT_SLOT(showTurn())); connect(m_game, TQT_SIGNAL(sig_move(uint, Move&)), - this, TQT_SLOT(handleMove(uint, Move&))); // Calls showTurn(). - connect(m_game, TQT_SIGNAL(sig_update()), this, TQT_SLOT(showTurn())); - connect(m_game, TQT_SIGNAL(sig_gameOver()), this, TQT_SLOT(slotGameOver())); + TQT_TQOBJECT(this), TQT_SLOT(handleMove(uint, Move&))); // Calls showTurn(). + connect(m_game, TQT_SIGNAL(sig_update()), TQT_TQOBJECT(this), TQT_SLOT(showTurn())); + connect(m_game, TQT_SIGNAL(sig_gameOver()), TQT_TQOBJECT(this), TQT_SLOT(slotGameOver())); // Signal that is sent when the user clicks on the board. connect(m_gameView, TQT_SIGNAL(signalSquareClicked(int, int)), - this, TQT_SLOT(slotSquareClicked(int, int))); + TQT_TQOBJECT(this), TQT_SLOT(slotSquareClicked(int, int))); loadSettings(); @@ -150,38 +150,38 @@ KReversi::~KReversi() void KReversi::createKActions() { // Standard Game Actions. - KStdGameAction::gameNew(this, TQT_SLOT(slotNewGame()), actionCollection(), + KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewGame()), actionCollection(), "game_new"); - KStdGameAction::load(this, TQT_SLOT(slotOpenGame()), actionCollection()); - KStdGameAction::save(this, TQT_SLOT(slotSave()), actionCollection()); - KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection()); - KStdGameAction::hint(this, TQT_SLOT(slotHint()), actionCollection(), + KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(slotOpenGame()), actionCollection()); + KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection()); + KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(slotHint()), actionCollection(), "game_hint"); - KStdGameAction::undo(this, TQT_SLOT(slotUndo()), actionCollection(), + KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actionCollection(), "game_undo"); // Non-standard Game Actions: Stop, Continue, Switch sides - stopAction = new KAction(i18n("&Stop Thinking"), "game_stop", Qt::Key_Escape, - this, TQT_SLOT(slotInterrupt()), actionCollection(), + stopAction = new KAction(i18n("&Stop Thinking"), "game_stop", TQt::Key_Escape, + TQT_TQOBJECT(this), TQT_SLOT(slotInterrupt()), actionCollection(), "game_stop"); continueAction = new KAction(i18n("&Continue Thinking"), "reload", 0, - this, TQT_SLOT(slotContinue()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotContinue()), actionCollection(), "game_continue"); new KAction(i18n("S&witch Sides"), 0, 0, - this, TQT_SLOT(slotSwitchSides()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotSwitchSides()), actionCollection(), "game_switch_sides"); // Some more standard game actions: Highscores, Settings. - KStdGameAction::highscores(this, TQT_SLOT(showHighScoreDialog()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotEditSettings()), actionCollection()); + KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScoreDialog()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotEditSettings()), actionCollection()); // Actions for the view(s). showLastMoveAction = new KToggleAction(i18n("Show Last Move"), "lastmoves", 0, - this, TQT_SLOT(slotShowLastMove()), + TQT_TQOBJECT(this), TQT_SLOT(slotShowLastMove()), actionCollection(), "show_last_move"); showLegalMovesAction = new KToggleAction(i18n("Show Legal Moves"), "legalmoves", 0, - this, TQT_SLOT(slotShowLegalMoves()), + TQT_TQOBJECT(this), TQT_SLOT(slotShowLegalMoves()), actionCollection(), "show_legal_moves"); } @@ -200,7 +200,7 @@ void KReversi::setStrength(uint strength) // FIXME: 7 should be MAXSTRENGTH or something similar. Q_ASSERT( 1 <= strength && strength <= 7 ); - strength = QMAX(QMIN(strength, 7), 1); + strength = TQMAX(TQMIN(strength, 7), 1); m_engine->setStrength(strength); if (m_lowestStrength < strength) m_lowestStrength = strength; @@ -329,9 +329,9 @@ void KReversi::slotUndo() } if (m_game->toMove() == computerColor()) { - // Must repaint so that the new move is not shown before the old + // Must tqrepaint so that the new move is not shown before the old // one is removed on the screen. - m_gameView->repaint(); + m_gameView->tqrepaint(); computerMakeMove(); } else @@ -392,7 +392,7 @@ void KReversi::slotSwitchSides() if (m_game->moveNumber() != 0) { int res = KMessageBox::warningContinueCancel(this, i18n("If you switch side, your score will not be added to the highscores."), - TQString::null, TQString::null, "switch_side_warning"); + TQString(), TQString(), "switch_side_warning"); if ( res==KMessageBox::Cancel ) return; @@ -609,21 +609,21 @@ void KReversi::showGameOver(Color color) if ( color == Nobody ) { KNotifyClient::event(winId(), "draw", i18n("Draw!")); TQString s = i18n("Game is drawn!\n\nYou : %1\nComputer: %2") - .arg(human).arg(computer); + .tqarg(human).tqarg(computer); KMessageBox::information(this, s, i18n("Game Ended")); score.setType(KExtHighscore::Draw); } else if ( humanColor() == color ) { KNotifyClient::event(winId(), "won", i18n("Game won!")); TQString s = i18n("Congratulations, you have won!\n\nYou : %1\nComputer: %2") - .arg(human).arg(computer); + .tqarg(human).tqarg(computer); KMessageBox::information(this, s, i18n("Game Ended")); score.setType(KExtHighscore::Won); } else { KNotifyClient::event(winId(), "lost", i18n("Game lost!")); TQString s = i18n("You have lost the game!\n\nYou : %1\nComputer: %2") - .arg(human).arg(computer); + .tqarg(human).tqarg(computer); KMessageBox::information(this, s, i18n("Game Ended")); score.setType(KExtHighscore::Lost); } @@ -755,7 +755,7 @@ void KReversi::slotEditSettings() Settings *general = new Settings(0, "General"); dialog->addPage(general, i18n("General"), "package_settings"); - connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(loadSettings())); dialog->show(); } |