diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:37:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:37:33 +0000 |
commit | 66c292188f8ab6951b32c07f13dc93cce847a688 (patch) | |
tree | d23ba9c73758114c7b1a5ad29c1f59f8e5088c7a /kreversi | |
parent | 029364878a9576fe8cd084f528b151ef7eee6b5d (diff) | |
download | tdegames-66c292188f8ab6951b32c07f13dc93cce847a688.tar.gz tdegames-66c292188f8ab6951b32c07f13dc93cce847a688.zip |
Fix kdegames/Qt3 FTBFS
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1237329 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kreversi')
-rw-r--r-- | kreversi/board.cpp | 56 | ||||
-rw-r--r-- | kreversi/board.h | 10 | ||||
-rw-r--r-- | kreversi/kreversi.cpp | 4 | ||||
-rw-r--r-- | kreversi/kreversi.h | 4 | ||||
-rw-r--r-- | kreversi/qreversigame.cpp | 12 | ||||
-rw-r--r-- | kreversi/qreversigame.h | 8 | ||||
-rw-r--r-- | kreversi/qreversigameview.cpp | 26 | ||||
-rw-r--r-- | kreversi/qreversigameview.h | 12 |
8 files changed, 66 insertions, 66 deletions
diff --git a/kreversi/board.cpp b/kreversi/board.cpp index b3f75663..644111d2 100644 --- a/kreversi/board.cpp +++ b/kreversi/board.cpp @@ -71,7 +71,7 @@ const uint CHIP_SIZE = 36; // class KReversiBoardView -TQReversiBoardView::TQReversiBoardView(TQWidget *tqparent, TQReversiGame *krgame) +QReversiBoardView::QReversiBoardView(TQWidget *tqparent, QReversiGame *krgame) : TQWidget(tqparent, "board"), chiptype(Unloaded) { @@ -86,7 +86,7 @@ TQReversiBoardView::TQReversiBoardView(TQWidget *tqparent, TQReversiGame *krgame } -TQReversiBoardView::~TQReversiBoardView() +QReversiBoardView::~QReversiBoardView() { } @@ -97,14 +97,14 @@ TQReversiBoardView::~TQReversiBoardView() // Start it all up. // -void TQReversiBoardView::start() +void QReversiBoardView::start() { updateBoard(true); adjustSize(); } -void TQReversiBoardView::loadChips(ChipType type) +void QReversiBoardView::loadChips(ChipType type) { TQString name("pics/"); name += (type==Colored ? "chips.png" : "chips_mono.png"); @@ -123,7 +123,7 @@ void TQReversiBoardView::loadChips(ChipType type) // no animations are displayed. // -void TQReversiBoardView::setAnimationSpeed(uint speed) +void QReversiBoardView::setAnimationSpeed(uint speed) { if (speed <= 10) anim_speed = speed; @@ -133,7 +133,7 @@ void TQReversiBoardView::setAnimationSpeed(uint speed) // Handle mouse clicks. // -void TQReversiBoardView::mousePressEvent(TQMouseEvent *e) +void QReversiBoardView::mousePressEvent(TQMouseEvent *e) { // Only handle left button. No context menu. if ( e->button() != Qt::LeftButton ) { @@ -155,7 +155,7 @@ void TQReversiBoardView::mousePressEvent(TQMouseEvent *e) } -void TQReversiBoardView::showHint(Move move) +void QReversiBoardView::showHint(Move move) { // Only show a hint if there is a move to show. if (move.x() == -1) @@ -201,26 +201,26 @@ void TQReversiBoardView::showHint(Move move) // end, if it is running. // -void TQReversiBoardView::quitHint() +void QReversiBoardView::quitHint() { m_hintShowing = false; } -void TQReversiBoardView::setShowLegalMoves(bool show) +void QReversiBoardView::setShowLegalMoves(bool show) { m_legalMovesShowing = show; updateBoard(true); } -void TQReversiBoardView::setShowMarks(bool show) +void QReversiBoardView::setShowMarks(bool show) { m_marksShowing = show; updateBoard(true); } -void TQReversiBoardView::setShowLastMove(bool show) +void QReversiBoardView::setShowLastMove(bool show) { m_showLastMove = show; updateBoard(true); @@ -236,7 +236,7 @@ void TQReversiBoardView::setShowLastMove(bool show) // NOTE: This code is quite a hack. Should make it better. // -void TQReversiBoardView::animateChanged(Move move) +void QReversiBoardView::animateChanged(Move move) { if (anim_speed == 0) return; @@ -252,13 +252,13 @@ void TQReversiBoardView::animateChanged(Move move) } -bool TQReversiBoardView::isField(int row, int col) const +bool QReversiBoardView::isField(int row, int col) const { return ((0 <= row) && (row < 8) && (0 <= col) && (col < 8)); } -void TQReversiBoardView::animateChangedRow(int row, int col, int dy, int dx) +void QReversiBoardView::animateChangedRow(int row, int col, int dy, int dx) { row = row + dy; col = col + dx; @@ -275,7 +275,7 @@ void TQReversiBoardView::animateChangedRow(int row, int col, int dy, int dx) } -void TQReversiBoardView::rotateChip(uint row, uint col) +void QReversiBoardView::rotateChip(uint row, uint col) { // Check which direction the chip has to be rotated. If the new // chip is white, the chip was black first, so lets begin at index @@ -301,7 +301,7 @@ void TQReversiBoardView::rotateChip(uint row, uint col) // m_krgame->squareModified(col, row)). // -void TQReversiBoardView::updateBoard (bool force) +void QReversiBoardView::updateBoard (bool force) { TQPainter p(this); p.setPen(black); @@ -402,7 +402,7 @@ void TQReversiBoardView::updateBoard (bool force) // Show legal moves on the board. -void TQReversiBoardView::showLegalMoves() +void QReversiBoardView::showLegalMoves() { TQPainter p(this); p.setPen(black); @@ -418,7 +418,7 @@ void TQReversiBoardView::showLegalMoves() } -void TQReversiBoardView::drawSmallCircle(int x, int y, TQPainter &p) +void QReversiBoardView::drawSmallCircle(int x, int y, TQPainter &p) { int offset = m_marksShowing ? OFFSET() : 0; int ellipseSize = zoomedSize() / 3; @@ -432,7 +432,7 @@ void TQReversiBoardView::drawSmallCircle(int x, int y, TQPainter &p) -TQPixmap TQReversiBoardView::chipPixmap(Color color, uint size) const +TQPixmap QReversiBoardView::chipPixmap(Color color, uint size) const { return chipPixmap(CHIP_OFFSET[color], size); } @@ -441,7 +441,7 @@ TQPixmap TQReversiBoardView::chipPixmap(Color color, uint size) const // Get a pixmap for the chip 'i' at size 'size'. // -TQPixmap TQReversiBoardView::chipPixmap(uint i, uint size) const +TQPixmap QReversiBoardView::chipPixmap(uint i, uint size) const { // Get the part of the 'allchips' pixmap that contains exactly that // chip that we want to use. @@ -457,20 +457,20 @@ TQPixmap TQReversiBoardView::chipPixmap(uint i, uint size) const } -uint TQReversiBoardView::zoomedSize() const +uint QReversiBoardView::zoomedSize() const { return tqRound(float(CHIP_SIZE) * Prefs::zoom() / 100); } -void TQReversiBoardView::drawPiece(uint row, uint col, Color color) +void QReversiBoardView::drawPiece(uint row, uint col, Color color) { int i = (color == Nobody ? -1 : int(CHIP_OFFSET[color])); drawOnePiece(row, col, i); } -void TQReversiBoardView::drawOnePiece(uint row, uint col, int i) +void QReversiBoardView::drawOnePiece(uint row, uint col, int i) { int px = col * zoomedSize() + 1; int py = row * zoomedSize() + 1; @@ -502,13 +502,13 @@ void TQReversiBoardView::drawOnePiece(uint row, uint col, int i) // entire board. // -void TQReversiBoardView::paintEvent(TQPaintEvent *) +void QReversiBoardView::paintEvent(TQPaintEvent *) { updateBoard(true); } -void TQReversiBoardView::adjustSize() +void QReversiBoardView::adjustSize() { int w = 8 * zoomedSize(); @@ -519,7 +519,7 @@ void TQReversiBoardView::adjustSize() } -void TQReversiBoardView::setPixmap(TQPixmap &pm) +void QReversiBoardView::setPixmap(TQPixmap &pm) { if ( pm.width() == 0 ) return; @@ -530,7 +530,7 @@ void TQReversiBoardView::setPixmap(TQPixmap &pm) } -void TQReversiBoardView::setColor(const TQColor &c) +void QReversiBoardView::setColor(const TQColor &c) { bgColor = c; bg = TQPixmap(); @@ -542,7 +542,7 @@ void TQReversiBoardView::setColor(const TQColor &c) // Load all settings that have to do with the board view, such as // piece colors, background, animation speed, an so on. -void TQReversiBoardView::loadSettings() +void QReversiBoardView::loadSettings() { // Colors of the pieces (red/blue or black/white) if ( Prefs::grayscale() ) { diff --git a/kreversi/board.h b/kreversi/board.h index 59c9463c..68f211d4 100644 --- a/kreversi/board.h +++ b/kreversi/board.h @@ -49,19 +49,19 @@ class KConfig; -class TQReversiGame; +class QReversiGame; // The class Board is the visible Reversi Board widget. // -class TQReversiBoardView : public TQWidget { +class QReversiBoardView : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQReversiBoardView(TQWidget *tqparent, TQReversiGame *game); - ~TQReversiBoardView(); + QReversiBoardView(TQWidget *tqparent, QReversiGame *game); + ~QReversiBoardView(); // starts all: emits some signal, so it can't be called from // constructor @@ -125,7 +125,7 @@ private: private: - TQReversiGame *m_krgame; // Pointer to the game object (not owner). + QReversiGame *m_krgame; // Pointer to the game object (not owner). // The background of the board - a color and a pixmap. TQColor bgColor; diff --git a/kreversi/kreversi.cpp b/kreversi/kreversi.cpp index 0305dda9..4c72251b 100644 --- a/kreversi/kreversi.cpp +++ b/kreversi/kreversi.cpp @@ -88,7 +88,7 @@ KReversi::KReversi() KNotifyClient::startDaemon(); // The game. - m_game = new TQReversiGame(); + m_game = new QReversiGame(); 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 TQReversiGameView(w, m_game); + m_gameView = new QReversiGameView(w, m_game); top->addMultiCellWidget(m_gameView, 0, 1, 0, 0); // Populate the GUI. diff --git a/kreversi/kreversi.h b/kreversi/kreversi.h index 1be7069d..dd66e63d 100644 --- a/kreversi/kreversi.h +++ b/kreversi/kreversi.h @@ -158,7 +158,7 @@ private: KToggleAction *showLegalMovesAction; // The game itself and game properties - TQReversiGame *m_game; // The main document - the game + QReversiGame *m_game; // The main document - the game Color m_humanColor; // The Color of the human player. bool m_gameOver; // True if the game is over @@ -171,7 +171,7 @@ private: Engine *m_engine; // The AI that creates the computers moves. // Widgets - TQReversiGameView *m_gameView; // The board widget. + QReversiGameView *m_gameView; // The board widget. }; diff --git a/kreversi/qreversigame.cpp b/kreversi/qreversigame.cpp index d126789a..361adbd8 100644 --- a/kreversi/qreversigame.cpp +++ b/kreversi/qreversigame.cpp @@ -41,21 +41,21 @@ // ================================================================ -// class TQReversiGame +// class QReversiGame -TQReversiGame::TQReversiGame(TQObject *tqparent) +QReversiGame::QReversiGame(TQObject *tqparent) : TQObject(tqparent), Game() { } -TQReversiGame::~TQReversiGame() +QReversiGame::~QReversiGame() { } -void TQReversiGame::newGame() +void QReversiGame::newGame() { Game::newGame(); @@ -63,7 +63,7 @@ void TQReversiGame::newGame() } -bool TQReversiGame::doMove(Move move) +bool QReversiGame::doMove(Move move) { bool retval = Game::doMove(move); if (!retval) @@ -78,7 +78,7 @@ bool TQReversiGame::doMove(Move move) } -bool TQReversiGame::undoMove() +bool QReversiGame::undoMove() { bool retval = Game::undoMove(); diff --git a/kreversi/qreversigame.h b/kreversi/qreversigame.h index 875d2c07..e3b8893a 100644 --- a/kreversi/qreversigame.h +++ b/kreversi/qreversigame.h @@ -52,7 +52,7 @@ class KConfig; // The main document class in the reversi program. The thing that -// makes this a TQReversiGame instead of just a ReversiGame is that it +// makes this a QReversiGame instead of just a ReversiGame is that it // emits signals that can be used to update a view. // // Signals: @@ -62,13 +62,13 @@ class KConfig; // gameOver() // -class TQReversiGame : public TQObject, public Game { +class QReversiGame : public TQObject, public Game { Q_OBJECT TQ_OBJECT public: - TQReversiGame(TQObject *tqparent = 0); - ~TQReversiGame(); + QReversiGame(TQObject *tqparent = 0); + ~QReversiGame(); // Methods dealing with the game void newGame(); diff --git a/kreversi/qreversigameview.cpp b/kreversi/qreversigameview.cpp index e6a17cbf..87b29a60 100644 --- a/kreversi/qreversigameview.cpp +++ b/kreversi/qreversigameview.cpp @@ -119,10 +119,10 @@ void StatusWidget::setScore(uint s) // ================================================================ -// class TQReversiGameView +// class QReversiGameView -TQReversiGameView::TQReversiGameView(TQWidget *tqparent, TQReversiGame *game) +QReversiGameView::QReversiGameView(TQWidget *tqparent, QReversiGame *game) : TQWidget(tqparent, "gameview") { // Store a pointer to the game. @@ -147,19 +147,19 @@ TQReversiGameView::TQReversiGameView(TQWidget *tqparent, TQReversiGame *game) } -TQReversiGameView::~TQReversiGameView() +QReversiGameView::~QReversiGameView() { } // Create the entire view. Only called once from the constructor. -void TQReversiGameView::createView() +void QReversiGameView::createView() { TQGridLayout *tqlayout = new TQGridLayout(this, 4, 2); // The board - m_boardView = new TQReversiBoardView(this, m_game); + m_boardView = new QReversiBoardView(this, m_game); m_boardView->loadSettings(); // Load the pixmaps used in the status widgets. tqlayout->addMultiCellWidget(m_boardView, 0, 3, 0, 0); @@ -189,7 +189,7 @@ void TQReversiGameView::createView() // Recieves the sig_newGame signal from the game. -void TQReversiGameView::newGame() +void QReversiGameView::newGame() { m_boardView->updateBoard(true); m_movesView->clear(); @@ -199,7 +199,7 @@ void TQReversiGameView::newGame() // Recieves the sig_move signal from the game. -void TQReversiGameView::moveMade(uint moveNum, Move &move) +void QReversiGameView::moveMade(uint moveNum, Move &move) { //FIXME: Error checks. TQString colorsWB[] = { @@ -232,7 +232,7 @@ void TQReversiGameView::moveMade(uint moveNum, Move &move) // Recieves the sig_update signal from the game, and can be called // whenever a total update of the view is required. -void TQReversiGameView::updateView() +void QReversiGameView::updateView() { m_boardView->updateBoard(true); updateMovelist(); @@ -242,7 +242,7 @@ void TQReversiGameView::updateView() // Only updates the status widgets (score). -void TQReversiGameView::updatetqStatus() +void QReversiGameView::updatetqStatus() { m_blacktqStatus->setScore(m_game->score(Black)); m_whitetqStatus->setScore(m_game->score(White)); @@ -251,7 +251,7 @@ void TQReversiGameView::updatetqStatus() // Only updates the status board. -void TQReversiGameView::updateBoard(bool force) +void QReversiGameView::updateBoard(bool force) { m_boardView->updateBoard(force); } @@ -260,7 +260,7 @@ void TQReversiGameView::updateBoard(bool force) // Only updates the movelist. This method regenerates the list from // scratch. -void TQReversiGameView::updateMovelist() +void QReversiGameView::updateMovelist() { // FIXME: NYI } @@ -270,7 +270,7 @@ void TQReversiGameView::updateMovelist() // access to the internal board view. // -void TQReversiGameView::squareClicked(int row, int col) +void QReversiGameView::squareClicked(int row, int col) { emit signalSquareClicked(row, col); } @@ -280,7 +280,7 @@ void TQReversiGameView::squareClicked(int row, int col) // Other public methods. -void TQReversiGameView::setHumanColor(Color color) +void QReversiGameView::setHumanColor(Color color) { m_humanColor = color; diff --git a/kreversi/qreversigameview.h b/kreversi/qreversigameview.h index 628c4637..4f7696b6 100644 --- a/kreversi/qreversigameview.h +++ b/kreversi/qreversigameview.h @@ -52,7 +52,7 @@ class KConfig; class TQLabel; -class TQReversiGame; +class QReversiGame; class StatusWidget : public TQWidget @@ -76,14 +76,14 @@ private: // The main game view -class TQReversiGameView : public TQWidget { +class QReversiGameView : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQReversiGameView(TQWidget *tqparent, TQReversiGame *game); - ~TQReversiGameView(); + QReversiGameView(TQWidget *tqparent, QReversiGame *game); + ~QReversiGameView(); // Proxy methods for the board view void showHint(Move move) { m_boardView->showHint(move); } @@ -146,12 +146,12 @@ private: private: // Pointer to the game we are displaying - TQReversiGame *m_game; // Pointer to the game object (not owner). + QReversiGame *m_game; // Pointer to the game object (not owner). Color m_humanColor; // Widgets in the view. - TQReversiBoardView *m_boardView; + QReversiBoardView *m_boardView; TQListBox *m_movesView; StatusWidget *m_blacktqStatus; StatusWidget *m_whitetqStatus; |