summaryrefslogtreecommitdiffstats
path: root/ksmiletris/gamewindow.cpp
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 /ksmiletris/gamewindow.cpp
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 'ksmiletris/gamewindow.cpp')
-rw-r--r--ksmiletris/gamewindow.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/ksmiletris/gamewindow.cpp b/ksmiletris/gamewindow.cpp
index 991ff1c3..c28a81d2 100644
--- a/ksmiletris/gamewindow.cpp
+++ b/ksmiletris/gamewindow.cpp
@@ -46,40 +46,40 @@ GameWindow::GameWindow(TQWidget *, const char *name)
: KMainWindow(0, name)
{
//New Games
- (void)KStdGameAction::gameNew(this,
+ (void)KStdGameAction::gameNew(TQT_TQOBJECT(this),
TQT_SLOT(menu_newGame()),
actionCollection());
//Pause Game
- (void)KStdGameAction::pause(this,
+ (void)KStdGameAction::pause(TQT_TQOBJECT(this),
TQT_SLOT(menu_pause()),
actionCollection());
//End Game
- (void)KStdGameAction::end(this,
+ (void)KStdGameAction::end(TQT_TQOBJECT(this),
TQT_SLOT(menu_endGame()),
actionCollection());
//Highscores
- (void)KStdGameAction::highscores(this,
+ (void)KStdGameAction::highscores(TQT_TQOBJECT(this),
TQT_SLOT(menu_highScores()),
actionCollection());
//Quit
- (void)KStdGameAction::quit(this,
+ (void)KStdGameAction::quit(TQT_TQOBJECT(this),
TQT_SLOT(close()),
actionCollection());
TQStringList list;
KSelectAction* piecesAct =
- new KSelectAction(i18n("&Pieces"), 0, this, TQT_SLOT(menu_pieces()),
+ new KSelectAction(i18n("&Pieces"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_pieces()),
actionCollection(), "settings_pieces");
list.append(i18n("&Smiles"));
list.append(i18n("S&ymbols"));
list.append(i18n("&Icons"));
piecesAct->setItems(list);
- (void)new KToggleAction(i18n("&Sounds"), 0, this,
+ (void)new KToggleAction(i18n("&Sounds"), 0, TQT_TQOBJECT(this),
TQT_SLOT(menu_sounds()), actionCollection(), "settings_sounds");
@@ -99,14 +99,14 @@ GameWindow::GameWindow(TQWidget *, const char *name)
setCentralWidget(game);
connect(game, TQT_SIGNAL(changedStats(int, int)),
this, TQT_SLOT(updateStats(int, int)));
- connect(game, TQT_SIGNAL(gameOver()), this, TQT_SLOT(gameOver()));
+ connect(game, TQT_SIGNAL(gameOver()), TQT_TQOBJECT(this), TQT_SLOT(gameOver()));
//keys
- (void)new KAction(i18n("Move Left"), Key_Left, game, TQT_SLOT(keyLeft()), actionCollection(), "left");
- (void)new KAction(i18n("Move Right"), Key_Right, game, TQT_SLOT(keyRight()), actionCollection(), "right");
- (void)new KAction(i18n("Rotate Left"), Key_Up, game, TQT_SLOT(keyUp()), actionCollection(), "up");
- (void)new KAction(i18n("Rotate Right"), Key_Down, game, TQT_SLOT(keyDown()), actionCollection(), "down");
- (void)new KAction(i18n("Drop Down"), Key_Space, game, TQT_SLOT(keySpace()), actionCollection(), "space");
+ (void)new KAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(game), TQT_SLOT(keyLeft()), actionCollection(), "left");
+ (void)new KAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(game), TQT_SLOT(keyRight()), actionCollection(), "right");
+ (void)new KAction(i18n("Rotate Left"), Key_Up, TQT_TQOBJECT(game), TQT_SLOT(keyUp()), actionCollection(), "up");
+ (void)new KAction(i18n("Rotate Right"), Key_Down, TQT_TQOBJECT(game), TQT_SLOT(keyDown()), actionCollection(), "down");
+ (void)new KAction(i18n("Drop Down"), Key_Space, TQT_TQOBJECT(game), TQT_SLOT(keySpace()), actionCollection(), "space");
game->setFixedSize(default_width, default_height);
adjustSize();
@@ -137,7 +137,7 @@ void GameWindow::menu_pause()
if (game->in_game) {
game->in_pause = !game->in_pause;
((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause);
- game->repaintChilds();
+ game->tqrepaintChilds();
}
}
@@ -145,7 +145,7 @@ void GameWindow::menu_endGame()
{
if (game->in_game) {
game->in_game = false;
- game->repaintChilds();
+ game->tqrepaintChilds();
((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false);
gameOver();
}
@@ -182,8 +182,8 @@ void GameWindow::updateStats(int level, int points)
TQString l, p;
l.setNum(level);
p.setNum(points);
- status->changeItem(i18n("Level: %1").arg(l), 1);
- status->changeItem(i18n("Score: %1").arg(p), 2);
+ status->changeItem(i18n("Level: %1").tqarg(l), 1);
+ status->changeItem(i18n("Score: %1").tqarg(p), 2);
}
void GameWindow::gameOver()