summaryrefslogtreecommitdiffstats
path: root/ktron/ktron.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 /ktron/ktron.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 'ktron/ktron.cpp')
-rw-r--r--ktron/ktron.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/ktron/ktron.cpp b/ktron/ktron.cpp
index c9a5ea77..16628fd9 100644
--- a/ktron/ktron.cpp
+++ b/ktron/ktron.cpp
@@ -42,11 +42,11 @@
/**
* Constuctor
*/
-KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
+KTron::KTron(TQWidget *tqparent, const char *name) : KMainWindow(tqparent, name) {
playerPoints[0]=playerPoints[1]=0;
tron=new Tron(this, "Tron");
- connect(tron,TQT_SIGNAL(gameEnds(Player)),TQT_SLOT(changeStatus(Player)));
+ connect(tron,TQT_SIGNAL(gameEnds(Player)),TQT_SLOT(changetqStatus(Player)));
setCentralWidget(tron);
tron->setMinimumSize(200,180);
@@ -81,10 +81,10 @@ KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
tron->setActionCollection(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());
+ KStdGameAction::pause(TQT_TQOBJECT(tron), TQT_SLOT(togglePause()), actionCollection());
+ KStdGameAction::gameNew( TQT_TQOBJECT(tron), TQT_SLOT( newGame() ), actionCollection() );
+ KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
setupGUI( KMainWindow::Keys | StatusBar | Save | Create);
loadSettings();
@@ -108,17 +108,17 @@ void KTron::updateStatusbar(){
TQString name;
if(tron->isComputer(Both))
- name=i18n("Computer(%1)").arg(i+1);
+ name=i18n("Computer(%1)").tqarg(i+1);
else if(tron->isComputer(player))
name=i18n("Computer");
else
name=playerName[i];
- TQString string = TQString("%1: %2").arg(name).arg(playerPoints[i]);
+ TQString string = TQString("%1: %2").tqarg(name).tqarg(playerPoints[i]);
statusBar()->changeItem(string,ID_STATUS_BASE+i+1);
}
}
-void KTron::changeStatus(Player player) {
+void KTron::changetqStatus(Player player) {
// if player=Nobody, then new game
if(player==Nobody){
playerPoints[0]=playerPoints[1]=0;
@@ -158,12 +158,12 @@ void KTron::showWinner(Player winner){
if(!tron->isComputer(winner))
winnerName = playerName[winner];
- TQString message=i18n("%1 has won!").arg(winnerName);
+ TQString message=i18n("%1 has won!").tqarg(winnerName);
statusBar()->message(message,MESSAGE_TIME);
message = i18n("%1 has won versus %2 with %3 : %4 points!");
- message=message.arg(winnerName).arg(loserName);
- message=message.arg(playerPoints[winner]).arg(playerPoints[loser]);
+ message=message.tqarg(winnerName).tqarg(loserName);
+ message=message.tqarg(playerPoints[winner]).tqarg(playerPoints[loser]);
KMessageBox::information(this, message, i18n("Winner"));
tron->newGame();