diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /klickety | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-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 'klickety')
-rw-r--r-- | klickety/board.cpp | 6 | ||||
-rw-r--r-- | klickety/board.h | 3 | ||||
-rw-r--r-- | klickety/field.cpp | 8 | ||||
-rw-r--r-- | klickety/field.h | 3 | ||||
-rw-r--r-- | klickety/main.h | 9 | ||||
-rw-r--r-- | klickety/piece.cpp | 2 |
6 files changed, 17 insertions, 14 deletions
diff --git a/klickety/board.cpp b/klickety/board.cpp index b60e766a..4b531b5b 100644 --- a/klickety/board.cpp +++ b/klickety/board.cpp @@ -8,7 +8,7 @@ using namespace KGrid2D; void KLBoard::contentsMouseReleaseEvent(TQMouseEvent *e) { - if ( e->button()!=LeftButton || blocked ) return; + if ( e->button()!=Qt::LeftButton || blocked ) return; TQCanvasItemList list = canvas()->collisions(e->pos()); if ( list.count()==0 ) return; @@ -26,8 +26,8 @@ void KLBoard::contentsMouseReleaseEvent(TQMouseEvent *e) } } -KLBoard::KLBoard(TQWidget *parent) - : BaseBoard(true, parent), +KLBoard::KLBoard(TQWidget *tqparent) + : BaseBoard(true, tqparent), field(matrix().width(), matrix().height()), empty(matrix().width()), blocked(false) diff --git a/klickety/board.h b/klickety/board.h index 472556b7..f67e4926 100644 --- a/klickety/board.h +++ b/klickety/board.h @@ -7,8 +7,9 @@ class KLBoard : public BaseBoard { Q_OBJECT + TQ_OBJECT public: - KLBoard(TQWidget *parent); + KLBoard(TQWidget *tqparent); void start(const GTInitData &data); diff --git a/klickety/field.cpp b/klickety/field.cpp index 67533acc..1c497eb2 100644 --- a/klickety/field.cpp +++ b/klickety/field.cpp @@ -11,8 +11,8 @@ #include "base/board.h" -Field::Field(TQWidget *parent) - : TQWidget(parent, "field"), BaseField(this) +Field::Field(TQWidget *tqparent) + : TQWidget(tqparent, "field"), BaseField(this) { KGameLCDList *sc = new KGameLCDList(i18n("Remaining blocks"), this); showScore = new KGameLCD(3, sc); @@ -37,7 +37,7 @@ Field::Field(TQWidget *parent) connect(board, TQT_SIGNAL(gameOverSignal()), TQT_SLOT(gameOver())); settingsChanged(); - connect(parent, TQT_SIGNAL(settingsChanged()), TQT_SLOT(settingsChanged())); + connect(tqparent, TQT_SIGNAL(settingsChanged()), TQT_SLOT(settingsChanged())); TQTimer::singleShot(0, this, TQT_SLOT(start())); } @@ -52,7 +52,7 @@ void Field::pause() void Field::start() { - init(false, false, true, true, TQString::null); + init(false, false, true, true, TQString()); GTInitData data; data.seed = kapp->random(); BaseField::start(data); diff --git a/klickety/field.h b/klickety/field.h index 7f1acb4f..64951006 100644 --- a/klickety/field.h +++ b/klickety/field.h @@ -11,8 +11,9 @@ class KGameLCDClock; class Field : public TQWidget, public BaseField, public BaseInterface { Q_OBJECT + TQ_OBJECT public: - Field(TQWidget *parent); + Field(TQWidget *tqparent); private slots: void scoreUpdatedSlot() { scoreUpdated(); } diff --git a/klickety/main.h b/klickety/main.h index 54443103..6ff71a4c 100644 --- a/klickety/main.h +++ b/klickety/main.h @@ -13,15 +13,16 @@ class KLFactory : public BaseFactory KLFactory(); protected: - virtual BaseBoard *createBoard(bool, TQWidget *parent) - { return new KLBoard(parent); } - virtual BaseInterface *createInterface(TQWidget *parent) - { return new Field(parent); } + virtual BaseBoard *createBoard(bool, TQWidget *tqparent) + { return new KLBoard(tqparent); } + virtual BaseInterface *createInterface(TQWidget *tqparent) + { return new Field(tqparent); } }; class KLMainWindow : public BaseMainWindow { Q_OBJECT + TQ_OBJECT public: KLMainWindow(); }; diff --git a/klickety/piece.cpp b/klickety/piece.cpp index fcc2fdff..2d35300b 100644 --- a/klickety/piece.cpp +++ b/klickety/piece.cpp @@ -17,7 +17,7 @@ TQColor KLPieceInfo::defaultColor(uint i) const TQString KLPieceInfo::colorLabel(uint i) const { - return i18n("Color #%1:").arg(i+1); + return i18n("Color #%1:").tqarg(i+1); } void KLPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint bMode, |