diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
commit | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch) | |
tree | 4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /atlantik/libatlantikclient | |
parent | 9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff) | |
download | tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'atlantik/libatlantikclient')
-rw-r--r-- | atlantik/libatlantikclient/atlantik_network.cpp | 48 | ||||
-rw-r--r-- | atlantik/libatlantikclient/atlantik_network.h | 2 | ||||
-rw-r--r-- | atlantik/libatlantikclient/monopdprotocol.cpp | 10 |
3 files changed, 30 insertions, 30 deletions
diff --git a/atlantik/libatlantikclient/atlantik_network.cpp b/atlantik/libatlantikclient/atlantik_network.cpp index 7b980ef8..cb53577f 100644 --- a/atlantik/libatlantikclient/atlantik_network.cpp +++ b/atlantik/libatlantikclient/atlantik_network.cpp @@ -17,8 +17,8 @@ #include <iostream> #include <tqdom.h> -#include <tqtextcodec.h> -#include <tqtextstream.h> +#include <textcodec.h> +#include <textstream.h> #include <tqtimer.h> #include <kdebug.h> @@ -95,37 +95,37 @@ void AtlantikNetwork::endTurn() void AtlantikNetwork::setName(TQString name) { // Almost deprecated, will be replaced by libmonopdprotocol - writeData(TQString(".n%1").tqarg(name)); + writeData(TQString(".n%1").arg(name)); } void AtlantikNetwork::tokenConfirmation(Estate *estate) { - writeData(TQString(".t%1").tqarg(estate ? estate->id() : -1)); + writeData(TQString(".t%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateToggleMortgage(Estate *estate) { - writeData(TQString(".em%1").tqarg(estate ? estate->id() : -1)); + writeData(TQString(".em%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateHouseBuy(Estate *estate) { - writeData(TQString(".hb%1").tqarg(estate ? estate->id() : -1)); + writeData(TQString(".hb%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateHouseSell(Estate *estate) { - writeData(TQString(".hs%1").tqarg(estate ? estate->id() : -1)); + writeData(TQString(".hs%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::newGame(const TQString &gameType) { - writeData(TQString(".gn%1").tqarg(gameType)); + writeData(TQString(".gn%1").arg(gameType)); } void AtlantikNetwork::joinGame(int gameId) { - writeData(TQString(".gj%1").tqarg(gameId)); + writeData(TQString(".gj%1").arg(gameId)); } void AtlantikNetwork::cmdChat(TQString msg) @@ -135,42 +135,42 @@ void AtlantikNetwork::cmdChat(TQString msg) void AtlantikNetwork::newTrade(Player *player) { - writeData(TQString(".Tn%1").tqarg(player ? player->id() : -1)); + writeData(TQString(".Tn%1").arg(player ? player->id() : -1)); } void AtlantikNetwork::kickPlayer(Player *player) { - writeData(TQString(".gk%1").tqarg(player ? player->id() : -1)); + writeData(TQString(".gk%1").arg(player ? player->id() : -1)); } void AtlantikNetwork::tradeUpdateEstate(Trade *trade, Estate *estate, Player *player) { - writeData(TQString(".Te%1:%2:%3").tqarg(trade ? trade->tradeId() : -1).tqarg(estate ? estate->id() : -1).tqarg(player ? player->id() : -1)); + writeData(TQString(".Te%1:%2:%3").arg(trade ? trade->tradeId() : -1).arg(estate ? estate->id() : -1).arg(player ? player->id() : -1)); } void AtlantikNetwork::tradeUpdateMoney(Trade *trade, unsigned int money, Player *pFrom, Player *pTo) { - writeData(TQString(".Tm%1:%2:%3:%4").tqarg(trade ? trade->tradeId() : -1).tqarg(pFrom ? pFrom->id() : -1).tqarg(pTo ? pTo->id() : -1).tqarg(money)); + writeData(TQString(".Tm%1:%2:%3:%4").arg(trade ? trade->tradeId() : -1).arg(pFrom ? pFrom->id() : -1).arg(pTo ? pTo->id() : -1).arg(money)); } void AtlantikNetwork::tradeReject(Trade *trade) { - writeData(TQString(".Tr%1").tqarg(trade ? trade->tradeId() : -1)); + writeData(TQString(".Tr%1").arg(trade ? trade->tradeId() : -1)); } void AtlantikNetwork::tradeAccept(Trade *trade) { - writeData(TQString(".Ta%1:%2").tqarg(trade ? trade->tradeId() : -1).tqarg(trade ? trade->revision() : -1)); + writeData(TQString(".Ta%1:%2").arg(trade ? trade->tradeId() : -1).arg(trade ? trade->revision() : -1)); } void AtlantikNetwork::auctionBid(Auction *auction, int amount) { - writeData(TQString(".ab%1:%2").tqarg(auction ? auction->auctionId() : -1).tqarg(amount)); + writeData(TQString(".ab%1:%2").arg(auction ? auction->auctionId() : -1).arg(amount)); } void AtlantikNetwork::setImage(const TQString &name) { - writeData(TQString(".pi%1").tqarg(name)); + writeData(TQString(".pi%1").arg(name)); } void AtlantikNetwork::jailPay() @@ -190,7 +190,7 @@ void AtlantikNetwork::jailCard() void AtlantikNetwork::changeOption(int configId, const TQString &value) { - writeData( TQString(".gc%1:%2").tqarg(configId).tqarg(value) ); + writeData( TQString(".gc%1:%2").arg(configId).arg(value) ); } void AtlantikNetwork::writeData(TQString msg) @@ -607,7 +607,7 @@ void AtlantikNetwork::processNode(TQDomNode n) Estate *estate = 0; bool b_newEstate = false; - // FIXME: allow any estateId, GUI should not use it to determin its tqgeometry + // FIXME: allow any estateId, GUI should not use it to determin its geometry if (estateId >= 0 && estateId < 100 && !(estate = m_atlanticCore->findEstate(a.value().toInt()))) { // Create estate object @@ -872,7 +872,7 @@ void AtlantikNetwork::processNode(TQDomNode n) if (auction && !a.isNull()) { int status = a.value().toInt(); - auction->settqStatus(status); + auction->setStatus(status); // TODO: find a good way to visualise "sold!" if (status == 3) @@ -906,23 +906,23 @@ void AtlantikNetwork::serverConnect(const TQString host, int port) { setAddress(host, port); enableRead(true); - emit msgtqStatus(i18n("Connecting to %1:%2...").tqarg(host).tqarg(TQString::number(port)), "connect_creating"); + emit msgStatus(i18n("Connecting to %1:%2...").arg(host).arg(TQString::number(port)), "connect_creating"); startAsyncConnect(); } void AtlantikNetwork::slotLookupFinished(int count) { - emit msgtqStatus(i18n("Server host name lookup finished...")); + emit msgStatus(i18n("Server host name lookup finished...")); } void AtlantikNetwork::slotConnectionSuccess() { - emit msgtqStatus(i18n("Connected to %1:%2.").tqarg(host()).tqarg(port()), "connect_established"); + emit msgStatus(i18n("Connected to %1:%2.").arg(host()).arg(port()), "connect_established"); } void AtlantikNetwork::slotConnectionFailed(int error) { - emit msgtqStatus(i18n("Connection failed! Error code: %1").tqarg(error), "connect_no"); + emit msgStatus(i18n("Connection failed! Error code: %1").arg(error), "connect_no"); } #include "atlantik_network.moc" diff --git a/atlantik/libatlantikclient/atlantik_network.h b/atlantik/libatlantikclient/atlantik_network.h index 3164bf18..ee366f69 100644 --- a/atlantik/libatlantikclient/atlantik_network.h +++ b/atlantik/libatlantikclient/atlantik_network.h @@ -102,7 +102,7 @@ signals: void msgInfo(TQString); void msgError(TQString); void msgChat(TQString, TQString); - void msgtqStatus(const TQString &data, const TQString &icon = TQString()); + void msgStatus(const TQString &data, const TQString &icon = TQString()); void networkEvent(const TQString &data, const TQString &icon); void displayDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0); diff --git a/atlantik/libatlantikclient/monopdprotocol.cpp b/atlantik/libatlantikclient/monopdprotocol.cpp index 39f8fb81..f024f163 100644 --- a/atlantik/libatlantikclient/monopdprotocol.cpp +++ b/atlantik/libatlantikclient/monopdprotocol.cpp @@ -36,12 +36,12 @@ MonopdProtocol::MonopdProtocol() : TQObject() void MonopdProtocol::auctionEstate() { - sendData(TQString::tqfromLatin1(".ea")); + sendData(TQString::fromLatin1(".ea")); } void MonopdProtocol::buyEstate() { - sendData(TQString::tqfromLatin1(".eb")); + sendData(TQString::fromLatin1(".eb")); } void MonopdProtocol::confirmTokenLocation(Estate *estate) @@ -53,12 +53,12 @@ void MonopdProtocol::confirmTokenLocation(Estate *estate) void MonopdProtocol::endTurn() { - sendData(TQString::tqfromLatin1(".E")); + sendData(TQString::fromLatin1(".E")); } void MonopdProtocol::rollDice() { - sendData(TQString::tqfromLatin1(".r")); + sendData(TQString::fromLatin1(".r")); } void MonopdProtocol::setName(TQString name) @@ -70,7 +70,7 @@ void MonopdProtocol::setName(TQString name) void MonopdProtocol::startGame() { - sendData(TQString::tqfromLatin1(".gs")); + sendData(TQString::fromLatin1(".gs")); } void MonopdProtocol::sendData(TQString) |