Fix kdegames/Qt3 FTBFS

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1237329 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 029364878a
commit 66c292188f

@ -362,8 +362,8 @@ void KBgBoard::queryCube()
{
KBgtqStatus *st = new KBgtqStatus();
getState(st);
KBgBoardTQCube *dlg =
new KBgBoardTQCube(abs(st->cube()), (st->cube(US) > 0), (st->cube(THEM) > 0));
KBgBoardQCube *dlg =
new KBgBoardQCube(abs(st->cube()), (st->cube(US) > 0), (st->cube(THEM) > 0));
if (dlg->exec()) {
bool u = ((dlg->getCubeValue() == 0) || (dlg->getCubeOwner() == US ));
bool t = ((dlg->getCubeValue() == 0) || (dlg->getCubeOwner() == THEM));
@ -377,7 +377,7 @@ void KBgBoard::queryCube()
/*
* Constructor, creates the dialog but does not show nor execute it.
*/
KBgBoardTQCube::KBgBoardTQCube(int val, bool us, bool them)
KBgBoardQCube::KBgBoardQCube(int val, bool us, bool them)
: TQDialog(0, 0, true)
{
setCaption(i18n("Set Cube Values"));
@ -481,7 +481,7 @@ KBgBoardTQCube::KBgBoardTQCube(int val, bool us, bool them)
/*
* Deconstructor, empty.
*/
KBgBoardTQCube::~KBgBoardTQCube()
KBgBoardQCube::~KBgBoardQCube()
{
// nothing
}
@ -489,7 +489,7 @@ KBgBoardTQCube::~KBgBoardTQCube()
/*
* Get the face value of the cube
*/
int KBgBoardTQCube::getCubeValue()
int KBgBoardQCube::getCubeValue()
{
return cb[0]->currentItem();
}
@ -497,7 +497,7 @@ int KBgBoardTQCube::getCubeValue()
/*
* Get the owner of the cube
*/
int KBgBoardTQCube::getCubeOwner()
int KBgBoardQCube::getCubeOwner()
{
return cb[1]->currentItem();
}
@ -505,7 +505,7 @@ int KBgBoardTQCube::getCubeOwner()
/*
* If the cube is open, the value can only be 1
*/
void KBgBoardTQCube::changeValue(int player)
void KBgBoardQCube::changeValue(int player)
{
if (player == BOTH)
cb[0]->setCurrentItem(0);
@ -516,7 +516,7 @@ void KBgBoardTQCube::changeValue(int player)
* If the value is 1, the cube has to be open; and if the value
* becomes bigger than 1, the player cannot stay open.
*/
void KBgBoardTQCube::changePlayer(int val)
void KBgBoardQCube::changePlayer(int val)
{
if (val == 0)
cb[1]->setCurrentItem(BOTH);
@ -527,7 +527,7 @@ void KBgBoardTQCube::changePlayer(int val)
/*
* Constructor, creates the dialog but does not show nor execute it.
*/
KBgBoardTQDice::KBgBoardTQDice(const char *name)
KBgBoardQDice::KBgBoardQDice(const char *name)
: TQDialog(0, name, true)
{
setCaption(i18n("Set Dice Values"));
@ -590,7 +590,7 @@ KBgBoardTQDice::KBgBoardTQDice(const char *name)
/*
* Deconstructor, empty.
*/
KBgBoardTQDice::~KBgBoardTQDice()
KBgBoardQDice::~KBgBoardQDice()
{
// nothing
}
@ -598,7 +598,7 @@ KBgBoardTQDice::~KBgBoardTQDice()
/*
* Get the face value of the dice
*/
int KBgBoardTQDice::getDice(int n)
int KBgBoardQDice::getDice(int n)
{
return sb[n]->value();
}
@ -1335,7 +1335,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e)
if (r.tqcontains(e->pos())) {
if (board->getEditMode()) {
KBgBoardTQDice *dlg = new KBgBoardTQDice();
KBgBoardQDice *dlg = new KBgBoardQDice();
if (dlg->exec()) {
KBgtqStatus *st = new KBgtqStatus();
board->getState(st);
@ -2164,7 +2164,7 @@ void KBgBoardCell::mouseMoveEvent(TQMouseEvent *)
pix.setMask(pix.createHeuristicMask());
TQBitmap tqmask = *(pix.tqmask());
TQBitmap newCursor;
newCursor = TQBitmap(pix);
newCursor = pix;
board->replaceCursor(TQCursor(newCursor, tqmask));
if (board->getEditMode())
board->storeTurn(pcs);

@ -87,7 +87,7 @@ class KBgBoardMove;
class KBgBoardHome;
class KBgBoardBar;
class KBgBoardField;
class KBgBoardTQDice;
class KBgBoardQDice;
/**
@ -821,7 +821,7 @@ class KBgBoardMove
*
* A very simple dialog with two SpinBoxes and two buttons.
*/
class KBgBoardTQDice : public TQDialog
class KBgBoardQDice : public TQDialog
{
Q_OBJECT
TQ_OBJECT
@ -831,8 +831,8 @@ public:
/**
* Constructor and destructor
*/
KBgBoardTQDice(const char *name = 0);
virtual ~KBgBoardTQDice();
KBgBoardQDice(const char *name = 0);
virtual ~KBgBoardQDice();
protected:
@ -855,7 +855,7 @@ public slots:
/**
* Simple dialog that allows to query the user for the cube value.
*/
class KBgBoardTQCube : public TQDialog
class KBgBoardQCube : public TQDialog
{
Q_OBJECT
TQ_OBJECT
@ -865,8 +865,8 @@ public:
/**
* Constructor and destructor
*/
KBgBoardTQCube(int val, bool us, bool them);
virtual ~KBgBoardTQCube();
KBgBoardQCube(int val, bool us, bool them);
virtual ~KBgBoardQCube();
protected:

@ -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() ) {

@ -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;

@ -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.

@ -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.
};

@ -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();

@ -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();

@ -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;

@ -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;

Loading…
Cancel
Save