summaryrefslogtreecommitdiffstats
path: root/kfouleggs
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /kfouleggs
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfouleggs')
-rw-r--r--kfouleggs/ai.h1
-rw-r--r--kfouleggs/board.cpp4
-rw-r--r--kfouleggs/board.h3
-rw-r--r--kfouleggs/field.cpp4
-rw-r--r--kfouleggs/field.h3
-rw-r--r--kfouleggs/main.cpp4
-rw-r--r--kfouleggs/main.h11
-rw-r--r--kfouleggs/piece.cpp8
8 files changed, 21 insertions, 17 deletions
diff --git a/kfouleggs/ai.h b/kfouleggs/ai.h
index 86e8f5b2..9885d3c8 100644
--- a/kfouleggs/ai.h
+++ b/kfouleggs/ai.h
@@ -7,6 +7,7 @@
class FEAI : public AI
{
Q_OBJECT
+ TQ_OBJECT
public:
FEAI();
diff --git a/kfouleggs/board.cpp b/kfouleggs/board.cpp
index 5383c619..e719ce2f 100644
--- a/kfouleggs/board.cpp
+++ b/kfouleggs/board.cpp
@@ -9,8 +9,8 @@
using namespace KGrid2D;
-FEBoard::FEBoard(bool graphic, TQWidget *parent)
-: Board(graphic, new GiftPool(parent), parent),
+FEBoard::FEBoard(bool graphic, TQWidget *tqparent)
+: Board(graphic, new GiftPool(tqparent), tqparent),
_field(matrix().width(), matrix().height()), _chainedPuyos(4)
{
init();
diff --git a/kfouleggs/board.h b/kfouleggs/board.h
index da5a6275..e3b4229e 100644
--- a/kfouleggs/board.h
+++ b/kfouleggs/board.h
@@ -7,8 +7,9 @@
class FEBoard : public Board
{
Q_OBJECT
+ TQ_OBJECT
public:
- FEBoard(bool graphic, TQWidget *parent);
+ FEBoard(bool graphic, TQWidget *tqparent);
void copy(const GenericTetris &);
void start(const GTInitData &);
diff --git a/kfouleggs/field.cpp b/kfouleggs/field.cpp
index ae9bcdce..997e4f48 100644
--- a/kfouleggs/field.cpp
+++ b/kfouleggs/field.cpp
@@ -10,8 +10,8 @@
#include "board.h"
-FEField::FEField(TQWidget *parent)
- : Field(parent)
+FEField::FEField(TQWidget *tqparent)
+ : Field(tqparent)
{
Board *b = static_cast<Board *>(board);
TQWhatsThis::add(b->giftPool(), i18n("Display the amount of foul eggs sent by your opponent."));
diff --git a/kfouleggs/field.h b/kfouleggs/field.h
index a1c9824e..59cdcee8 100644
--- a/kfouleggs/field.h
+++ b/kfouleggs/field.h
@@ -8,8 +8,9 @@
class FEField : public Field
{
Q_OBJECT
+ TQ_OBJECT
public:
- FEField(TQWidget *parent);
+ FEField(TQWidget *tqparent);
private slots:
virtual void removedUpdated();
diff --git a/kfouleggs/main.cpp b/kfouleggs/main.cpp
index 89295d08..ce083c7c 100644
--- a/kfouleggs/main.cpp
+++ b/kfouleggs/main.cpp
@@ -65,9 +65,9 @@ FEFactory::FEFactory()
: CommonFactory(MAIN_DATA, BASE_BOARD_INFO, COMMON_BOARD_INFO)
{}
-BaseInterface *FEFactory::createInterface(TQWidget *parent)
+BaseInterface *FEFactory::createInterface(TQWidget *tqparent)
{
- return new Interface(MP_GAME_INFO, parent);
+ return new Interface(MP_GAME_INFO, tqparent);
}
diff --git a/kfouleggs/main.h b/kfouleggs/main.h
index 52108b2d..12aca31f 100644
--- a/kfouleggs/main.h
+++ b/kfouleggs/main.h
@@ -15,11 +15,11 @@ class FEFactory : public CommonFactory
FEFactory();
protected:
- virtual BaseBoard *createBoard(bool graphic, TQWidget *parent)
- { return new FEBoard(graphic, parent); }
- virtual BaseField *createField(TQWidget *parent)
- { return new FEField(parent); }
- virtual BaseInterface *createInterface(TQWidget *parent);
+ virtual BaseBoard *createBoard(bool graphic, TQWidget *tqparent)
+ { return new FEBoard(graphic, tqparent); }
+ virtual BaseField *createField(TQWidget *tqparent)
+ { return new FEField(tqparent); }
+ virtual BaseInterface *createInterface(TQWidget *tqparent);
virtual AI *createAI() { return new FEAI; }
};
@@ -27,6 +27,7 @@ class FEFactory : public CommonFactory
class FEMainWindow : public MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
FEMainWindow() { init(); }
};
diff --git a/kfouleggs/piece.cpp b/kfouleggs/piece.cpp
index bb5aad42..c2e8a186 100644
--- a/kfouleggs/piece.cpp
+++ b/kfouleggs/piece.cpp
@@ -28,7 +28,7 @@ TQColor FEPieceInfo::defaultColor(uint i) const
TQString FEPieceInfo::colorLabel(uint i) const
{
return (i==NB_NORM_BLOCK_TYPES ? i18n("Garbage color:")
- : i18n("Color #%1:").arg(i+1));
+ : i18n("Color #%1:").tqarg(i+1));
}
void FEPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint,
@@ -44,8 +44,8 @@ void FEPieceInfo::setMask(TQPixmap *pixmap, uint blockMode) const
Q_ASSERT( pixmap->width()==pixmap->height() ); // drawing code assumes that
TQBitmap bitmap(pixmap->size(), true);
TQPainter p(&bitmap);
- p.setBrush(Qt::color1);
- p.setPen( TQPen(Qt::NoPen) );
+ p.setBrush(TQt::color1);
+ p.setPen( TQPen(TQt::NoPen) );
// base circle
int w = pixmap->width();
@@ -66,7 +66,7 @@ void FEPieceInfo::setMask(TQPixmap *pixmap, uint blockMode) const
if ( blockMode & BaseBoard::Left ) p.drawRect( 0, 0, a, w);
// second drawing with color0
- p.setBrush(Qt::color0);
+ p.setBrush(TQt::color0);
if ( (blockMode & BaseBoard::Up) || (blockMode & BaseBoard::Left) ) {
cr.moveCenter(TQPoint(0, 0));
p.drawEllipse(cr);