summaryrefslogtreecommitdiffstats
path: root/ktron/ktron.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /ktron/ktron.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-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 'ktron/ktron.cpp')
-rw-r--r--ktron/ktron.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/ktron/ktron.cpp b/ktron/ktron.cpp
index 67151ff0..c9a5ea77 100644
--- a/ktron/ktron.cpp
+++ b/ktron/ktron.cpp
@@ -42,11 +42,11 @@
/**
* Constuctor
*/
-KTron::KTron(QWidget *parent, const char *name) : KMainWindow(parent, name) {
+KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
playerPoints[0]=playerPoints[1]=0;
tron=new Tron(this, "Tron");
- connect(tron,SIGNAL(gameEnds(Player)),SLOT(changeStatus(Player)));
+ connect(tron,TQT_SIGNAL(gameEnds(Player)),TQT_SLOT(changeStatus(Player)));
setCentralWidget(tron);
tron->setMinimumSize(200,180);
@@ -81,10 +81,10 @@ KTron::KTron(QWidget *parent, const char *name) : KMainWindow(parent, name) {
tron->setActionCollection(actionCollection());
- KStdGameAction::pause(tron, SLOT(togglePause()), actionCollection());
- KStdGameAction::gameNew( tron, SLOT( newGame() ), actionCollection() );
- KStdGameAction::quit(this, SLOT( close() ), actionCollection());
- KStdAction::preferences(this, SLOT(showSettings()), actionCollection());
+ KStdGameAction::pause(tron, TQT_SLOT(togglePause()), actionCollection());
+ KStdGameAction::gameNew( tron, TQT_SLOT( newGame() ), actionCollection() );
+ KStdGameAction::quit(this, TQT_SLOT( close() ), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
setupGUI( KMainWindow::Keys | StatusBar | Save | Create);
loadSettings();
@@ -106,14 +106,14 @@ void KTron::updateStatusbar(){
Player player;
player=(i==0?One:Two);
- QString name;
+ TQString name;
if(tron->isComputer(Both))
name=i18n("Computer(%1)").arg(i+1);
else if(tron->isComputer(player))
name=i18n("Computer");
else
name=playerName[i];
- QString string = QString("%1: %2").arg(name).arg(playerPoints[i]);
+ TQString string = TQString("%1: %2").arg(name).arg(playerPoints[i]);
statusBar()->changeItem(string,ID_STATUS_BASE+i+1);
}
}
@@ -147,18 +147,18 @@ void KTron::showWinner(Player winner){
if(tron->isComputer(Both) || (winner != One && winner != Two))
return;
- QString loserName = i18n("KTron");
+ TQString loserName = i18n("KTron");
int loser = Two;
if(winner == Two)
loser = One;
if(!tron->isComputer(((Player)loser)))
loserName = playerName[loser];
- QString winnerName = i18n("KTron");
+ TQString winnerName = i18n("KTron");
if(!tron->isComputer(winner))
winnerName = playerName[winner];
- QString message=i18n("%1 has won!").arg(winnerName);
+ TQString message=i18n("%1 has won!").arg(winnerName);
statusBar()->message(message,MESSAGE_TIME);
message = i18n("%1 has won versus %2 with %3 : %4 points!");
@@ -169,7 +169,7 @@ void KTron::showWinner(Player winner){
tron->newGame();
}
-void KTron::paletteChange(const QPalette &/*oldPalette*/){
+void KTron::paletteChange(const TQPalette &/*oldPalette*/){
update();
tron->updatePixmap();
tron->update();
@@ -186,8 +186,8 @@ void KTron::showSettings(){
dialog->addPage(new General(0, "General"), i18n("General"), "package_settings");
dialog->addPage(new Ai(0, "Ai"), i18n("A.I."), "personal");
dialog->addPage(new Appearance(0, "Appearance"), i18n("Appearance"), "style");
- connect(dialog, SIGNAL(settingsChanged()), tron, SLOT(loadSettings()));
- connect(dialog, SIGNAL(settingsChanged()), this, SLOT(loadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), tron, TQT_SLOT(loadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings()));
dialog->show();
}