diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /kjumpingcube/kjumpingcube.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjumpingcube/kjumpingcube.cpp')
-rw-r--r-- | kjumpingcube/kjumpingcube.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kjumpingcube/kjumpingcube.cpp b/kjumpingcube/kjumpingcube.cpp index 13619d99..f63665af 100644 --- a/kjumpingcube/kjumpingcube.cpp +++ b/kjumpingcube/kjumpingcube.cpp @@ -29,7 +29,7 @@ #include "prefs.h" -#include <qregexp.h> +#include <tqregexp.h> #include <klocale.h> #include <kfiledialog.h> @@ -49,24 +49,24 @@ KJumpingCube::KJumpingCube() : view(new KCubeBoxWidget(5, this, "KCubeBoxWidget")) { - connect(view,SIGNAL(playerChanged(int)),SLOT(changePlayer(int))); - connect(view,SIGNAL(stoppedMoving()),SLOT(disableStop())); - connect(view,SIGNAL(stoppedThinking()),SLOT(disableStop())); - connect(view,SIGNAL(startedMoving()),SLOT(enableStop_Moving())); - connect(view,SIGNAL(startedThinking()),SLOT(enableStop_Thinking())); - connect(view,SIGNAL(playerWon(int)),SLOT(showWinner(int))); + connect(view,TQT_SIGNAL(playerChanged(int)),TQT_SLOT(changePlayer(int))); + connect(view,TQT_SIGNAL(stoppedMoving()),TQT_SLOT(disableStop())); + connect(view,TQT_SIGNAL(stoppedThinking()),TQT_SLOT(disableStop())); + connect(view,TQT_SIGNAL(startedMoving()),TQT_SLOT(enableStop_Moving())); + connect(view,TQT_SIGNAL(startedThinking()),TQT_SLOT(enableStop_Thinking())); + connect(view,TQT_SIGNAL(playerWon(int)),TQT_SLOT(showWinner(int))); // tell the KMainWindow that this is indeed the main widget setCentralWidget(view); // init statusbar - QString s = i18n("Current player:"); + TQString s = i18n("Current player:"); statusBar()->insertItem(s,ID_STATUS_TURN_TEXT, false); statusBar()->changeItem(s,ID_STATUS_TURN_TEXT); statusBar()->setItemAlignment (ID_STATUS_TURN_TEXT, AlignLeft | AlignVCenter); statusBar()->setFixedHeight( statusBar()->sizeHint().height() ); - currentPlayer = new QWidget(this, "currentPlayer"); + currentPlayer = new TQWidget(this, "currentPlayer"); currentPlayer->setFixedWidth(40); statusBar()->addWidget(currentPlayer, ID_STATUS_TURN, false); statusBar()->setItemAlignment(ID_STATUS_TURN, AlignLeft | AlignVCenter); @@ -76,19 +76,19 @@ KJumpingCube::KJumpingCube() } void KJumpingCube::initKAction() { - KStdGameAction::gameNew(this, SLOT(newGame()), actionCollection()); - KStdGameAction::load(this, SLOT(openGame()), actionCollection()); - KStdGameAction::save(this, SLOT(save()), actionCollection()); - KStdGameAction::saveAs(this, SLOT(saveAs()), actionCollection()); - KStdGameAction::quit(this, SLOT(close()), actionCollection()); + KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection()); + KStdGameAction::load(this, TQT_SLOT(openGame()), actionCollection()); + KStdGameAction::save(this, TQT_SLOT(save()), actionCollection()); + KStdGameAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); + KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection()); - hintAction = KStdGameAction::hint(view, SLOT(getHint()), actionCollection()); + hintAction = KStdGameAction::hint(view, TQT_SLOT(getHint()), actionCollection()); stopAction = new KAction(i18n("Stop &Thinking"), "stop", - Qt::Key_Escape, this, SLOT(stop()), actionCollection(), "game_stop"); + Qt::Key_Escape, this, TQT_SLOT(stop()), actionCollection(), "game_stop"); stopAction->setEnabled(false); - undoAction = KStdGameAction::undo(this, SLOT(undo()), actionCollection()); + undoAction = KStdGameAction::undo(this, TQT_SLOT(undo()), actionCollection()); undoAction->setEnabled(false); - KStdAction::preferences(this, SLOT(showOptions()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(showOptions()), actionCollection()); setupGUI(); } @@ -114,7 +114,7 @@ void KJumpingCube::saveGame(bool saveAs) return; // check filename - QRegExp pattern("*.kjc",true,true); + TQRegExp pattern("*.kjc",true,true); if(!pattern.exactMatch(url.filename())) { url.setFileName( url.filename()+".kjc" ); @@ -122,9 +122,9 @@ void KJumpingCube::saveGame(bool saveAs) if(KIO::NetAccess::exists(url,false,this)) { - QString mes=i18n("The file %1 exists.\n" + TQString mes=i18n("The file %1 exists.\n" "Do you want to overwrite it?").arg(url.url()); - result = KMessageBox::warningContinueCancel(this, mes, QString::null, i18n("Overwrite")); + result = KMessageBox::warningContinueCancel(this, mes, TQString::null, i18n("Overwrite")); if(result==KMessageBox::Cancel) return; } @@ -146,7 +146,7 @@ void KJumpingCube::saveGame(bool saveAs) if(KIO::NetAccess::upload( tempFile.name(),gameURL,this )) { - QString s=i18n("game saved as %1"); + TQString s=i18n("game saved as %1"); s=s.arg(gameURL.url()); statusBar()->message(s,MESSAGE_TIME); } @@ -168,21 +168,21 @@ void KJumpingCube::openGame() return; if(!KIO::NetAccess::exists(url,true,this)) { - QString mes=i18n("The file %1 does not exist!").arg(url.url()); + TQString mes=i18n("The file %1 does not exist!").arg(url.url()); KMessageBox::sorry(this,mes); fileOk=false; } } while(!fileOk); - QString tempFile; + TQString tempFile; if( KIO::NetAccess::download( url, tempFile, this ) ) { KSimpleConfig config(tempFile,true); config.setGroup("KJumpingCube"); if(!config.hasKey("Version")) { - QString mes=i18n("The file %1 isn't a KJumpingCube gamefile!") + TQString mes=i18n("The file %1 isn't a KJumpingCube gamefile!") .arg(url.url()); KMessageBox::sorry(this,mes); return; @@ -227,7 +227,7 @@ void KJumpingCube::changePlayer(int newPlayer) } void KJumpingCube::showWinner(int player) { - QString s=i18n("Winner is Player %1!").arg(player); + TQString s=i18n("Winner is Player %1!").arg(player); KMessageBox::information(this,s,i18n("Winner")); view->reset(); } @@ -270,7 +270,7 @@ void KJumpingCube::showOptions(){ KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow); dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings"); - connect(dialog, SIGNAL(settingsChanged()), view, SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), view, TQT_SLOT(loadSettings())); dialog->show(); } |