diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:31:10 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:31:10 -0600 |
commit | 0e2b76239f354a9eead0b4e37d86d390ec57ffa9 (patch) | |
tree | cd20202507f54f61a4e58ae64fcd7cdb894abe19 /libtdegames/kgame | |
parent | 84ace1135cac57993b72fee7105b92def1638d32 (diff) | |
download | tdegames-0e2b76239f354a9eead0b4e37d86d390ec57ffa9.tar.gz tdegames-0e2b76239f354a9eead0b4e37d86d390ec57ffa9.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'libtdegames/kgame')
-rw-r--r-- | libtdegames/kgame/DESIGN | 2 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgamedebugdialog.cpp | 12 | ||||
-rw-r--r-- | libtdegames/kgame/kgame.cpp | 28 | ||||
-rw-r--r-- | libtdegames/kgame/kgame.h | 8 | ||||
-rw-r--r-- | libtdegames/kgame/kgameproperty.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageclient.cpp | 2 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageio.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/messages.txt | 2 |
8 files changed, 29 insertions, 29 deletions
diff --git a/libtdegames/kgame/DESIGN b/libtdegames/kgame/DESIGN index cd737e3a..b1c48146 100644 --- a/libtdegames/kgame/DESIGN +++ b/libtdegames/kgame/DESIGN @@ -359,7 +359,7 @@ KDialogBase::addVBoxPage() (for example). 5.1.1 Debug KGame ----------------- The first page, "Debug KGame" shows on the left most or even all status values of -KGame. That contains e.g. minPlayers(), isAdmin(), gametqStatus(), ... +KGame. That contains e.g. minPlayers(), isAdmin(), gameStatus(), ... The right side is probably the more important one. It lists *all* KGameProperties which have been inserted to this KGame object (only to this KGame object - not the ones that have been added to the players!). Most of the status variables of diff --git a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp index 49623238..6b56432c 100644 --- a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp +++ b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp @@ -56,7 +56,7 @@ public: mGameMaster = 0; mGameAdmin = 0; mGameOffering = 0; - mGametqStatus = 0; + mGameStatus = 0; mGameRunning = 0; mGameMaxPlayers = 0; mGameMinPlayers = 0; @@ -93,7 +93,7 @@ public: TQListViewItem* mGameMaster; TQListViewItem* mGameAdmin; TQListViewItem* mGameOffering; - TQListViewItem* mGametqStatus; + TQListViewItem* mGameStatus; TQListViewItem* mGameRunning; TQListViewItem* mGameMaxPlayers; TQListViewItem* mGameMinPlayers; @@ -166,7 +166,7 @@ void KGameDebugDialog::initGamePage() d->mGameMaster = new TQListViewItem(v, i18n("Is Master")); d->mGameAdmin = new TQListViewItem(v, i18n("Is Admin")); d->mGameOffering = new TQListViewItem(v, i18n("Is Offering Connections")); - d->mGametqStatus = new TQListViewItem(v, i18n("Game Status")); + d->mGameStatus = new TQListViewItem(v, i18n("Game Status")); d->mGameRunning = new TQListViewItem(v, i18n("Game is Running")); d->mGameMaxPlayers = new TQListViewItem(v, i18n("Maximal Players")); d->mGameMinPlayers = new TQListViewItem(v, i18n("Minimal Players")); @@ -186,7 +186,7 @@ void KGameDebugDialog::initPlayerPage() d->mPlayerList = new KListBox(d->mPlayerPage); connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*))); listLayout->addWidget(d->mPlayerList); - d->mPlayerList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); KListView* v = new KListView(d->mPlayerPage); tqlayout->addWidget(v); @@ -274,7 +274,7 @@ void KGameDebugDialog::clearGameData() d->mGameMaster->setText(1, ""); d->mGameAdmin->setText(1, ""); d->mGameOffering->setText(1, ""); - d->mGametqStatus->setText(1, ""); + d->mGameStatus->setText(1, ""); d->mGameRunning->setText(1, ""); d->mGameMaxPlayers->setText(1, ""); d->mGameMinPlayers->setText(1, ""); @@ -320,7 +320,7 @@ void KGameDebugDialog::slotUpdateGameData() d->mGameMaster->setText(1, d->mGame->isMaster() ? i18n("True") : i18n("False")); d->mGameAdmin->setText(1, d->mGame->isAdmin() ? i18n("True") : i18n("False")); d->mGameOffering->setText(1, d->mGame->isOfferingConnections() ? i18n("True") : i18n("False")); - d->mGametqStatus->setText(1, TQString::number(d->mGame->gametqStatus())); + d->mGameStatus->setText(1, TQString::number(d->mGame->gameStatus())); d->mGameRunning->setText(1, d->mGame->isRunning() ? i18n("True") : i18n("False")); d->mGameMaxPlayers->setText(1, TQString::number(d->mGame->maxPlayers())); d->mGameMinPlayers->setText(1, TQString::number(d->mGame->minPlayers())); diff --git a/libtdegames/kgame/kgame.cpp b/libtdegames/kgame/kgame.cpp index 2eebac64..c2f7f583 100644 --- a/libtdegames/kgame/kgame.cpp +++ b/libtdegames/kgame/kgame.cpp @@ -75,7 +75,7 @@ public: //KGamePropertys KGamePropertyInt mMaxPlayer; KGamePropertyUInt mMinPlayer; - KGamePropertyInt mGametqStatus; // Game running? + KGamePropertyInt mGameStatus; // Game running? TQValueList<int> mInactiveIdList; }; @@ -95,8 +95,8 @@ KGame::KGame(int cookie,TQObject* parent) : KGameNetwork(cookie,parent) d->mMaxPlayer.setLocal(-1); // Infinite d->mMinPlayer.registerData(KGamePropertyBase::IdMinPlayer, this, i18n("MinPlayers")); d->mMinPlayer.setLocal(0); // Always ok - d->mGametqStatus.registerData(KGamePropertyBase::IdGametqStatus, this, i18n("GameStatus")); - d->mGametqStatus.setLocal(Init); + d->mGameStatus.registerData(KGamePropertyBase::IdGameStatus, this, i18n("GameStatus")); + d->mGameStatus.setLocal(Init); // d->mUniquePlayerNumber = 0; d->mRandom = new KRandomSequence; d->mRandom->setSeed(0); @@ -542,10 +542,10 @@ void KGame::systemRemovePlayer(KPlayer* player,bool deleteit) kdWarning(11001) << "player " << player << "(" << player->id() << ") Could not be found!" << endl; } - if (gametqStatus()==(int)Run && playerCount()<minPlayers()) + if (gameStatus()==(int)Run && playerCount()<minPlayers()) { kdWarning(11001) << k_funcinfo ": not enough players, PAUSING game\n" << endl; - setGametqStatus(Pause); + setGameStatus(Pause); } } @@ -680,11 +680,11 @@ int KGame::maxPlayers() const uint KGame::playerCount() const { return d->mPlayerList.count(); } -int KGame::gametqStatus() const -{ return d->mGametqStatus.value(); } +int KGame::gameStatus() const +{ return d->mGameStatus.value(); } bool KGame::isRunning() const -{ return d->mGametqStatus.value() == Run; } +{ return d->mGameStatus.value() == Run; } KGamePropertyHandler* KGame::dataHandler() const { return d->mProperties; } @@ -772,7 +772,7 @@ KPlayer * KGame::playerInputFinished(KPlayer *player) { player->setTurn(false); } - setGametqStatus(End); + setGameStatus(End); emit signalGameOver(gameOver,player,this); } else if (!player->asyncInput()) @@ -829,7 +829,7 @@ KPlayer *KGame::nextPlayer(KPlayer *last,bool exclusive) return 0; } -void KGame::setGametqStatus(int status) +void KGame::setGameStatus(int status) { kdDebug(11001) << k_funcinfo << ": GAMESTATUS CHANGED to" << status << endl; if (status==(int)Run && playerCount()<minPlayers()) @@ -837,7 +837,7 @@ void KGame::setGametqStatus(int status) kdDebug(11001) << k_funcinfo << ": not enough players, pausing game\n" << endl; status=Pause; } - d->mGametqStatus = status; + d->mGameStatus = status; } void KGame::networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 /*clientID*/) @@ -1244,7 +1244,7 @@ void KGame::Debug() kdDebug(11001) << "------------------- KGAME -------------------------" << endl; kdDebug(11001) << "this: " << this << endl; kdDebug(11001) << "uniquePlayer " << d->mUniquePlayerNumber << endl; - kdDebug(11001) << "gameStatus " << gametqStatus() << endl; + kdDebug(11001) << "gameStatus " << gameStatus() << endl; kdDebug(11001) << "MaxPlayers : " << maxPlayers() << endl; kdDebug(11001) << "NoOfPlayers : " << playerCount() << endl; kdDebug(11001) << "NoOfInactive: " << d->mInactivePlayerList.count() << endl; @@ -1264,7 +1264,7 @@ void KGame::slotServerDisconnected() // Client side kdDebug(11001) << "======= SERVER DISCONNECT ======="<<endl; kdDebug(11001) << "+++ (CLIENT)++++++++" << k_funcinfo << ": our GameID="<<gameId() << endl; - int oldgamestatus=gametqStatus(); + int oldgamestatus=gameStatus(); KPlayer *player; KGamePlayerList removeList; @@ -1326,7 +1326,7 @@ void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server { kdDebug(11001) << "++++(SERVER)+++++++" << k_funcinfo << " clientId=" << clientID << endl; - int oldgamestatus=gametqStatus(); + int oldgamestatus=gameStatus(); KPlayer *player; KGamePlayerList removeList; diff --git a/libtdegames/kgame/kgame.h b/libtdegames/kgame/kgame.h index bf66dcb8..486397e2 100644 --- a/libtdegames/kgame/kgame.h +++ b/libtdegames/kgame/kgame.h @@ -118,7 +118,7 @@ public: * The KGame e.g. sets the status to Pause when you have * less player than the minimum amount */ - enum GametqStatus + enum GameStatus { Init = 0, Run = 1, @@ -127,7 +127,7 @@ public: Abort = 4, SystemPause = 5, Intro = 6, - UsertqStatus = 7 + UserStatus = 7 }; // Properties @@ -387,14 +387,14 @@ public: * * @return game status */ - int gametqStatus() const; + int gameStatus() const; /** * sets the game status * * @param status the new status */ - void setGametqStatus(int status); + void setGameStatus(int status); /** * docu: see KPlayer diff --git a/libtdegames/kgame/kgameproperty.h b/libtdegames/kgame/kgameproperty.h index f02c4db0..0bb117b8 100644 --- a/libtdegames/kgame/kgameproperty.h +++ b/libtdegames/kgame/kgameproperty.h @@ -51,7 +51,7 @@ public: IdName=5, //KGame - IdGametqStatus=6, + IdGameStatus=6, IdMaxPlayer=7, IdMinPlayer=8, diff --git a/libtdegames/kgame/kmessageclient.cpp b/libtdegames/kgame/kmessageclient.cpp index 0233884a..ca90bbd1 100644 --- a/libtdegames/kgame/kmessageclient.cpp +++ b/libtdegames/kgame/kmessageclient.cpp @@ -132,7 +132,7 @@ TQ_UINT16 KMessageClient::peerPort () const TQString KMessageClient::peerName () const { - return d->connection ? d->connection->peerName() : TQString::tqfromLatin1("localhost"); + return d->connection ? d->connection->peerName() : TQString::fromLatin1("localhost"); } // --------------------- Sending messages diff --git a/libtdegames/kgame/kmessageio.h b/libtdegames/kgame/kmessageio.h index 326476ff..69038df9 100644 --- a/libtdegames/kgame/kmessageio.h +++ b/libtdegames/kgame/kmessageio.h @@ -123,7 +123,7 @@ public: @since 3.2 @return "localhost" in the default implementation. Reimplemented in @ref KMessageSocket */ - virtual TQString peerName () const { return TQString::tqfromLatin1("localhost"); } + virtual TQString peerName () const { return TQString::fromLatin1("localhost"); } signals: diff --git a/libtdegames/kgame/messages.txt b/libtdegames/kgame/messages.txt index c42d2d91..3a163790 100644 --- a/libtdegames/kgame/messages.txt +++ b/libtdegames/kgame/messages.txt @@ -82,7 +82,7 @@ IdRemovePlayer Q_INT16 playerid IdError Q_INT32 errorcode QString errortext -IdGametqStatus Q_INT32 status +IdGameStatus Q_INT32 status IdPlayerProperty Q_INT16 propertyId user defined -> the property |