From 576eb4299a00bc053db35414406f46372a0f70f2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:42:31 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- atlantik/libatlantic/atlantic_core.cpp | 68 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'atlantik/libatlantic/atlantic_core.cpp') diff --git a/atlantik/libatlantic/atlantic_core.cpp b/atlantik/libatlantic/atlantic_core.cpp index 39e1200e..9139e6ed 100644 --- a/atlantik/libatlantic/atlantic_core.cpp +++ b/atlantik/libatlantic/atlantic_core.cpp @@ -26,7 +26,7 @@ #include "player.h" #include "trade.h" -AtlanticCore::AtlanticCore(QObject *parent, const char *name) : QObject(parent, name) +AtlanticCore::AtlanticCore(TQObject *parent, const char *name) : TQObject(parent, name) { m_playerSelf = 0; } @@ -47,7 +47,7 @@ void AtlanticCore::reset(bool deletePermanents) m_configOptions.setAutoDelete(false); Trade *trade = 0; - for (QPtrListIterator it(m_trades); (trade = *it) ; ++it) + for (TQPtrListIterator it(m_trades); (trade = *it) ; ++it) { emit removeGUI(trade); trade->deleteLater(); @@ -55,7 +55,7 @@ void AtlanticCore::reset(bool deletePermanents) m_trades.clear(); Player *player = 0; - for (QPtrListIterator it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator it(m_players); (player = *it) ; ++it) { if (deletePermanents) { @@ -74,7 +74,7 @@ void AtlanticCore::reset(bool deletePermanents) m_playerSelf = 0; Game *game = 0; - for (QPtrListIterator it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator it(m_games); (game = *it) ; ++it) { emit removeGUI(game); game->deleteLater(); @@ -98,7 +98,7 @@ Player *AtlanticCore::playerSelf() return m_playerSelf; } -QPtrList AtlanticCore::players() +TQPtrList AtlanticCore::players() { return m_players; } @@ -122,7 +122,7 @@ Player *AtlanticCore::newPlayer(int playerId, const bool &playerSelf) Player *AtlanticCore::findPlayer(int playerId) { Player *player = 0; - for (QPtrListIterator it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator it(m_players); (player = *it) ; ++it) if (player->id() == playerId) return player; @@ -136,12 +136,12 @@ void AtlanticCore::removePlayer(Player *player) player->deleteLater(); } -QPtrList AtlanticCore::games() +TQPtrList AtlanticCore::games() { return m_games; } -Game *AtlanticCore::newGame(int gameId, const QString &type) +Game *AtlanticCore::newGame(int gameId, const TQString &type) { Game *game = new Game(gameId); m_games.append(game); @@ -154,10 +154,10 @@ Game *AtlanticCore::newGame(int gameId, const QString &type) return game; } -Game *AtlanticCore::findGame(const QString &type) +Game *AtlanticCore::findGame(const TQString &type) { Game *game = 0; - for (QPtrListIterator it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator it(m_games); (game = *it) ; ++it) if (game->id() == -1 && game->type() == type) return game; @@ -170,7 +170,7 @@ Game *AtlanticCore::findGame(int gameId) return 0; Game *game = 0; - for (QPtrListIterator it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator it(m_games); (game = *it) ; ++it) if (game->id() == gameId) return game; @@ -191,11 +191,11 @@ void AtlanticCore::removeGame(Game *game) void AtlanticCore::emitGames() { - for (QPtrListIterator it(m_games); (*it) ; ++it) + for (TQPtrListIterator it(m_games); (*it) ; ++it) emit createGUI( (*it) ); } -QPtrList AtlanticCore::estates() +TQPtrList AtlanticCore::estates() { return m_estates; } @@ -210,7 +210,7 @@ Estate *AtlanticCore::newEstate(int estateId) Estate *AtlanticCore::findEstate(int estateId) { Estate *estate = 0; - for (QPtrListIterator it(m_estates); (estate = *it) ; ++it) + for (TQPtrListIterator it(m_estates); (estate = *it) ; ++it) if (estate->id() == estateId) return estate; @@ -221,7 +221,7 @@ Estate *AtlanticCore::estateAfter(Estate *estate) { Estate *eFirst = 0, *eTmp = 0; bool useNext = false; - for (QPtrListIterator it(m_estates); (eTmp = *it) ; ++it) + for (TQPtrListIterator it(m_estates); (eTmp = *it) ; ++it) { if (!eFirst) eFirst = eTmp; @@ -233,7 +233,7 @@ Estate *AtlanticCore::estateAfter(Estate *estate) return eFirst; } -QPtrList AtlanticCore::estateGroups() +TQPtrList AtlanticCore::estateGroups() { return m_estateGroups; } @@ -248,14 +248,14 @@ EstateGroup *AtlanticCore::newEstateGroup(int groupId) EstateGroup *AtlanticCore::findEstateGroup(int groupId) { EstateGroup *estateGroup = 0; - for (QPtrListIterator it(m_estateGroups); (estateGroup = *it) ; ++it) + for (TQPtrListIterator it(m_estateGroups); (estateGroup = *it) ; ++it) if (estateGroup->id() == groupId) return estateGroup; return 0; } -QPtrList AtlanticCore::trades() +TQPtrList AtlanticCore::trades() { return m_trades; } @@ -273,7 +273,7 @@ Trade *AtlanticCore::newTrade(int tradeId) Trade *AtlanticCore::findTrade(int tradeId) { Trade *trade = 0; - for (QPtrListIterator it(m_trades); (trade = *it) ; ++it) + for (TQPtrListIterator it(m_trades); (trade = *it) ; ++it) if (trade->tradeId() == tradeId) return trade; @@ -287,7 +287,7 @@ void AtlanticCore::removeTrade(Trade *trade) trade->deleteLater(); } -QPtrList AtlanticCore::auctions() +TQPtrList AtlanticCore::auctions() { return m_auctions; } @@ -325,7 +325,7 @@ void AtlanticCore::removeConfigOption(ConfigOption *configOption) ConfigOption *AtlanticCore::findConfigOption(int configId) { ConfigOption *configOption = 0; - for (QPtrListIterator it(m_configOptions); (configOption = *it) ; ++it) + for (TQPtrListIterator it(m_configOptions); (configOption = *it) ; ++it) if (configOption->id() == configId) return configOption; @@ -335,35 +335,35 @@ ConfigOption *AtlanticCore::findConfigOption(int configId) void AtlanticCore::printDebug() { Player *player = 0; - for (QPtrListIterator it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator it(m_players); (player = *it) ; ++it) if (player == m_playerSelf) - std::cout << "PS: " << player->name().latin1() << ", game " << QString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl; + std::cout << "PS: " << player->name().latin1() << ", game " << TQString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl; else - std::cout << " P: " << player->name().latin1() << ", game " << QString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl; + std::cout << " P: " << player->name().latin1() << ", game " << TQString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl; Game *game = 0; - for (QPtrListIterator it(m_games); (game = *it) ; ++it) - std::cout << " G: " << QString::number(game->id()).latin1() << ", master: " << QString::number(game->master() ? game->master()->id() : -1 ).latin1() << std::endl; + for (TQPtrListIterator it(m_games); (game = *it) ; ++it) + std::cout << " G: " << TQString::number(game->id()).latin1() << ", master: " << TQString::number(game->master() ? game->master()->id() : -1 ).latin1() << std::endl; Estate *estate = 0; - for (QPtrListIterator it(m_estates); (estate = *it) ; ++it) + for (TQPtrListIterator it(m_estates); (estate = *it) ; ++it) std::cout << " E: " << estate->name().latin1() << std::endl; EstateGroup *estateGroup = 0; - for (QPtrListIterator it(m_estateGroups); (estateGroup = *it) ; ++it) + for (TQPtrListIterator it(m_estateGroups); (estateGroup = *it) ; ++it) std::cout << "EG: " << estateGroup->name().latin1() << std::endl; Auction *auction = 0; - for (QPtrListIterator it(m_auctions); (auction = *it) ; ++it) - std::cout << " A: " << QString::number(auction->auctionId()).latin1() << std::endl; + for (TQPtrListIterator it(m_auctions); (auction = *it) ; ++it) + std::cout << " A: " << TQString::number(auction->auctionId()).latin1() << std::endl; Trade *trade = 0; - for (QPtrListIterator it(m_trades); (trade = *it) ; ++it) - std::cout << " T: " << QString::number(trade->tradeId()).latin1() << std::endl; + for (TQPtrListIterator it(m_trades); (trade = *it) ; ++it) + std::cout << " T: " << TQString::number(trade->tradeId()).latin1() << std::endl; ConfigOption *configOption = 0; - for (QPtrListIterator it(m_configOptions); (configOption = *it) ; ++it) - std::cout << "CO:" << QString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << " " << configOption->value().latin1() << std::endl; + for (TQPtrListIterator it(m_configOptions); (configOption = *it) ; ++it) + std::cout << "CO:" << TQString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << " " << configOption->value().latin1() << std::endl; } #include "atlantic_core.moc" -- cgit v1.2.1