summaryrefslogtreecommitdiffstats
path: root/ksnake/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksnake/game.cpp')
-rw-r--r--ksnake/game.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/ksnake/game.cpp b/ksnake/game.cpp
index 4817b3af..9a9e978f 100644
--- a/ksnake/game.cpp
+++ b/ksnake/game.cpp
@@ -54,7 +54,7 @@
#define SCORE 1
#define LIVES 2
-Game::Game(TQWidget *parent, const char *name) : KMainWindow(parent,name)
+Game::Game(TQWidget *tqparent, const char *name) : KMainWindow(tqparent,name)
{
// create statusbar
statusBar()->insertItem(i18n("Score: 0"), SCORE);
@@ -88,17 +88,17 @@ Game::~Game()
}
void Game::scoreChanged(int score){
- statusBar()->changeItem(i18n("Score: %1").arg(score), SCORE);
+ statusBar()->changeItem(i18n("Score: %1").tqarg(score), SCORE);
}
void Game::setTrys(int tries){
- statusBar()->changeItem(i18n("Lives: %1").arg(tries), LIVES);
+ statusBar()->changeItem(i18n("Lives: %1").tqarg(tries), LIVES);
}
void Game::gameEnd(int score){
KScoreDialog di(KScoreDialog::Name | KScoreDialog::Score | KScoreDialog::Date, this);
KScoreDialog::FieldInfo scoreInfo;
- TQString date = TQDateTime::currentDateTime().toString();
+ TQString date = TQDateTime::tqcurrentDateTime().toString();
scoreInfo.insert(KScoreDialog::Date, date);
if (di.addScore(score, scoreInfo, true))
di.exec();
@@ -120,12 +120,12 @@ void Game::createMenu()
actionCollection()->setAutoConnectShortcuts(true);
rattler->setActionCollection(actionCollection());
- KStdGameAction::gameNew(rattler, TQT_SLOT(restart()), actionCollection());
- pause = KStdGameAction::pause(rattler, TQT_SLOT(pause()), actionCollection());
- KStdGameAction::highscores(this, TQT_SLOT(showHighScores()), actionCollection());
- KStdGameAction::quit( this, TQT_SLOT(close()), actionCollection());
+ KStdGameAction::gameNew(TQT_TQOBJECT(rattler), TQT_SLOT(restart()), actionCollection());
+ pause = KStdGameAction::pause(TQT_TQOBJECT(rattler), TQT_SLOT(pause()), actionCollection());
+ KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScores()), actionCollection());
+ KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
- KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
// TODO change and make custom function that pauses game or
// modify widget to pause when loosing focus and remove this
@@ -163,7 +163,7 @@ void Game::showSettings(){
// since the filename may contain underscore, they
// are replaced with spaces in the menu entry
TQString s = TQFileInfo( *it ).baseName();
- s = s.replace(TQRegExp("_"), " ");
+ s = s.tqreplace(TQRegExp("_"), " ");
list.append(s);
}
}