diff options
Diffstat (limited to 'kreversi')
| -rw-r--r-- | kreversi/DESIGN | 6 | ||||
| -rw-r--r-- | kreversi/board.cpp | 6 | ||||
| -rw-r--r-- | kreversi/board.h | 4 | ||||
| -rw-r--r-- | kreversi/highscores.cpp | 2 | ||||
| -rw-r--r-- | kreversi/highscores.h | 4 | ||||
| -rw-r--r-- | kreversi/kreversi.cpp | 58 | ||||
| -rw-r--r-- | kreversi/kreversi.h | 4 | ||||
| -rw-r--r-- | kreversi/kreversi.kcfg | 4 | ||||
| -rw-r--r-- | kreversi/kzoommainwindow.cpp | 8 | ||||
| -rw-r--r-- | kreversi/kzoommainwindow.h | 2 | ||||
| -rw-r--r-- | kreversi/qreversigame.h | 4 | ||||
| -rw-r--r-- | kreversi/qreversigameview.cpp | 14 | ||||
| -rw-r--r-- | kreversi/qreversigameview.h | 6 | ||||
| -rw-r--r-- | kreversi/settings.ui | 6 |
14 files changed, 61 insertions, 67 deletions
diff --git a/kreversi/DESIGN b/kreversi/DESIGN index 8b01b879..58758697 100644 --- a/kreversi/DESIGN +++ b/kreversi/DESIGN @@ -71,9 +71,9 @@ Engine QReversiGame The "document" for KReversi. - Handles a game being played and sends Q_SIGNALS to all its views + Handles a game being played and sends signals to all its views when something changes. Basically, the only difference between - this class and the more basic ReversiGame is that it sends Q_SIGNALS + this class and the more basic ReversiGame is that it sends signals to the views. Inherits: ReversiGame The actual game being played @@ -94,7 +94,7 @@ QReversiBoardView A view for a Reversi board. The rest of the game view is implemented in the class QReversiGameView. - Inherits: QWidget. + Inherits: TQWidget. Contains: *QReversiGame (not owner) FIXME: Enhance the view with timing information, clock, etc. diff --git a/kreversi/board.cpp b/kreversi/board.cpp index b265e8fa..dc4f49ab 100644 --- a/kreversi/board.cpp +++ b/kreversi/board.cpp @@ -42,7 +42,7 @@ #include <tqfont.h> #include <tdeapplication.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeconfig.h> #include <knotifyclient.h> #include <tdelocale.h> @@ -136,7 +136,7 @@ void QReversiBoardView::setAnimationSpeed(uint speed) void QReversiBoardView::mousePressEvent(TQMouseEvent *e) { // Only handle left button. No context menu. - if ( e->button() != Qt::LeftButton ) { + if ( e->button() != TQt::LeftButton ) { e->ignore(); return; } @@ -290,7 +290,7 @@ void QReversiBoardView::rotateChip(uint row, uint col) for (uint i = from; i != end; i += delta) { drawOnePiece(row, col, i); - kapp->flushX(); // FIXME: use TQCanvas to avoid flicker... + tdeApp->flushX(); // FIXME: use TQCanvas to avoid flicker... usleep(ANIMATION_DELAY * anim_speed); } } diff --git a/kreversi/board.h b/kreversi/board.h index b68c94c1..68047178 100644 --- a/kreversi/board.h +++ b/kreversi/board.h @@ -55,7 +55,7 @@ class QReversiGame; // class QReversiBoardView : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -80,7 +80,7 @@ public: void setShowLastMove(bool show); // View methods called from the outside. - void updateBoard(bool force = FALSE); + void updateBoard(bool force = false); void animateChanged(Move move); void setAnimationSpeed(uint); diff --git a/kreversi/highscores.cpp b/kreversi/highscores.cpp index 9aadd4a5..c230299a 100644 --- a/kreversi/highscores.cpp +++ b/kreversi/highscores.cpp @@ -75,7 +75,7 @@ void ExtManager::convertLegacy(uint gameType) if ( gameType!=0 ) return; - TDEConfigGroupSaver cg(kapp->config(), "High Score"); + TDEConfigGroupSaver cg(tdeApp->config(), "High Score"); for (uint i = 1; i <= 10; i++) { TQString key = "Pos" + TQString::number(i); diff --git a/kreversi/highscores.h b/kreversi/highscores.h index a96e6a27..1ab0a60e 100644 --- a/kreversi/highscores.h +++ b/kreversi/highscores.h @@ -22,14 +22,14 @@ #include <highscore/kexthighscore.h> -#include <kdemacros.h> +#include <tdemacros.h> #include "SuperEngine.h" namespace KExtHighscore { -class KDE_EXPORT ExtManager : public Manager +class TDE_EXPORT ExtManager : public Manager { public: ExtManager(); diff --git a/kreversi/kreversi.cpp b/kreversi/kreversi.cpp index 7e2e83ff..1b5533b3 100644 --- a/kreversi/kreversi.cpp +++ b/kreversi/kreversi.cpp @@ -46,7 +46,7 @@ #include <tdeapplication.h> #include <kdebug.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstatusbar.h> #include <tdelocale.h> #include <tdemessagebox.h> @@ -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()), TQT_TQOBJECT(this), TQT_SLOT(showTurn())); - connect(m_game, TQT_SIGNAL(sig_move(uint, Move&)), - 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())); + connect(m_game, TQ_SIGNAL(sig_newGame()), this, TQ_SLOT(showTurn())); + connect(m_game, TQ_SIGNAL(sig_move(uint, Move&)), + this, TQ_SLOT(handleMove(uint, Move&))); // Calls showTurn(). + connect(m_game, TQ_SIGNAL(sig_update()), this, TQ_SLOT(showTurn())); + connect(m_game, TQ_SIGNAL(sig_gameOver()), this, TQ_SLOT(slotGameOver())); // Signal that is sent when the user clicks on the board. - connect(m_gameView, TQT_SIGNAL(signalSquareClicked(int, int)), - TQT_TQOBJECT(this), TQT_SLOT(slotSquareClicked(int, int))); + connect(m_gameView, TQ_SIGNAL(signalSquareClicked(int, int)), + this, TQ_SLOT(slotSquareClicked(int, int))); loadSettings(); @@ -150,38 +150,38 @@ KReversi::~KReversi() void KReversi::createTDEActions() { // Standard Game Actions. - KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewGame()), actionCollection(), + KStdGameAction::gameNew(this, TQ_SLOT(slotNewGame()), actionCollection(), "game_new"); - 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(), + KStdGameAction::load(this, TQ_SLOT(slotOpenGame()), actionCollection()); + KStdGameAction::save(this, TQ_SLOT(slotSave()), actionCollection()); + KStdGameAction::quit(this, TQ_SLOT(close()), actionCollection()); + KStdGameAction::hint(this, TQ_SLOT(slotHint()), actionCollection(), "game_hint"); - KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actionCollection(), + KStdGameAction::undo(this, TQ_SLOT(slotUndo()), actionCollection(), "game_undo"); // Non-standard Game Actions: Stop, Continue, Switch sides stopAction = new TDEAction(i18n("&Stop Thinking"), "game_stop", TQt::Key_Escape, - TQT_TQOBJECT(this), TQT_SLOT(slotInterrupt()), actionCollection(), + this, TQ_SLOT(slotInterrupt()), actionCollection(), "game_stop"); continueAction = new TDEAction(i18n("&Continue Thinking"), "reload", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotContinue()), actionCollection(), + this, TQ_SLOT(slotContinue()), actionCollection(), "game_continue"); new TDEAction(i18n("S&witch Sides"), 0, 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSwitchSides()), actionCollection(), + this, TQ_SLOT(slotSwitchSides()), actionCollection(), "game_switch_sides"); // Some more standard game actions: Highscores, Settings. - KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScoreDialog()), actionCollection()); - KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotEditSettings()), actionCollection()); + KStdGameAction::highscores(this, TQ_SLOT(showHighScoreDialog()), actionCollection()); + KStdAction::preferences(this, TQ_SLOT(slotEditSettings()), actionCollection()); // Actions for the view(s). showLastMoveAction = new TDEToggleAction(i18n("Show Last Move"), "lastmoves", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotShowLastMove()), + this, TQ_SLOT(slotShowLastMove()), actionCollection(), "show_last_move"); showLegalMovesAction = new TDEToggleAction(i18n("Show Legal Moves"), "legalmoves", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotShowLegalMoves()), + this, TQ_SLOT(slotShowLegalMoves()), actionCollection(), "show_legal_moves"); } @@ -258,7 +258,7 @@ void KReversi::slotNewGame() void KReversi::slotOpenGame() { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); config->setGroup("Savegame"); if (loadGame(config)) @@ -274,7 +274,7 @@ void KReversi::slotOpenGame() void KReversi::slotSave() { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); config->setGroup("Savegame"); saveGame(config); @@ -344,7 +344,7 @@ void KReversi::slotUndo() void KReversi::slotInterrupt() { - m_engine->setInterrupt(TRUE); + m_engine->setInterrupt(true); // Indicate that the computer was interrupted. showTurn(); @@ -404,7 +404,7 @@ void KReversi::slotSwitchSides() // Update the human color in the window. m_gameView->setHumanColor(m_humanColor); - kapp->processEvents(); + tdeApp->processEvents(); computerMakeMove(); } @@ -706,7 +706,7 @@ bool KReversi::loadGame(TDEConfig *config) m_humanColor = (Color) config->readNumEntry("HumanColor"); m_competitiveGame = (bool) config->readNumEntry("Competitive"); - m_gameView->updateBoard(TRUE); + m_gameView->updateBoard(true); setState(State(config->readNumEntry("State"))); setStrength(config->readNumEntry("Strength", 1)); @@ -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()), TQT_TQOBJECT(this), TQT_SLOT(loadSettings())); + connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(loadSettings())); dialog->show(); } @@ -794,11 +794,11 @@ void KReversi::setState(State newState) m_state = newState; if (m_state == Thinking){ - kapp->setOverrideCursor(waitCursor); + tdeApp->setOverrideCursor(waitCursor); stopAction->setEnabled(true); } else { - kapp->restoreOverrideCursor(); + tdeApp->restoreOverrideCursor(); stopAction->setEnabled(false); } diff --git a/kreversi/kreversi.h b/kreversi/kreversi.h index f8fbaf9e..48d593e7 100644 --- a/kreversi/kreversi.h +++ b/kreversi/kreversi.h @@ -58,7 +58,7 @@ class TDEAction; class KReversi : public KZoomMainWindow { - Q_OBJECT + TQ_OBJECT public: @@ -78,7 +78,7 @@ public: // Methods that deal with the engine. void setStrength(uint); uint strength() const { return m_engine->strength(); } - void interrupt() { m_engine->setInterrupt(TRUE); } + void interrupt() { m_engine->setInterrupt(true); } bool interrupted() const { return (m_game->toMove() == computerColor() && m_state == Ready); } diff --git a/kreversi/kreversi.kcfg b/kreversi/kreversi.kcfg index 64fa5039..37815c42 100644 --- a/kreversi/kreversi.kcfg +++ b/kreversi/kreversi.kcfg @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - <include>kstandarddirs.h</include> + <include>tdestandarddirs.h</include> <include>tdeglobal.h</include> <kcfgfile name="kreversirc"/> <group name="Game"> @@ -55,7 +55,7 @@ </entry> <entry name="BackgroundImage" type="Path"> <label>Image to use as background.</label> - <code>#define PICDATA(x) TDEGlobal::dirs()->findResource("appdata", QString("pics/")+ x)</code> + <code>#define PICDATA(x) TDEGlobal::dirs()->findResource("appdata", TQString("pics/")+ x)</code> <default code="true">PICDATA("background/Light_Wood.png")</default> </entry> <entry name="MenubarVisible" type="Bool" key="menubar visible"> diff --git a/kreversi/kzoommainwindow.cpp b/kreversi/kzoommainwindow.cpp index f8c3c490..ca31e998 100644 --- a/kreversi/kzoommainwindow.cpp +++ b/kreversi/kzoommainwindow.cpp @@ -34,11 +34,11 @@ KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, installEventFilter(this); m_zoomInAction = - KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection()); + KStdAction::zoomIn(this, TQ_SLOT(zoomIn()), actionCollection()); m_zoomOutAction = - KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection()); + KStdAction::zoomOut(this, TQ_SLOT(zoomOut()), actionCollection()); m_menu = - KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); + KStdAction::showMenubar(this, TQ_SLOT(toggleMenubar()), actionCollection()); } @@ -71,7 +71,7 @@ void KZoomMainWindow::addWidget(TQWidget *widget) Q_ASSERT(zm); zm->m_widgets.append(widget); - connect(widget, TQT_SIGNAL(destroyed()), zm, TQT_SLOT(widgetDestroyed())); + connect(widget, TQ_SIGNAL(destroyed()), zm, TQ_SLOT(widgetDestroyed())); } diff --git a/kreversi/kzoommainwindow.h b/kreversi/kzoommainwindow.h index 5b79ad9a..806acf87 100644 --- a/kreversi/kzoommainwindow.h +++ b/kreversi/kzoommainwindow.h @@ -46,7 +46,7 @@ class TDEToggleAction; class KZoomMainWindow : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: /** Constructor. */ diff --git a/kreversi/qreversigame.h b/kreversi/qreversigame.h index 050b790d..3e7388e0 100644 --- a/kreversi/qreversigame.h +++ b/kreversi/qreversigame.h @@ -63,7 +63,7 @@ class TDEConfig; // class QReversiGame : public TQObject, public Game { - Q_OBJECT + TQ_OBJECT public: @@ -77,7 +77,7 @@ class QReversiGame : public TQObject, public Game { #if 0 void loadSettings(); - bool loadGame(TDEConfig *, bool noupdate = FALSE); + bool loadGame(TDEConfig *, bool noupdate = false); void saveGame(TDEConfig *); #endif diff --git a/kreversi/qreversigameview.cpp b/kreversi/qreversigameview.cpp index 02f1ad3d..72dc9fb5 100644 --- a/kreversi/qreversigameview.cpp +++ b/kreversi/qreversigameview.cpp @@ -51,7 +51,7 @@ #include <tqfont.h> #include <tdeapplication.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeconfig.h> #include <knotifyclient.h> #include <tdelocale.h> @@ -135,15 +135,15 @@ QReversiGameView::QReversiGameView(TQWidget *parent, QReversiGame *game) m_humanColor = Nobody; // Connect the game to the view. - connect(m_game, TQT_SIGNAL(sig_newGame()), this, TQT_SLOT(newGame())); - connect(m_game, TQT_SIGNAL(sig_move(uint, Move&)), - this, TQT_SLOT(moveMade(uint, Move&))); - connect(m_game, TQT_SIGNAL(sig_update()), this, TQT_SLOT(updateView())); + connect(m_game, TQ_SIGNAL(sig_newGame()), this, TQ_SLOT(newGame())); + connect(m_game, TQ_SIGNAL(sig_move(uint, Move&)), + this, TQ_SLOT(moveMade(uint, Move&))); + connect(m_game, TQ_SIGNAL(sig_update()), this, TQ_SLOT(updateView())); // The sig_gameOver signal is not used by the view. // Reemit the signal from the board. - connect(m_boardView, TQT_SIGNAL(signalSquareClicked(int, int)), - this, TQT_SLOT(squareClicked(int, int))); + connect(m_boardView, TQ_SIGNAL(signalSquareClicked(int, int)), + this, TQ_SLOT(squareClicked(int, int))); } diff --git a/kreversi/qreversigameview.h b/kreversi/qreversigameview.h index e6ecf0fa..3adc112c 100644 --- a/kreversi/qreversigameview.h +++ b/kreversi/qreversigameview.h @@ -57,7 +57,7 @@ class QReversiGame; class StatusWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -77,7 +77,7 @@ private: // The main game view class QReversiGameView : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -130,7 +130,7 @@ public slots: void updateView(); // Update the entire view. void updateStatus(); // Update the status widgets (score) - void updateBoard(bool force = FALSE); // Update the board. + void updateBoard(bool force = false); // Update the board. void updateMovelist(); // Update the move list. signals: diff --git a/kreversi/settings.ui b/kreversi/settings.ui index 0be0825f..5bb20989 100644 --- a/kreversi/settings.ui +++ b/kreversi/settings.ui @@ -85,9 +85,6 @@ <property name="text"> <string>Casually</string> </property> - <property name="accel"> - <string></string> - </property> <property name="checked"> <bool>true</bool> </property> @@ -99,9 +96,6 @@ <property name="text"> <string>Competitively</string> </property> - <property name="accel"> - <string></string> - </property> </widget> </vbox> </widget> |
