diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /lskat/lskat/lskat.cpp | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-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 'lskat/lskat/lskat.cpp')
-rw-r--r-- | lskat/lskat/lskat.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lskat/lskat/lskat.cpp b/lskat/lskat/lskat.cpp index 41309afd..c6f21ff1 100644 --- a/lskat/lskat/lskat.cpp +++ b/lskat/lskat/lskat.cpp @@ -50,7 +50,7 @@ LSkatApp::LSkatApp() : KMainWindow(0) config=kapp->config(); // localise data file - TQString file=TQString::fromLatin1("lskat/grafix/t1.png"); + TQString file=TQString::tqfromLatin1("lskat/grafix/t1.png"); mGrafix=kapp->dirs()->findResourceDir("data", file); if (mGrafix.isNull()) mGrafix = TQCString("grafix/"); else mGrafix+=TQCString("lskat/grafix/"); @@ -63,7 +63,7 @@ LSkatApp::LSkatApp() : KMainWindow(0) initStatusBar(); setupGUI(KMainWindow::StatusBar | Save); - createGUI(TQString::null, false); + createGUI(TQString(), false); initDocument(); initView(); @@ -73,7 +73,7 @@ LSkatApp::LSkatApp() : KMainWindow(0) // Needs to be after readOptions as we read in default paths doc->LoadGrafix(mGrafix); - mInput=new KEInput(this); + mInput=new KEInput(TQT_TQOBJECT(this)); doc->SetInputHandler(mInput); connect(mInput,TQT_SIGNAL(signalPrepareProcessMove(KEMessage *)), this,TQT_SLOT(slotPrepareProcessMove(KEMessage *))); @@ -158,26 +158,26 @@ void LSkatApp::initGUI() { TQStringList list; - (void)KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection(), "new_game"); + (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game"); ACTION("new_game")->setStatusText(i18n("Starting a new game...")); ACTION("new_game")->setWhatsThis(i18n("Starting a new game...")); - (void)new KAction(i18n("&End Game"),"stop", 0, this, TQT_SLOT(slotFileEnd()), + (void)new KAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()), actionCollection(), "end_game"); ACTION("end_game")->setStatusText(i18n("Ending the current game...")); ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared.")); - (void)new KAction(i18n("&Clear Statistics"),"flag", 0, this, TQT_SLOT(slotFileStatistics()), + (void)new KAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()), actionCollection(), "clear_statistics"); ACTION("clear_statistics")->setStatusText(i18n("Delete all time statistics...")); ACTION("clear_statistics")->setWhatsThis(i18n("Clears the all time statistics which is kept in all sessions.")); - (void)new KAction(i18n("Send &Message..."), CTRL+Key_M, this, TQT_SLOT(slotFileMessage()), + (void)new KAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()), actionCollection(), "send_message"); ACTION("send_message")->setStatusText(i18n("Sending message to remote player...")); ACTION("send_message")->setWhatsThis(i18n("Allows you to talk with a remote player.")); - (void)KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection(), "game_exit"); + (void)KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection(), "game_exit"); ACTION("game_exit")->setStatusText(i18n("Exiting...")); ACTION("game_exit")->setWhatsThis(i18n("Quits the program.")); - (void)new KSelectAction(i18n("Starting Player"),0,this,TQT_SLOT(slotStartplayer()), + (void)new KSelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()), actionCollection(), "startplayer"); ACTION("startplayer")->setStatusText(i18n("Changing starting player...")); ACTION("startplayer")->setWhatsThis(i18n("Chooses which player begins the next game.")); @@ -186,7 +186,7 @@ void LSkatApp::initGUI() list.append(i18n("Player &2")); ((KSelectAction *)ACTION("startplayer"))->setItems(list); - (void)new KSelectAction(i18n("Player &1 Played By"),0,this,TQT_SLOT(slotPlayer1By()), + (void)new KSelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()), actionCollection(), "player1"); ACTION("player1")->setStatusText(i18n("Changing who plays player 1...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 1...")); @@ -195,13 +195,13 @@ void LSkatApp::initGUI() list.append(i18n("&Computer")); list.append(i18n("&Remote")); ((KSelectAction *)ACTION("player1"))->setItems(list); - (void)new KSelectAction(i18n("Player &2 Played By"),0,this,TQT_SLOT(slotPlayer2By()), + (void)new KSelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()), actionCollection(), "player2"); ACTION("player1")->setStatusText(i18n("Changing who plays player 2...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2...")); ((KSelectAction *)ACTION("player2"))->setItems(list); - (void)new KSelectAction(i18n("&Level"),0,this,TQT_SLOT(slotLevel()), + (void)new KSelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()), actionCollection(), "choose_level"); ACTION("choose_level")->setStatusText(i18n("Change level...")); ACTION("choose_level")->setWhatsThis(i18n("Change the strength of the computer player.")); @@ -211,12 +211,12 @@ void LSkatApp::initGUI() list.append(i18n("&Hard")); ((KSelectAction *)ACTION("choose_level"))->setItems(list); - (void)new KAction(i18n("Select &Card Deck..."), 0, this, TQT_SLOT(slotOptionsCardDeck()), + (void)new KAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()), actionCollection(), "select_carddeck"); ACTION("select_carddeck")->setStatusText(i18n("Configure card decks...")); ACTION("select_carddeck")->setWhatsThis(i18n("Choose how the cards should look.")); - (void)new KAction(i18n("Change &Names..."), 0, this, TQT_SLOT(slotOptionsNames()), + (void)new KAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()), actionCollection(), "change_names"); ACTION("change_names")->setStatusText(i18n("Configure player names...")); ACTION("change_names")->setWhatsThis(i18n("Configure player names...")); @@ -243,7 +243,7 @@ void LSkatApp::initStatusBar() // computer move timer procTimer=new TQTimer(this); - connect(procTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotProcTimer())); + connect(procTimer,TQT_SIGNAL(timeout()),TQT_TQOBJECT(this),TQT_SLOT(slotProcTimer())); } void LSkatApp::initDocument() @@ -358,7 +358,7 @@ void LSkatApp::slotFileStatistics() message=i18n("Do you really want to clear the all time " "statistical data?"); - if (KMessageBox::Yes==KMessageBox::questionYesNo(this,message,TQString::null,KStdGuiItem::clear())) + if (KMessageBox::Yes==KMessageBox::questionYesNo(this,message,TQString(),KStdGuiItem::clear())) { doc->ClearStats(); doc->slotUpdateAllViews(0); @@ -587,7 +587,7 @@ void LSkatApp::slotStatusNames(){ if (!doc->IsRunning()) msg=i18n("No game running"); else { - msg=i18n("%1 to move...").arg(doc->GetName(doc->GetCurrentPlayer())); + msg=i18n("%1 to move...").tqarg(doc->GetName(doc->GetCurrentPlayer())); } slotStatusMover(msg); } @@ -625,14 +625,14 @@ void LSkatApp::NewGame() } // Connected 0 and we are server else if (mInput->QueryType(0)==KG_INPUTTYPE_REMOTE && - mInput->QueryStatus()>0 && doc->IsServer()) + mInput->QuerytqStatus()>0 && doc->IsServer()) { mInput->Unlock(); mInput->Next(doc->GetStartPlayer()); } // Connected 1 and we are server else if (mInput->QueryType(1)==KG_INPUTTYPE_REMOTE && - mInput->QueryStatus()>1 && doc->IsServer()) + mInput->QuerytqStatus()>1 && doc->IsServer()) { mInput->Unlock(); mInput->Next(doc->GetStartPlayer()); @@ -659,7 +659,7 @@ bool LSkatApp::MakeInputDevice(int no) msg=new KEMessage; PrepareGame(msg); // Build new connection - if ( mInput->QueryType(no)!=type || mInput->QueryStatus(no)<=0) + if ( mInput->QueryType(no)!=type || mInput->QuerytqStatus(no)<=0) { OptionsNetwork(); port=doc->QueryPort(); @@ -677,11 +677,11 @@ bool LSkatApp::MakeInputDevice(int no) tim=10000; if (!host.isEmpty()) { - s=i18n("Remote connection to %1:%2...").arg(host).arg(port); + s=i18n("Remote connection to %1:%2...").tqarg(host).tqarg(port); } else { - s=i18n("Offering remote connection on port %1...").arg(port); + s=i18n("Offering remote connection on port %1...").tqarg(port); } progress=new TQProgressDialog(s, i18n("Abort"), tim, this,0,true ); progress->setCaption(i18n("Lieutenant Skat")); @@ -689,7 +689,7 @@ bool LSkatApp::MakeInputDevice(int no) { progress->setProgress( j ); if ( progress->wasCancelled() ) break; - if (mInput->QueryStatus(no)>0) break; + if (mInput->QuerytqStatus(no)>0) break; usleep(100); } // progress.setProgress(tim); @@ -717,7 +717,7 @@ bool LSkatApp::MakeInputDevice(int no) } } delete msg; - if (mInput->QueryStatus(no)>0) + if (mInput->QuerytqStatus(no)>0) { res=true; } |