diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /atlantik | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'atlantik')
63 files changed, 1140 insertions, 1140 deletions
diff --git a/atlantik/atlanticd/atlanticclient.cpp b/atlantik/atlanticd/atlanticclient.cpp index 0445165d..0e4e3e12 100644 --- a/atlantik/atlanticd/atlanticclient.cpp +++ b/atlantik/atlanticd/atlanticclient.cpp @@ -14,18 +14,18 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qtextstream.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqtimer.h> #include "atlanticclient.h" #include "atlanticclient.moc" -AtlanticClient::AtlanticClient(QObject *parent, const char *name) : QSocket(parent, name) +AtlanticClient::AtlanticClient(TQObject *parent, const char *name) : TQSocket(parent, name) { - connect(this, SIGNAL(readyRead()), this, SLOT(readData())); + connect(this, TQT_SIGNAL(readyRead()), this, TQT_SLOT(readData())); } -void AtlanticClient::sendData(const QString &data) +void AtlanticClient::sendData(const TQString &data) { writeBlock(data.latin1(), data.length()); } @@ -37,7 +37,7 @@ void AtlanticClient::readData() emit clientInput(this, readLine()); // There might be more data - QTimer::singleShot(0, this, SLOT(readData())); + TQTimer::singleShot(0, this, TQT_SLOT(readData())); } else { diff --git a/atlantik/atlanticd/atlanticclient.h b/atlantik/atlanticd/atlanticclient.h index 7b47b0f3..8f63b88c 100644 --- a/atlantik/atlanticd/atlanticclient.h +++ b/atlantik/atlanticd/atlanticclient.h @@ -17,20 +17,20 @@ #ifndef CLIENT_H #define CLIENT_H -#include <qsocket.h> +#include <tqsocket.h> class AtlanticClient : public QSocket { Q_OBJECT public: - AtlanticClient(QObject *parent = 0, const char *name = 0); - void sendData(const QString &data); + AtlanticClient(TQObject *parent = 0, const char *name = 0); + void sendData(const TQString &data); private slots: void readData(); signals: - void clientInput(AtlanticClient *client, const QString &data); + void clientInput(AtlanticClient *client, const TQString &data); }; #endif diff --git a/atlantik/atlanticd/atlanticdaemon.cpp b/atlantik/atlanticd/atlanticdaemon.cpp index 3fb80cf0..84a27925 100644 --- a/atlantik/atlanticd/atlanticdaemon.cpp +++ b/atlantik/atlanticd/atlanticdaemon.cpp @@ -14,9 +14,9 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qtimer.h> -#include <qsocket.h> -#include <qstring.h> +#include <tqtimer.h> +#include <tqsocket.h> +#include <tqstring.h> #include <atlantic_core.h> @@ -28,13 +28,13 @@ AtlanticDaemon::AtlanticDaemon() { m_serverSocket = new ServerSocket(1234, 100); - connect(m_serverSocket, SIGNAL(newClient(AtlanticClient *)), this, SLOT(newClient(AtlanticClient *))); + connect(m_serverSocket, TQT_SIGNAL(newClient(AtlanticClient *)), this, TQT_SLOT(newClient(AtlanticClient *))); m_atlanticCore = new AtlanticCore(this, "atlanticCore"); // Create socket for Monopigator - m_monopigatorSocket = new QSocket(); - connect(m_monopigatorSocket, SIGNAL(connected()), this, SLOT(monopigatorConnected())); + m_monopigatorSocket = new TQSocket(); + connect(m_monopigatorSocket, TQT_SIGNAL(connected()), this, TQT_SLOT(monopigatorConnected())); // Register server monopigatorRegister(); @@ -52,21 +52,21 @@ void AtlanticDaemon::monopigatorRegister() void AtlanticDaemon::monopigatorConnected() { - QString get = "GET /register.php?host=capsi.com&port=1234&version=atlanticd-prototype HTTP/1.1\nHost: gator.monopd.net\n\n"; + TQString get = "GET /register.php?host=capsi.com&port=1234&version=atlanticd-prototype HTTP/1.1\nHost: gator.monopd.net\n\n"; m_monopigatorSocket->writeBlock(get.latin1(), get.length()); m_monopigatorSocket->close(); // Monopigator clears old entries, so keep registering every 180s - QTimer::singleShot(180000, this, SLOT(monopigatorRegister())); + TQTimer::singleShot(180000, this, TQT_SLOT(monopigatorRegister())); } void AtlanticDaemon::newClient(AtlanticClient *client) { m_clients.append(client); - connect(client, SIGNAL(clientInput(AtlanticClient *, const QString &)), this, SLOT(clientInput(AtlanticClient *, const QString &))); + connect(client, TQT_SIGNAL(clientInput(AtlanticClient *, const TQString &)), this, TQT_SLOT(clientInput(AtlanticClient *, const TQString &))); } -void AtlanticDaemon::clientInput(AtlanticClient *client, const QString &data) +void AtlanticDaemon::clientInput(AtlanticClient *client, const TQString &data) { } diff --git a/atlantik/atlanticd/atlanticdaemon.h b/atlantik/atlanticd/atlanticdaemon.h index 729a960e..17e41898 100644 --- a/atlantik/atlanticd/atlanticdaemon.h +++ b/atlantik/atlanticd/atlanticdaemon.h @@ -17,7 +17,7 @@ #ifndef ATLANTIC_ATLANTICDAEMON_H #define ATLANTIC_ATLANTICDAEMON_H -#include <qptrlist.h> +#include <tqptrlist.h> class QSocket; @@ -36,13 +36,13 @@ private slots: void monopigatorRegister(); void monopigatorConnected(); void newClient(AtlanticClient *client); - void clientInput(AtlanticClient *client, const QString &data); + void clientInput(AtlanticClient *client, const TQString &data); private: - QSocket *m_monopigatorSocket; + TQSocket *m_monopigatorSocket; ServerSocket *m_serverSocket; AtlanticCore *m_atlanticCore; - QPtrList<AtlanticClient> m_clients; + TQPtrList<AtlanticClient> m_clients; }; #endif diff --git a/atlantik/atlanticd/main.cpp b/atlantik/atlanticd/main.cpp index 235dcd00..12905df8 100644 --- a/atlantik/atlanticd/main.cpp +++ b/atlantik/atlanticd/main.cpp @@ -14,7 +14,7 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qapplication.h> +#include <tqapplication.h> #include "atlanticdaemon.h" @@ -22,6 +22,6 @@ int main(int argc, char *argv[]) { new AtlanticDaemon(); - QApplication qapplication(argc, argv); + TQApplication qapplication(argc, argv); qapplication.exec(); } diff --git a/atlantik/atlanticd/serversocket.cpp b/atlantik/atlanticd/serversocket.cpp index 2056a754..0ddd4744 100644 --- a/atlantik/atlanticd/serversocket.cpp +++ b/atlantik/atlanticd/serversocket.cpp @@ -17,7 +17,7 @@ #include "atlanticclient.h" #include "serversocket.h" -ServerSocket::ServerSocket(int port, int backlog) : QServerSocket(port, backlog) +ServerSocket::ServerSocket(int port, int backlog) : TQServerSocket(port, backlog) { } diff --git a/atlantik/atlanticd/serversocket.h b/atlantik/atlanticd/serversocket.h index fce347e9..cc31c8ab 100644 --- a/atlantik/atlanticd/serversocket.h +++ b/atlantik/atlanticd/serversocket.h @@ -17,7 +17,7 @@ #ifndef SERVERSOCKET_H #define SERVERSOCKET_H -#include <qserversocket.h> +#include <tqserversocket.h> class AtlanticClient; diff --git a/atlantik/client/atlantik.cpp b/atlantik/client/atlantik.cpp index 56bae64b..f1e24645 100644 --- a/atlantik/client/atlantik.cpp +++ b/atlantik/client/atlantik.cpp @@ -16,11 +16,11 @@ #include <errno.h> -#include <qcolor.h> -#include <qdatetime.h> -#include <qlineedit.h> -#include <qscrollview.h> -#include <qpopupmenu.h> +#include <tqcolor.h> +#include <tqdatetime.h> +#include <tqlineedit.h> +#include <tqscrollview.h> +#include <tqpopupmenu.h> #include <kaboutapplication.h> #include <kaction.h> @@ -64,15 +64,15 @@ #include "selectgame_widget.h" #include "selectconfiguration_widget.h" -LogTextEdit::LogTextEdit( QWidget *parent, const char *name ) : QTextEdit( parent, name ) +LogTextEdit::LogTextEdit( TQWidget *parent, const char *name ) : TQTextEdit( parent, name ) { #ifdef KDE_3_2_FEATURES - m_clear = KStdAction::clear( this, SLOT( clear() ), 0 ); + m_clear = KStdAction::clear( this, TQT_SLOT( clear() ), 0 ); #else - m_clear = new KAction( i18n("Clear"), "clear", NULL, this, SLOT( clear() ), static_cast<KActionCollection *>(0), "clear" ); + m_clear = new KAction( i18n("Clear"), "clear", NULL, this, TQT_SLOT( clear() ), static_cast<KActionCollection *>(0), "clear" ); #endif - m_selectAll = KStdAction::selectAll( this, SLOT( selectAll() ), 0 ); - m_copy = KStdAction::copy( this, SLOT( copy() ), 0 ); + m_selectAll = KStdAction::selectAll( this, TQT_SLOT( selectAll() ), 0 ); + m_copy = KStdAction::copy( this, TQT_SLOT( copy() ), 0 ); } LogTextEdit::~LogTextEdit() @@ -82,9 +82,9 @@ LogTextEdit::~LogTextEdit() delete m_copy; } -QPopupMenu *LogTextEdit::createPopupMenu( const QPoint & ) +TQPopupMenu *LogTextEdit::createPopupMenu( const TQPoint & ) { - QPopupMenu *rmbMenu = new QPopupMenu( this ); + TQPopupMenu *rmbMenu = new TQPopupMenu( this ); m_clear->plug( rmbMenu ); rmbMenu->insertSeparator(); m_copy->setEnabled( hasSelectedText() ); @@ -102,13 +102,13 @@ Atlantik::Atlantik () readConfig(); // Toolbar: Game -// KStdGameAction::gameNew(this, SLOT(slotNewGame()), actionCollection(), "game_new"); - m_showEventLog = new KAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, this, SLOT(showEventLog()), actionCollection(), "showeventlog"); - KStdGameAction::quit(kapp, SLOT(closeAllWindows()), actionCollection(), "game_quit"); +// KStdGameAction::gameNew(this, TQT_SLOT(slotNewGame()), actionCollection(), "game_new"); + m_showEventLog = new KAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, this, TQT_SLOT(showEventLog()), actionCollection(), "showeventlog"); + KStdGameAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection(), "game_quit"); // Toolbar: Settings - KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection()); - KStdAction::configureNotifications(this, SLOT(configureNotifications()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection()); + KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), actionCollection()); // Initialize pointers to 0L m_configDialog = 0; @@ -121,78 +121,78 @@ Atlantik::Atlantik () // Game and network core m_atlanticCore = new AtlanticCore(this, "atlanticCore"); - connect(m_atlanticCore, SIGNAL(createGUI(Player *)), this, SLOT(newPlayer(Player *))); - connect(m_atlanticCore, SIGNAL(removeGUI(Player *)), this, SLOT(removeGUI(Player *))); - connect(m_atlanticCore, SIGNAL(createGUI(Trade *)), this, SLOT(newTrade(Trade *))); - connect(m_atlanticCore, SIGNAL(removeGUI(Trade *)), this, SLOT(removeGUI(Trade *))); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(Player *)), this, TQT_SLOT(newPlayer(Player *))); + connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Player *)), this, TQT_SLOT(removeGUI(Player *))); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(Trade *)), this, TQT_SLOT(newTrade(Trade *))); + connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Trade *)), this, TQT_SLOT(removeGUI(Trade *))); initEventLog(); initNetworkObject(); // Menu,toolbar: Move - m_roll = KStdGameAction::roll(this, SIGNAL(rollDice()), actionCollection()); + m_roll = KStdGameAction::roll(this, TQT_SIGNAL(rollDice()), actionCollection()); m_roll->setEnabled(false); - m_buyEstate = new KAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, this, SIGNAL(buyEstate()), actionCollection(), "buy_estate"); + m_buyEstate = new KAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, this, TQT_SIGNAL(buyEstate()), actionCollection(), "buy_estate"); m_buyEstate->setEnabled(false); - m_auctionEstate = new KAction(i18n("&Auction"), "auction", CTRL+Key_A, this, SIGNAL(auctionEstate()), actionCollection(), "auction"); + m_auctionEstate = new KAction(i18n("&Auction"), "auction", CTRL+Key_A, this, TQT_SIGNAL(auctionEstate()), actionCollection(), "auction"); m_auctionEstate->setEnabled(false); - m_endTurn = KStdGameAction::endTurn(this, SIGNAL(endTurn()), actionCollection()); + m_endTurn = KStdGameAction::endTurn(this, TQT_SIGNAL(endTurn()), actionCollection()); m_endTurn->setEnabled(false); - m_jailCard = new KAction(i18n("Use Card to Leave Jail")/*, "atlantik_move_jail_card"*/, 0, this, SIGNAL(jailCard()), actionCollection(), "move_jailcard"); + m_jailCard = new KAction(i18n("Use Card to Leave Jail")/*, "atlantik_move_jail_card"*/, 0, this, TQT_SIGNAL(jailCard()), actionCollection(), "move_jailcard"); m_jailCard->setEnabled(false); - m_jailPay = new KAction(i18n("&Pay to Leave Jail"), "jail_pay", CTRL+Key_P, this, SIGNAL(jailPay()), actionCollection(), "move_jailpay"); + m_jailPay = new KAction(i18n("&Pay to Leave Jail"), "jail_pay", CTRL+Key_P, this, TQT_SIGNAL(jailPay()), actionCollection(), "move_jailpay"); m_jailPay->setEnabled(false); - m_jailRoll = new KAction(i18n("Roll to Leave &Jail")/*, "atlantik_move_jail_roll"*/, CTRL+Key_J, this, SIGNAL(jailRoll()), actionCollection(), "move_jailroll"); + m_jailRoll = new KAction(i18n("Roll to Leave &Jail")/*, "atlantik_move_jail_roll"*/, CTRL+Key_J, this, TQT_SIGNAL(jailRoll()), actionCollection(), "move_jailroll"); m_jailRoll->setEnabled(false); // Mix code and XML into GUI KMainWindow::createGUI(); applyMainWindowSettings( KGlobal::config(), "AtlantikMainWindow" ); KMainWindow::statusBar()->insertItem("Atlantik " ATLANTIK_VERSION_STRING, 0); - KMainWindow::statusBar()->insertItem(QString::null, 1); - connect(statusBar(), SIGNAL(released(int)), this, SLOT(statusBarClick(int))); + KMainWindow::statusBar()->insertItem(TQString::null, 1); + connect(statusBar(), TQT_SIGNAL(released(int)), this, TQT_SLOT(statusBarClick(int))); // Main widget, containing all others - m_mainWidget = new QWidget(this, "main"); + m_mainWidget = new TQWidget(this, "main"); m_mainWidget->show(); - m_mainLayout = new QGridLayout(m_mainWidget, 3, 2); + m_mainLayout = new TQGridLayout(m_mainWidget, 3, 2); setCentralWidget(m_mainWidget); // Vertical view area for portfolios. - m_portfolioScroll = new QScrollView(m_mainWidget, "pfScroll"); + m_portfolioScroll = new TQScrollView(m_mainWidget, "pfScroll"); m_mainLayout->addWidget( m_portfolioScroll, 0, 0 ); - m_portfolioScroll->setHScrollBarMode( QScrollView::AlwaysOff ); - m_portfolioScroll->setResizePolicy( QScrollView::AutoOneFit ); + m_portfolioScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); + m_portfolioScroll->setResizePolicy( TQScrollView::AutoOneFit ); m_portfolioScroll->setFixedHeight( 200 ); m_portfolioScroll->hide(); - m_portfolioWidget = new QWidget( m_portfolioScroll->viewport(), "pfWidget" ); + m_portfolioWidget = new TQWidget( m_portfolioScroll->viewport(), "pfWidget" ); m_portfolioScroll->addChild( m_portfolioWidget ); m_portfolioWidget->show(); - m_portfolioLayout = new QVBoxLayout(m_portfolioWidget); + m_portfolioLayout = new TQVBoxLayout(m_portfolioWidget); m_portfolioViews.setAutoDelete(true); // Nice label -// m_portfolioLabel = new QLabel(i18n("Players"), m_portfolioWidget, "pfLabel"); +// m_portfolioLabel = new TQLabel(i18n("Players"), m_portfolioWidget, "pfLabel"); // m_portfolioLayout->addWidget(m_portfolioLabel); // m_portfolioLabel->show(); // Text view for chat and status messages from server. m_serverMsgs = new LogTextEdit(m_mainWidget, "serverMsgs"); - m_serverMsgs->setTextFormat(QTextEdit::PlainText); + m_serverMsgs->setTextFormat(TQTextEdit::PlainText); m_serverMsgs->setReadOnly(true); - m_serverMsgs->setHScrollBarMode(QScrollView::AlwaysOff); + m_serverMsgs->setHScrollBarMode(TQScrollView::AlwaysOff); m_serverMsgs->setMinimumWidth(200); m_mainLayout->addWidget(m_serverMsgs, 1, 0); // LineEdit to enter commands and chat messages. - m_input = new QLineEdit(m_mainWidget, "input"); + m_input = new TQLineEdit(m_mainWidget, "input"); m_mainLayout->addWidget(m_input, 2, 0); m_serverMsgs->setFocusProxy(m_input); - connect(m_input, SIGNAL(returnPressed()), this, SLOT(slotSendMsg())); + connect(m_input, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSendMsg())); // Set stretching where we want it. m_mainLayout->setRowStretch(1, 1); // make m_board+m_serverMsgs stretch vertically, not the rest @@ -201,8 +201,8 @@ Atlantik::Atlantik () // Check command-line args to see if we need to connect or show Monopigator window KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString host = args->getOption("host"); - QCString port = args->getOption("port"); + TQCString host = args->getOption("host"); + TQCString port = args->getOption("port"); if (!host.isNull() && !port.isNull()) m_atlantikNetwork->serverConnect(host, port.toInt()); else @@ -238,7 +238,7 @@ void Atlantik::readConfig() // Portfolio colors config->setGroup("WM"); - QColor activeDefault(204, 204, 204), inactiveDefault(153, 153, 153); + TQColor activeDefault(204, 204, 204), inactiveDefault(153, 153, 153); m_config.activeColor = config->readColorEntry("activeBackground", &activeDefault); m_config.inactiveColor = config->readColorEntry("inactiveBlend", &inactiveDefault); } @@ -253,9 +253,9 @@ void Atlantik::newPlayer(Player *player) // we'd better force an update. playerChanged(player); - connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); - connect(player, SIGNAL(gainedTurn()), this, SLOT(gainedTurn())); - connect(player, SIGNAL(changed(Player *)), m_board, SLOT(playerChanged(Player *))); + connect(player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); + connect(player, TQT_SIGNAL(gainedTurn()), this, TQT_SLOT(gainedTurn())); + connect(player, TQT_SIGNAL(changed(Player *)), m_board, TQT_SLOT(playerChanged(Player *))); KNotifyClient::event(winId(), "newplayer"); } @@ -314,8 +314,8 @@ void Atlantik::showSelectServer() m_atlanticCore->reset(true); initNetworkObject(); - connect(m_selectServer, SIGNAL(serverConnect(const QString, int)), m_atlantikNetwork, SLOT(serverConnect(const QString, int))); - connect(m_selectServer, SIGNAL(msgStatus(const QString &)), this, SLOT(slotMsgStatus(const QString &))); + connect(m_selectServer, TQT_SIGNAL(serverConnect(const TQString, int)), m_atlantikNetwork, TQT_SLOT(serverConnect(const TQString, int))); + connect(m_selectServer, TQT_SIGNAL(msgStatus(const TQString &)), this, TQT_SLOT(slotMsgStatus(const TQString &))); m_selectServer->slotRefresh( m_config.connectOnStart ); } @@ -354,10 +354,10 @@ void Atlantik::showSelectGame() m_selectConfiguration = 0; } - connect(m_selectGame, SIGNAL(joinGame(int)), m_atlantikNetwork, SLOT(joinGame(int))); - connect(m_selectGame, SIGNAL(newGame(const QString &)), m_atlantikNetwork, SLOT(newGame(const QString &))); - connect(m_selectGame, SIGNAL(leaveServer()), this, SLOT(showSelectServer())); - connect(m_selectGame, SIGNAL(msgStatus(const QString &)), this, SLOT(slotMsgStatus(const QString &))); + connect(m_selectGame, TQT_SIGNAL(joinGame(int)), m_atlantikNetwork, TQT_SLOT(joinGame(int))); + connect(m_selectGame, TQT_SIGNAL(newGame(const TQString &)), m_atlantikNetwork, TQT_SLOT(newGame(const TQString &))); + connect(m_selectGame, TQT_SIGNAL(leaveServer()), this, TQT_SLOT(showSelectServer())); + connect(m_selectGame, TQT_SIGNAL(msgStatus(const TQString &)), this, TQT_SLOT(slotMsgStatus(const TQString &))); } void Atlantik::showSelectConfiguration() @@ -375,15 +375,15 @@ void Atlantik::showSelectConfiguration() m_mainLayout->addMultiCellWidget(m_selectConfiguration, 0, 2, 1, 1); m_selectConfiguration->show(); - connect(m_atlanticCore, SIGNAL(createGUI(ConfigOption *)), m_selectConfiguration, SLOT(addConfigOption(ConfigOption *))); - connect(m_atlantikNetwork, SIGNAL(gameOption(QString, QString, QString, QString, QString)), m_selectConfiguration, SLOT(gameOption(QString, QString, QString, QString, QString))); - connect(m_atlantikNetwork, SIGNAL(gameInit()), m_selectConfiguration, SLOT(initGame())); - connect(m_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame())); - connect(m_selectConfiguration, SIGNAL(leaveGame()), m_atlantikNetwork, SLOT(leaveGame())); - connect(m_selectConfiguration, SIGNAL(changeOption(int, const QString &)), m_atlantikNetwork, SLOT(changeOption(int, const QString &))); - connect(m_selectConfiguration, SIGNAL(buttonCommand(QString)), m_atlantikNetwork, SLOT(writeData(QString))); - connect(m_selectConfiguration, SIGNAL(iconSelected(const QString &)), m_atlantikNetwork, SLOT(setImage(const QString &))); - connect(m_selectConfiguration, SIGNAL(statusMessage(const QString &)), this, SLOT(slotMsgStatus(const QString &))); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(ConfigOption *)), m_selectConfiguration, TQT_SLOT(addConfigOption(ConfigOption *))); + connect(m_atlantikNetwork, TQT_SIGNAL(gameOption(TQString, TQString, TQString, TQString, TQString)), m_selectConfiguration, TQT_SLOT(gameOption(TQString, TQString, TQString, TQString, TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(gameInit()), m_selectConfiguration, TQT_SLOT(initGame())); + connect(m_selectConfiguration, TQT_SIGNAL(startGame()), m_atlantikNetwork, TQT_SLOT(startGame())); + connect(m_selectConfiguration, TQT_SIGNAL(leaveGame()), m_atlantikNetwork, TQT_SLOT(leaveGame())); + connect(m_selectConfiguration, TQT_SIGNAL(changeOption(int, const TQString &)), m_atlantikNetwork, TQT_SLOT(changeOption(int, const TQString &))); + connect(m_selectConfiguration, TQT_SIGNAL(buttonCommand(TQString)), m_atlantikNetwork, TQT_SLOT(writeData(TQString))); + connect(m_selectConfiguration, TQT_SIGNAL(iconSelected(const TQString &)), m_atlantikNetwork, TQT_SLOT(setImage(const TQString &))); + connect(m_selectConfiguration, TQT_SIGNAL(statusMessage(const TQString &)), this, TQT_SLOT(slotMsgStatus(const TQString &))); } void Atlantik::initBoard() @@ -394,11 +394,11 @@ void Atlantik::initBoard() m_board = new AtlantikBoard(m_atlanticCore, 40, AtlantikBoard::Play, m_mainWidget, "board"); m_board->setViewProperties(m_config.indicateUnowned, m_config.highliteUnowned, m_config.darkenMortgaged, m_config.quartzEffects, m_config.animateTokens); - connect(m_atlantikNetwork, SIGNAL(displayDetails(QString, bool, bool, Estate *)), m_board, SLOT(insertDetails(QString, bool, bool, Estate *))); - connect(m_atlantikNetwork, SIGNAL(addCommandButton(QString, QString, bool)), m_board, SLOT(displayButton(QString, QString, bool))); - connect(m_atlantikNetwork, SIGNAL(addCloseButton()), m_board, SLOT(addCloseButton())); - connect(m_board, SIGNAL(tokenConfirmation(Estate *)), m_atlantikNetwork, SLOT(tokenConfirmation(Estate *))); - connect(m_board, SIGNAL(buttonCommand(QString)), m_atlantikNetwork, SLOT(writeData(QString))); + connect(m_atlantikNetwork, TQT_SIGNAL(displayDetails(TQString, bool, bool, Estate *)), m_board, TQT_SLOT(insertDetails(TQString, bool, bool, Estate *))); + connect(m_atlantikNetwork, TQT_SIGNAL(addCommandButton(TQString, TQString, bool)), m_board, TQT_SLOT(displayButton(TQString, TQString, bool))); + connect(m_atlantikNetwork, TQT_SIGNAL(addCloseButton()), m_board, TQT_SLOT(addCloseButton())); + connect(m_board, TQT_SIGNAL(tokenConfirmation(Estate *)), m_atlantikNetwork, TQT_SLOT(tokenConfirmation(Estate *))); + connect(m_board, TQT_SIGNAL(buttonCommand(TQString)), m_atlantikNetwork, TQT_SLOT(writeData(TQString))); } void Atlantik::showBoard() @@ -425,7 +425,7 @@ void Atlantik::showBoard() m_board->show(); PortfolioView *portfolioView = 0; - for (QPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it) + for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it) if ((portfolioView = dynamic_cast<PortfolioView*>(*it))) portfolioView->buildPortfolio(); } @@ -445,7 +445,7 @@ void Atlantik::slotNetworkConnected() void Atlantik::slotNetworkError(int errnum) { - QString errMsg(i18n("Error connecting: ")); + TQString errMsg(i18n("Error connecting: ")); switch (m_atlantikNetwork->status()) { @@ -475,12 +475,12 @@ void Atlantik::networkClosed(int status) switch( status ) { case KBufferedIO::involuntary: - slotMsgStatus( i18n("Connection with server %1:%2 lost.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), QString("connect_no") ); + slotMsgStatus( i18n("Connection with server %1:%2 lost.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), TQString("connect_no") ); showSelectServer(); break; default: if ( !m_atlantikNetwork->host().isEmpty() ) - slotMsgStatus( i18n("Disconnected from %1:%2.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), QString("connect_no") ); + slotMsgStatus( i18n("Disconnected from %1:%2.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), TQString("connect_no") ); break; } } @@ -491,7 +491,7 @@ void Atlantik::slotConfigure() m_configDialog = new ConfigDialog(this); m_configDialog->show(); - connect(m_configDialog, SIGNAL(okClicked()), this, SLOT(slotUpdateConfig())); + connect(m_configDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotUpdateConfig())); } void Atlantik::showEventLog() @@ -510,7 +510,7 @@ void Atlantik::slotUpdateConfig() { KConfig *config=kapp->config(); bool optBool, configChanged = false; - QString optStr; + TQString optStr; optBool = m_configDialog->chatTimestamps(); if (m_config.chatTimestamps != optBool) @@ -612,38 +612,38 @@ void Atlantik::slotUpdateConfig() void Atlantik::slotSendMsg() { m_atlantikNetwork->cmdChat(m_input->text()); - m_input->setText(QString::null); + m_input->setText(TQString::null); } -void Atlantik::slotMsgInfo(QString msg) +void Atlantik::slotMsgInfo(TQString msg) { serverMsgsAppend(msg); } -void Atlantik::slotMsgError(QString msg) +void Atlantik::slotMsgError(TQString msg) { serverMsgsAppend("Error: " + msg); } -void Atlantik::slotMsgStatus(const QString &message, const QString &icon) +void Atlantik::slotMsgStatus(const TQString &message, const TQString &icon) { KMainWindow::statusBar()->changeItem(message, 1); m_eventLog->addEvent(message, icon); } -void Atlantik::slotMsgChat(QString player, QString msg) +void Atlantik::slotMsgChat(TQString player, TQString msg) { if (m_config.chatTimestamps) { - QTime time = QTime::currentTime(); - serverMsgsAppend(QString("[%1] %2: %3").arg(time.toString("hh:mm")).arg(player).arg(msg)); + TQTime time = TQTime::currentTime(); + serverMsgsAppend(TQString("[%1] %2: %3").arg(time.toString("hh:mm")).arg(player).arg(msg)); } else serverMsgsAppend(player + ": " + msg); KNotifyClient::event(winId(), "chat"); } -void Atlantik::serverMsgsAppend(QString msg) +void Atlantik::serverMsgsAppend(TQString msg) { // Use append, not setText(old+new) because that one doesn't wrap m_serverMsgs->append(msg); @@ -661,7 +661,7 @@ void Atlantik::playerChanged(Player *player) { // We changed ourselves.. PortfolioView *portfolioView = 0; - for (QPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it) + for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it) if ((portfolioView = dynamic_cast<PortfolioView*>(*it))) { // Clear all portfolios if we're not in game @@ -728,38 +728,38 @@ void Atlantik::initNetworkObject() } m_atlantikNetwork = new AtlantikNetwork(m_atlanticCore); - connect(m_atlantikNetwork, SIGNAL(msgInfo(QString)), this, SLOT(slotMsgInfo(QString))); - connect(m_atlantikNetwork, SIGNAL(msgError(QString)), this, SLOT(slotMsgError(QString))); - connect(m_atlantikNetwork, SIGNAL(msgStatus(const QString &, const QString &)), this, SLOT(slotMsgStatus(const QString &, const QString &))); - connect(m_atlantikNetwork, SIGNAL(msgChat(QString, QString)), this, SLOT(slotMsgChat(QString, QString))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgInfo(TQString)), this, TQT_SLOT(slotMsgInfo(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgError(TQString)), this, TQT_SLOT(slotMsgError(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgStatus(const TQString &, const TQString &)), this, TQT_SLOT(slotMsgStatus(const TQString &, const TQString &))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgChat(TQString, TQString)), this, TQT_SLOT(slotMsgChat(TQString, TQString))); - connect(m_atlantikNetwork, SIGNAL(connectionSuccess()), this, SLOT(slotNetworkConnected())); - connect(m_atlantikNetwork, SIGNAL(connectionFailed(int)), this, SLOT(slotNetworkError(int))); - connect(m_atlantikNetwork, SIGNAL(closed(int)), this, SLOT(networkClosed(int))); + connect(m_atlantikNetwork, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotNetworkConnected())); + connect(m_atlantikNetwork, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotNetworkError(int))); + connect(m_atlantikNetwork, TQT_SIGNAL(closed(int)), this, TQT_SLOT(networkClosed(int))); - connect(m_atlantikNetwork, SIGNAL(receivedHandshake()), this, SLOT(sendHandshake())); + connect(m_atlantikNetwork, TQT_SIGNAL(receivedHandshake()), this, TQT_SLOT(sendHandshake())); - connect(m_atlantikNetwork, SIGNAL(gameConfig()), this, SLOT(showSelectConfiguration())); - connect(m_atlantikNetwork, SIGNAL(gameInit()), this, SLOT(initBoard())); - connect(m_atlantikNetwork, SIGNAL(gameRun()), this, SLOT(showBoard())); - connect(m_atlantikNetwork, SIGNAL(gameEnd()), this, SLOT(freezeBoard())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameConfig()), this, TQT_SLOT(showSelectConfiguration())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameInit()), this, TQT_SLOT(initBoard())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameRun()), this, TQT_SLOT(showBoard())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameEnd()), this, TQT_SLOT(freezeBoard())); - connect(m_atlantikNetwork, SIGNAL(newEstate(Estate *)), this, SLOT(newEstate(Estate *))); - connect(m_atlantikNetwork, SIGNAL(newAuction(Auction *)), this, SLOT(newAuction(Auction *))); + connect(m_atlantikNetwork, TQT_SIGNAL(newEstate(Estate *)), this, TQT_SLOT(newEstate(Estate *))); + connect(m_atlantikNetwork, TQT_SIGNAL(newAuction(Auction *)), this, TQT_SLOT(newAuction(Auction *))); - connect(m_atlantikNetwork, SIGNAL(clientCookie(QString)), this, SLOT(clientCookie(QString))); - connect(m_atlantikNetwork, SIGNAL(networkEvent(const QString &, const QString &)), m_eventLog, SLOT(addEvent(const QString &, const QString &))); + connect(m_atlantikNetwork, TQT_SIGNAL(clientCookie(TQString)), this, TQT_SLOT(clientCookie(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(networkEvent(const TQString &, const TQString &)), m_eventLog, TQT_SLOT(addEvent(const TQString &, const TQString &))); - connect(this, SIGNAL(rollDice()), m_atlantikNetwork, SLOT(rollDice())); - connect(this, SIGNAL(buyEstate()), m_atlantikNetwork, SLOT(buyEstate())); - connect(this, SIGNAL(auctionEstate()), m_atlantikNetwork, SLOT(auctionEstate())); - connect(this, SIGNAL(endTurn()), m_atlantikNetwork, SLOT(endTurn())); - connect(this, SIGNAL(jailCard()), m_atlantikNetwork, SLOT(jailCard())); - connect(this, SIGNAL(jailPay()), m_atlantikNetwork, SLOT(jailPay())); - connect(this, SIGNAL(jailRoll()), m_atlantikNetwork, SLOT(jailRoll())); + connect(this, TQT_SIGNAL(rollDice()), m_atlantikNetwork, TQT_SLOT(rollDice())); + connect(this, TQT_SIGNAL(buyEstate()), m_atlantikNetwork, TQT_SLOT(buyEstate())); + connect(this, TQT_SIGNAL(auctionEstate()), m_atlantikNetwork, TQT_SLOT(auctionEstate())); + connect(this, TQT_SIGNAL(endTurn()), m_atlantikNetwork, TQT_SLOT(endTurn())); + connect(this, TQT_SIGNAL(jailCard()), m_atlantikNetwork, TQT_SLOT(jailCard())); + connect(this, TQT_SIGNAL(jailPay()), m_atlantikNetwork, TQT_SLOT(jailPay())); + connect(this, TQT_SIGNAL(jailRoll()), m_atlantikNetwork, TQT_SLOT(jailRoll())); } -void Atlantik::clientCookie(QString cookie) +void Atlantik::clientCookie(TQString cookie) { KConfig *config = kapp->config(); @@ -789,7 +789,7 @@ void Atlantik::sendHandshake() // Check command-line args to see if we need to auto-join KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString game = args->getOption("game"); + TQCString game = args->getOption("game"); if (!game.isNull()) m_atlantikNetwork->joinGame(game.toInt()); } @@ -812,10 +812,10 @@ PortfolioView *Atlantik::addPortfolioView(Player *player) if ( m_portfolioViews.count() > 0 && m_portfolioScroll->isHidden() ) m_portfolioScroll->show(); - connect(player, SIGNAL(changed(Player *)), portfolioView, SLOT(playerChanged())); - connect(portfolioView, SIGNAL(newTrade(Player *)), m_atlantikNetwork, SLOT(newTrade(Player *))); - connect(portfolioView, SIGNAL(kickPlayer(Player *)), m_atlantikNetwork, SLOT(kickPlayer(Player *))); - connect(portfolioView, SIGNAL(estateClicked(Estate *)), m_board, SLOT(prependEstateDetails(Estate *))); + connect(player, TQT_SIGNAL(changed(Player *)), portfolioView, TQT_SLOT(playerChanged())); + connect(portfolioView, TQT_SIGNAL(newTrade(Player *)), m_atlantikNetwork, TQT_SLOT(newTrade(Player *))); + connect(portfolioView, TQT_SIGNAL(kickPlayer(Player *)), m_atlantikNetwork, TQT_SLOT(kickPlayer(Player *))); + connect(portfolioView, TQT_SIGNAL(estateClicked(Estate *)), m_board, TQT_SLOT(prependEstateDetails(Estate *))); m_portfolioLayout->addWidget(portfolioView); portfolioView->show(); @@ -826,14 +826,14 @@ PortfolioView *Atlantik::addPortfolioView(Player *player) PortfolioView *Atlantik::findPortfolioView(Player *player) { PortfolioView *portfolioView = 0; - for (QPtrListIterator<PortfolioView> it(m_portfolioViews); (portfolioView = *it) ; ++it) + for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); (portfolioView = *it) ; ++it) if (player == portfolioView->player()) return portfolioView; return 0; } -void Atlantik::closeEvent(QCloseEvent *e) +void Atlantik::closeEvent(TQCloseEvent *e) { Game *gameSelf = m_atlanticCore->gameSelf(); Player *playerSelf = m_atlanticCore->playerSelf(); diff --git a/atlantik/client/atlantik.h b/atlantik/client/atlantik.h index 94f2ca7c..2a181437 100644 --- a/atlantik/client/atlantik.h +++ b/atlantik/client/atlantik.h @@ -17,11 +17,11 @@ #ifndef ATLANTIK_ATLANTIK_H #define ATLANTIK_ATLANTIK_H -#include <qwidget.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qlabel.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqlabel.h> +#include <tqptrlist.h> #include <kmainwindow.h> @@ -40,7 +40,7 @@ struct AtlantikConfig bool chatTimestamps; // Personalization options - QString playerName, playerImage; + TQString playerName, playerImage; // Board options bool indicateUnowned; @@ -54,7 +54,7 @@ struct AtlantikConfig bool hideDevelopmentServers; // Portfolio colors - QColor activeColor, inactiveColor; + TQColor activeColor, inactiveColor; }; class EventLog; @@ -73,10 +73,10 @@ class LogTextEdit : public QTextEdit Q_OBJECT public: - LogTextEdit( QWidget *parent = 0, const char *name = 0 ); + LogTextEdit( TQWidget *parent = 0, const char *name = 0 ); virtual ~LogTextEdit(); - QPopupMenu *createPopupMenu( const QPoint & pos ); + TQPopupMenu *createPopupMenu( const TQPoint & pos ); private: KAction *m_clear, *m_selectAll, *m_copy; @@ -110,7 +110,7 @@ public: * * @param msg Message to be appended. */ - void serverMsgsAppend(QString msg); + void serverMsgsAppend(TQString msg); AtlantikConfig config() { return m_config; } @@ -121,7 +121,7 @@ private slots: void initBoard(); void showBoard(); void freezeBoard(); - void clientCookie(QString cookie); + void clientCookie(TQString cookie); void sendHandshake(); void statusBarClick(int); @@ -138,7 +138,7 @@ public slots: * An error occurred while setting up the network connection. Inform the * user. * - * @param errno See http://doc.trolltech.com/3.0/qsocket.html#Error-enum + * @param errno See http://doc.trolltech.com/3.0/tqsocket.html#Error-enum */ void slotNetworkError(int errnum); @@ -184,9 +184,9 @@ public slots: * * @param msg The message to be appended. */ - void slotMsgInfo(QString msg); + void slotMsgInfo(TQString msg); - void slotMsgStatus(const QString &message, const QString &icon = QString::null); + void slotMsgStatus(const TQString &message, const TQString &icon = TQString::null); /** * Informs serverMsgs() to append an incoming message from the @@ -194,7 +194,7 @@ public slots: * * @param msg The error message to be appended. */ - void slotMsgError(QString msg); + void slotMsgError(TQString msg); /** * Informs serverMsgs() to append an incoming message from the @@ -203,7 +203,7 @@ public slots: * @param player The name of the player chatting. * @param msg The chat message to be appended. */ - void slotMsgChat(QString player, QString msg); + void slotMsgChat(TQString player, TQString msg); void newPlayer(Player *player); void newEstate(Estate *estate); @@ -226,7 +226,7 @@ signals: void jailRoll(); protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private: void initEventLog(); @@ -234,14 +234,14 @@ private: PortfolioView *addPortfolioView(Player *player); PortfolioView *findPortfolioView(Player *player); - QScrollView *m_portfolioScroll; - QWidget *m_mainWidget, *m_portfolioWidget; - QGridLayout *m_mainLayout; - QVBoxLayout *m_portfolioLayout; + TQScrollView *m_portfolioScroll; + TQWidget *m_mainWidget, *m_portfolioWidget; + TQGridLayout *m_mainLayout; + TQVBoxLayout *m_portfolioLayout; - QLabel *m_portfolioLabel; - QLineEdit *m_input; - QTextEdit *m_serverMsgs; + TQLabel *m_portfolioLabel; + TQLineEdit *m_input; + TQTextEdit *m_serverMsgs; KAction *m_roll, *m_buyEstate, *m_auctionEstate, *m_endTurn, *m_jailCard, *m_jailPay, *m_jailRoll, *m_configure, @@ -259,8 +259,8 @@ private: EventLog *m_eventLog; EventLogWidget *m_eventLogWidget; - QPtrList<PortfolioView> m_portfolioViews; - QMap<Trade *, TradeDisplay *> m_tradeGUIMap; + TQPtrList<PortfolioView> m_portfolioViews; + TQMap<Trade *, TradeDisplay *> m_tradeGUIMap; bool m_runningGame; }; diff --git a/atlantik/client/configdlg.cpp b/atlantik/client/configdlg.cpp index a8e152b5..9e936147 100644 --- a/atlantik/client/configdlg.cpp +++ b/atlantik/client/configdlg.cpp @@ -14,10 +14,10 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qlayout.h> -#include <qgroupbox.h> -#include <qwhatsthis.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> #include <kdeversion.h> #undef KDE_3_1_FEATURES @@ -86,12 +86,12 @@ bool ConfigDialog::quartzEffects() return configBoard->quartzEffects(); } -QString ConfigDialog::playerName() +TQString ConfigDialog::playerName() { return configPlayer->playerName(); } -QString ConfigDialog::playerImage() +TQString ConfigDialog::playerImage() { return configPlayer->playerImage(); } @@ -111,36 +111,36 @@ AtlantikConfig ConfigDialog::config() return m_parent->config(); } -ConfigPlayer::ConfigPlayer(ConfigDialog* configDialog, QWidget *parent, const char *name) : QWidget(parent, name) +ConfigPlayer::ConfigPlayer(ConfigDialog* configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_configDialog = configDialog; - QVBoxLayout *layout = new QVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); - QLabel *label = new QLabel(i18n("Player name:"), parent); + TQLabel *label = new TQLabel(i18n("Player name:"), parent); layout->addWidget(label); - m_playerName = new QLineEdit(parent); + m_playerName = new TQLineEdit(parent); layout->addWidget(m_playerName); - QLabel *label2 = new QLabel(i18n("Player image:"), parent); + TQLabel *label2 = new TQLabel(i18n("Player image:"), parent); layout->addWidget(label2); m_playerIcon = new KPushButton(parent, "playerIcon"); layout->addWidget(m_playerIcon); - connect( m_playerIcon, SIGNAL(clicked()), this, SLOT(chooseImage()) ); + connect( m_playerIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseImage()) ); layout->addStretch(1); reset(); } -QString ConfigPlayer::playerName() +TQString ConfigPlayer::playerName() { return m_playerName->text(); } -QString ConfigPlayer::playerImage() +TQString ConfigPlayer::playerImage() { return m_playerImage; } @@ -157,12 +157,12 @@ void ConfigPlayer::chooseImage() iconDialog.setup( KIcon::Desktop, KIcon::Application, false, 0, true ); // begin with user icons #endif - QString image = iconDialog.openDialog(); + TQString image = iconDialog.openDialog(); if ( image.isEmpty() ) return; - QStringList splitPath = QStringList::split( '/', image ); + TQStringList splitPath = TQStringList::split( '/', image ); m_playerImage = splitPath[ splitPath.count()-1 ]; setImage(); @@ -170,9 +170,9 @@ void ConfigPlayer::chooseImage() void ConfigPlayer::setImage() { - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_playerImage); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_playerImage); if (KStandardDirs::exists(filename)) - m_playerIcon->setPixmap( QPixmap(filename) ); + m_playerIcon->setPixmap( TQPixmap(filename) ); } void ConfigPlayer::reset() @@ -182,27 +182,27 @@ void ConfigPlayer::reset() setImage(); } -ConfigMonopigator::ConfigMonopigator(ConfigDialog *configDialog, QWidget *parent, const char *name) : QWidget(parent, name) +ConfigMonopigator::ConfigMonopigator(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_configDialog = configDialog; - QVBoxLayout *layout = new QVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); - m_connectOnStart = new QCheckBox(i18n("Request list of Internet servers on start-up"), parent); + m_connectOnStart = new TQCheckBox(i18n("Request list of Internet servers on start-up"), parent); layout->addWidget(m_connectOnStart); - QString message=i18n( + TQString message=i18n( "If checked, Atlantik connects to a meta server on start-up to\n" "request a list of Internet servers.\n"); - QWhatsThis::add(m_connectOnStart, message); + TQWhatsThis::add(m_connectOnStart, message); - m_hideDevelopmentServers = new QCheckBox(i18n("Hide development servers"), parent); + m_hideDevelopmentServers = new TQCheckBox(i18n("Hide development servers"), parent); layout->addWidget(m_hideDevelopmentServers); message=i18n( "Some of the Internet servers might be running development\n" "versions of the server software. If checked, Atlantik will not\n" "display these servers.\n"); - QWhatsThis::add(m_hideDevelopmentServers, message); + TQWhatsThis::add(m_hideDevelopmentServers, message); layout->addStretch(1); @@ -225,18 +225,18 @@ void ConfigMonopigator::reset() m_hideDevelopmentServers->setChecked(m_configDialog->config().hideDevelopmentServers); } -ConfigGeneral::ConfigGeneral(ConfigDialog *configDialog, QWidget *parent, const char *name) : QWidget(parent, name) +ConfigGeneral::ConfigGeneral(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_configDialog = configDialog; - QVBoxLayout *layout = new QVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); - m_chatTimestamps = new QCheckBox(i18n("Show timestamps in chat messages"), parent); + m_chatTimestamps = new TQCheckBox(i18n("Show timestamps in chat messages"), parent); layout->addWidget(m_chatTimestamps); - QString message=i18n( + TQString message=i18n( "If checked, Atlantik will add timestamps in front of chat\n" "messages.\n"); - QWhatsThis::add(m_chatTimestamps, message); + TQWhatsThis::add(m_chatTimestamps, message); layout->addStretch(1); @@ -253,45 +253,45 @@ void ConfigGeneral::reset() m_chatTimestamps->setChecked(m_configDialog->config().chatTimestamps); } -ConfigBoard::ConfigBoard(ConfigDialog *configDialog, QWidget *parent, const char *name) : QWidget(parent, name) +ConfigBoard::ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_configDialog = configDialog; - QVBoxLayout *layout = new QVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint()); - QGroupBox *box = new QGroupBox(1, Qt::Horizontal, i18n("Game Status Feedback"), parent); + TQGroupBox *box = new TQGroupBox(1, Qt::Horizontal, i18n("Game Status Feedback"), parent); layout->addWidget(box); - m_indicateUnowned = new QCheckBox(i18n("Display title deed card on unowned properties"), box); - QString message=i18n( + m_indicateUnowned = new TQCheckBox(i18n("Display title deed card on unowned properties"), box); + TQString message=i18n( "If checked, unowned properties on the board display an estate\n" "card to indicate the property is for sale.\n"); - QWhatsThis::add(m_indicateUnowned, message); + TQWhatsThis::add(m_indicateUnowned, message); - m_highliteUnowned = new QCheckBox(i18n("Highlight unowned properties"), box); + m_highliteUnowned = new TQCheckBox(i18n("Highlight unowned properties"), box); message=i18n( "If checked, unowned properties on the board are highlighted to\n" "indicate the property is for sale.\n"); - QWhatsThis::add(m_highliteUnowned, message); + TQWhatsThis::add(m_highliteUnowned, message); - m_darkenMortgaged = new QCheckBox(i18n("Darken mortgaged properties"), box); + m_darkenMortgaged = new TQCheckBox(i18n("Darken mortgaged properties"), box); message=i18n( "If checked, mortgaged properties on the board will be colored\n" "darker than of the default color.\n"); - QWhatsThis::add(m_darkenMortgaged, message); + TQWhatsThis::add(m_darkenMortgaged, message); - m_animateToken = new QCheckBox(i18n("Animate token movement"), box); + m_animateToken = new TQCheckBox(i18n("Animate token movement"), box); message=i18n( "If checked, tokens will move across the board\n" "instead of jumping directly to their new location.\n"); - QWhatsThis::add(m_animateToken, message); + TQWhatsThis::add(m_animateToken, message); - m_quartzEffects = new QCheckBox(i18n("Quartz effects"), box); + m_quartzEffects = new TQCheckBox(i18n("Quartz effects"), box); message=i18n( "If checked, the colored headers of street estates on the board " "will have a Quartz effect similar to the Quartz KWin style.\n"); - QWhatsThis::add(m_quartzEffects, message); + TQWhatsThis::add(m_quartzEffects, message); -// box = new QGroupBox(1, Qt::Horizontal, i18n("Size"), parent); +// box = new TQGroupBox(1, Qt::Horizontal, i18n("Size"), parent); // layout->addWidget(box); layout->addStretch(1); diff --git a/atlantik/client/configdlg.h b/atlantik/client/configdlg.h index c1f74294..24b10d78 100644 --- a/atlantik/client/configdlg.h +++ b/atlantik/client/configdlg.h @@ -17,9 +17,9 @@ #ifndef ATLANTIK_CONFIGDLG_H #define ATLANTIK_CONFIGDLG_H -#include <qwidget.h> -#include <qcheckbox.h> -#include <qlineedit.h> +#include <tqwidget.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> #include <kdialogbase.h> @@ -37,10 +37,10 @@ class ConfigPlayer : public QWidget Q_OBJECT public: - ConfigPlayer(ConfigDialog *configDialog, QWidget *parent, const char *name=0); + ConfigPlayer(ConfigDialog *configDialog, TQWidget *parent, const char *name=0); - QString playerName(); - QString playerImage(); + TQString playerName(); + TQString playerImage(); private slots: void chooseImage(); @@ -50,8 +50,8 @@ private: void reset(); ConfigDialog *m_configDialog; - QLineEdit *m_playerName; - QString m_playerImage; + TQLineEdit *m_playerName; + TQString m_playerImage; KPushButton *m_playerIcon; }; @@ -60,7 +60,7 @@ class ConfigBoard : public QWidget Q_OBJECT public: - ConfigBoard(ConfigDialog *configDialog, QWidget *parent, const char *name=0); + ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const char *name=0); bool indicateUnowned(); bool highliteUnowned(); @@ -72,7 +72,7 @@ private: void reset(); ConfigDialog *m_configDialog; - QCheckBox *m_indicateUnowned, *m_highliteUnowned, *m_darkenMortgaged, *m_animateToken, *m_quartzEffects; + TQCheckBox *m_indicateUnowned, *m_highliteUnowned, *m_darkenMortgaged, *m_animateToken, *m_quartzEffects; }; class ConfigMonopigator : public QWidget @@ -80,7 +80,7 @@ class ConfigMonopigator : public QWidget Q_OBJECT public: - ConfigMonopigator(ConfigDialog *dialog, QWidget *parent, const char *name = 0); + ConfigMonopigator(ConfigDialog *dialog, TQWidget *parent, const char *name = 0); bool connectOnStart(); bool hideDevelopmentServers(); @@ -89,7 +89,7 @@ private: void reset(); ConfigDialog *m_configDialog; - QCheckBox *m_connectOnStart, *m_hideDevelopmentServers; + TQCheckBox *m_connectOnStart, *m_hideDevelopmentServers; }; class ConfigGeneral : public QWidget @@ -97,7 +97,7 @@ class ConfigGeneral : public QWidget Q_OBJECT public: - ConfigGeneral(ConfigDialog *dialog, QWidget *parent, const char *name = 0); + ConfigGeneral(ConfigDialog *dialog, TQWidget *parent, const char *name = 0); bool chatTimestamps(); @@ -105,7 +105,7 @@ private: void reset(); ConfigDialog *m_configDialog; - QCheckBox *m_chatTimestamps; + TQCheckBox *m_chatTimestamps; }; class ConfigDialog : public KDialogBase @@ -122,14 +122,14 @@ public: bool animateToken(); bool quartzEffects(); AtlantikConfig config(); - QString playerName(); - QString playerImage(); + TQString playerName(); + TQString playerImage(); bool connectOnStart(); bool hideDevelopmentServers(); private: Atlantik *m_parent; - QFrame *p_general, *p_p13n, *p_board, *p_monopigator; + TQFrame *p_general, *p_p13n, *p_board, *p_monopigator; ConfigPlayer *configPlayer; ConfigBoard *configBoard; ConfigMonopigator *configMonopigator; diff --git a/atlantik/client/event.cpp b/atlantik/client/event.cpp index 218f6b87..a37c1847 100644 --- a/atlantik/client/event.cpp +++ b/atlantik/client/event.cpp @@ -14,29 +14,29 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qdatetime.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqstring.h> #include "event.moc" -Event::Event(const QDateTime &dateTime, const QString &description, const QString &icon) +Event::Event(const TQDateTime &dateTime, const TQString &description, const TQString &icon) { m_dateTime = dateTime; m_description = description; m_icon = icon; } -QDateTime Event::dateTime() const +TQDateTime Event::dateTime() const { return m_dateTime; } -QString Event::description() const +TQString Event::description() const { return m_description; } -QString Event::icon() const +TQString Event::icon() const { return m_icon; } diff --git a/atlantik/client/event.h b/atlantik/client/event.h index f2f56444..0acbd387 100644 --- a/atlantik/client/event.h +++ b/atlantik/client/event.h @@ -17,7 +17,7 @@ #ifndef ATLANTIK_EVENT_H #define ATLANTIK_EVENT_H -#include <qobject.h> +#include <tqobject.h> class QDateTime; class QString; @@ -27,14 +27,14 @@ class Event : public QObject Q_OBJECT public: - Event(const QDateTime &dateTime, const QString &description, const QString &icon = QString::null); - QDateTime dateTime() const; - QString description() const; - QString icon() const; + Event(const TQDateTime &dateTime, const TQString &description, const TQString &icon = TQString::null); + TQDateTime dateTime() const; + TQString description() const; + TQString icon() const; private: - QDateTime m_dateTime; - QString m_description, m_icon; + TQDateTime m_dateTime; + TQString m_description, m_icon; }; #endif diff --git a/atlantik/client/eventlogwidget.cpp b/atlantik/client/eventlogwidget.cpp index b0f77ab8..6bc81b04 100644 --- a/atlantik/client/eventlogwidget.cpp +++ b/atlantik/client/eventlogwidget.cpp @@ -16,9 +16,9 @@ #include <iostream> -#include <qheader.h> -#include <qlayout.h> -#include <qdatetime.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqdatetime.h> #include <klocale.h> #include <klistview.h> @@ -35,30 +35,30 @@ EventLog::EventLog() { } -void EventLog::addEvent(const QString &description, const QString &icon) +void EventLog::addEvent(const TQString &description, const TQString &icon) { - Event *event = new Event(QDateTime::currentDateTime(), description, icon); + Event *event = new Event(TQDateTime::currentDateTime(), description, icon); m_events.append(event); emit newEvent(event); } -QPtrList<Event> EventLog::events() +TQPtrList<Event> EventLog::events() { return m_events; } -EventLogWidget::EventLogWidget(EventLog *eventLog, QWidget *parent, const char *name) - : QWidget(parent, name, +EventLogWidget::EventLogWidget(EventLog *eventLog, TQWidget *parent, const char *name) + : TQWidget(parent, name, WType_Dialog | WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_Minimize | WStyle_ContextHelp ) { m_eventLog = eventLog; - connect(m_eventLog, SIGNAL(newEvent(Event *)), this, SLOT(addEvent(Event *))); + connect(m_eventLog, TQT_SIGNAL(newEvent(Event *)), this, TQT_SLOT(addEvent(Event *))); setCaption(i18n("Event Log")); - QVBoxLayout *listCompBox = new QVBoxLayout(this, KDialog::marginHint()); + TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint()); m_eventList = new KListView(this, "eventList"); listCompBox->addWidget(m_eventList); @@ -67,19 +67,19 @@ EventLogWidget::EventLogWidget(EventLog *eventLog, QWidget *parent, const char * m_eventList->addColumn(i18n("Description")); m_eventList->header()->setClickEnabled( false ); - QHBoxLayout *actionBox = new QHBoxLayout(this, 0, KDialog::spacingHint()); + TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint()); listCompBox->addItem(actionBox); - actionBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + actionBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); m_saveButton = new KPushButton(BarIcon("filesave", KIcon::SizeSmall), i18n("&Save As..."), this); actionBox->addWidget(m_saveButton); - connect(m_saveButton, SIGNAL(clicked()), this, SLOT(save())); + connect(m_saveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(save())); // Populate - QPtrList<Event> events = m_eventLog->events(); - for (QPtrListIterator<Event> it( events ); (*it) ; ++it) + TQPtrList<Event> events = m_eventLog->events(); + for (TQPtrListIterator<Event> it( events ); (*it) ; ++it) addEvent( (*it) ); } @@ -91,32 +91,32 @@ void EventLogWidget::addEvent(Event *event) if ( m_eventList->childCount() >= 25 ) delete m_eventList->firstChild(); - QString description = KStringHandler::rsqueeze( event->description(), 200 ); + TQString description = KStringHandler::rsqueeze( event->description(), 200 ); KListViewItem *item = new KListViewItem(m_eventList, event->dateTime().toString("yyyy-MM-dd hh:mm:ss zzz"), description); if (event->icon().isEmpty()) - item->setPixmap(1, QPixmap(SmallIcon("atlantik"))); + item->setPixmap(1, TQPixmap(SmallIcon("atlantik"))); else - item->setPixmap(1, QPixmap(SmallIcon(event->icon()))); + item->setPixmap(1, TQPixmap(SmallIcon(event->icon()))); m_eventList->ensureItemVisible(item); } -void EventLogWidget::closeEvent(QCloseEvent *e) +void EventLogWidget::closeEvent(TQCloseEvent *e) { e->accept(); } void EventLogWidget::save() { - QFile file( KFileDialog::getSaveFileName() ); + TQFile file( KFileDialog::getSaveFileName() ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream(&file); + TQTextStream stream(&file); - stream << i18n( "Atlantik log file, saved at %1." ).arg( QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl; + stream << i18n( "Atlantik log file, saved at %1." ).arg( TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl; - QPtrList<Event> events = m_eventLog->events(); - for (QPtrListIterator<Event> it( events ); (*it) ; ++it) + TQPtrList<Event> events = m_eventLog->events(); + for (TQPtrListIterator<Event> it( events ); (*it) ; ++it) stream << (*it)->dateTime().toString("yyyy-MM-dd hh:mm:ss") << " " << (*it)->description() << endl; file.close(); } diff --git a/atlantik/client/eventlogwidget.h b/atlantik/client/eventlogwidget.h index 4b925d47..439a8127 100644 --- a/atlantik/client/eventlogwidget.h +++ b/atlantik/client/eventlogwidget.h @@ -17,8 +17,8 @@ #ifndef ATLANTIK_EVENTLOGWIDGET_H #define ATLANTIK_EVENTLOGWIDGET_H -#include <qwidget.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqmap.h> class QString; @@ -34,16 +34,16 @@ Q_OBJECT public: EventLog(); - QPtrList<Event> events(); + TQPtrList<Event> events(); public slots: - void addEvent(const QString &description, const QString &icon = QString::null); + void addEvent(const TQString &description, const TQString &icon = TQString::null); signals: void newEvent(Event *event); private: - QPtrList<Event> m_events; + TQPtrList<Event> m_events; }; class EventLogWidget : public QWidget @@ -53,13 +53,13 @@ Q_OBJECT public: enum EventLogType { Default, Net_In, Net_Out }; - EventLogWidget(EventLog *eventLog, QWidget *parent=0, const char *name = 0); + EventLogWidget(EventLog *eventLog, TQWidget *parent=0, const char *name = 0); public slots: void addEvent(Event *event); protected: - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); private slots: void save(); diff --git a/atlantik/client/monopigator.cpp b/atlantik/client/monopigator.cpp index 83ef0d42..7e0a834d 100644 --- a/atlantik/client/monopigator.cpp +++ b/atlantik/client/monopigator.cpp @@ -14,9 +14,9 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qdom.h> -#include <qptrlist.h> -#include <qregexp.h> +#include <tqdom.h> +#include <tqptrlist.h> +#include <tqregexp.h> #include <kextendedsocket.h> @@ -41,25 +41,25 @@ Monopigator::~Monopigator() void Monopigator::loadData(const KURL &url) { delete m_downloadData; - m_downloadData = new QBuffer(); + m_downloadData = new TQBuffer(); m_downloadData->open(IO_WriteOnly); m_downloadData->reset(); m_job = KIO::get(url, true, false); - m_job->addMetaData(QString::fromLatin1("UserAgent"), QString::fromLatin1("Atlantik/" ATLANTIK_VERSION_STRING)); + m_job->addMetaData(TQString::fromLatin1("UserAgent"), TQString::fromLatin1("Atlantik/" ATLANTIK_VERSION_STRING)); if (!m_timer) { - m_timer = new QTimer(this); + m_timer = new TQTimer(this); m_timer->start(10000, true); } - connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(m_job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); - connect(m_timer, SIGNAL(timeout()), SLOT(slotTimeout())); + connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(m_job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); } -void Monopigator::slotData(KIO::Job *, const QByteArray &data) +void Monopigator::slotData(KIO::Job *, const TQByteArray &data) { m_timer->stop(); m_downloadData->writeBlock(data.data(), data.size()); @@ -80,26 +80,26 @@ void Monopigator::slotTimeout() emit timeout(); } -void Monopigator::processData(const QByteArray &data, bool okSoFar) +void Monopigator::processData(const TQByteArray &data, bool okSoFar) { if (okSoFar) { - QString xmlData(data); - QDomDocument domDoc; + TQString xmlData(data); + TQDomDocument domDoc; if (domDoc.setContent(xmlData)) { - QDomElement eTop = domDoc.documentElement(); + TQDomElement eTop = domDoc.documentElement(); if (eTop.tagName() != "monopigator") return; - QDomNode n = eTop.firstChild(); + TQDomNode n = eTop.firstChild(); while(!n.isNull()) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if(!e.isNull()) { if (e.tagName() == "server") - emit monopigatorAdd(e.attributeNode(QString("ip")).value(), e.attributeNode(QString("host")).value(), e.attributeNode(QString("port")).value(), e.attributeNode(QString("version")).value(), e.attributeNode(QString("users")).value().toInt()); + emit monopigatorAdd(e.attributeNode(TQString("ip")).value(), e.attributeNode(TQString("host")).value(), e.attributeNode(TQString("port")).value(), e.attributeNode(TQString("version")).value(), e.attributeNode(TQString("users")).value().toInt()); } n = n.nextSibling(); } @@ -108,9 +108,9 @@ void Monopigator::processData(const QByteArray &data, bool okSoFar) } } -MonopigatorEntry::MonopigatorEntry(QListView *parent, QString host, QString latency, QString version, QString users, QString port, QString ip) : QObject(), QListViewItem(parent, host, latency, version, users, port) +MonopigatorEntry::MonopigatorEntry(TQListView *parent, TQString host, TQString latency, TQString version, TQString users, TQString port, TQString ip) : TQObject(), TQListViewItem(parent, host, latency, version, users, port) { - m_isDev = ( version.find( QRegExp("(CVS|-dev)") ) != -1 ) ? true : false; + m_isDev = ( version.find( TQRegExp("(CVS|-dev)") ) != -1 ) ? true : false; setEnabled(false); parent->sort(); @@ -118,8 +118,8 @@ MonopigatorEntry::MonopigatorEntry(QListView *parent, QString host, QString late if ( !ip.isEmpty() ) host = ip; m_latencySocket = new KExtendedSocket( host, port.toInt(), KExtendedSocket::inputBufferedSocket | KExtendedSocket::noResolve ); - connect(m_latencySocket, SIGNAL(lookupFinished(int)), this, SLOT(resolved())); - connect(m_latencySocket, SIGNAL(connectionSuccess()), this, SLOT(connected())); + connect(m_latencySocket, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(resolved())); + connect(m_latencySocket, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(connected())); m_latencySocket->startAsyncConnect(); } @@ -130,13 +130,13 @@ void MonopigatorEntry::resolved() void MonopigatorEntry::connected() { - setText( 1, QString::number(time.elapsed()) ); + setText( 1, TQString::number(time.elapsed()) ); setEnabled(true); listView()->sort(); delete m_latencySocket; } -int MonopigatorEntry::compare(QListViewItem *i, int col, bool ascending) const +int MonopigatorEntry::compare(TQListViewItem *i, int col, bool ascending) const { // Colums 1 and 3 are integers (latency and users) if (col == 1 || col == 3) diff --git a/atlantik/client/monopigator.h b/atlantik/client/monopigator.h index 1fd57b1b..b5542fe9 100644 --- a/atlantik/client/monopigator.h +++ b/atlantik/client/monopigator.h @@ -17,10 +17,10 @@ #ifndef ATLANTIK_MONOPIGATOR_H #define ATLANTIK_MONOPIGATOR_H -#include <qobject.h> -#include <qbuffer.h> -#include <qlistview.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqbuffer.h> +#include <tqlistview.h> +#include <tqtimer.h> #include <kio/job.h> #include <kurl.h> @@ -38,30 +38,30 @@ public: void loadData(const KURL &); signals: - void monopigatorAdd(QString ip, QString host, QString port, QString version, int users); + void monopigatorAdd(TQString ip, TQString host, TQString port, TQString version, int users); void finished(); void timeout(); private slots: - void slotData(KIO::Job *, const QByteArray &); + void slotData(KIO::Job *, const TQByteArray &); void slotResult(KIO::Job *); void slotTimeout(); private: - void processData(const QByteArray &, bool = true); + void processData(const TQByteArray &, bool = true); - QBuffer *m_downloadData; - QTimer *m_timer; + TQBuffer *m_downloadData; + TQTimer *m_timer; KIO::Job *m_job; }; -class MonopigatorEntry : public QObject, public QListViewItem +class MonopigatorEntry : public TQObject, public QListViewItem { Q_OBJECT public: - MonopigatorEntry(QListView *parent, QString host, QString latency, QString version, QString users, QString port, QString ip); - int compare(QListViewItem *i, int col, bool ascending) const; + MonopigatorEntry(TQListView *parent, TQString host, TQString latency, TQString version, TQString users, TQString port, TQString ip); + int compare(TQListViewItem *i, int col, bool ascending) const; bool isDev() const; private slots: @@ -71,8 +71,8 @@ private slots: private: KExtendedSocket *m_latencySocket; - QTime time; - QListView *m_parent; + TQTime time; + TQListView *m_parent; bool m_isDev; }; diff --git a/atlantik/client/selectconfiguration_widget.cpp b/atlantik/client/selectconfiguration_widget.cpp index 0e7d5cdb..b40bdd4f 100644 --- a/atlantik/client/selectconfiguration_widget.cpp +++ b/atlantik/client/selectconfiguration_widget.cpp @@ -16,8 +16,8 @@ #include <iostream> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include <kdebug.h> #include <kdialog.h> @@ -33,47 +33,47 @@ #include "selectconfiguration_widget.moc" -SelectConfiguration::SelectConfiguration(AtlanticCore *atlanticCore, QWidget *parent, const char *name) : QWidget(parent, name) +SelectConfiguration::SelectConfiguration(AtlanticCore *atlanticCore, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = atlanticCore; m_game = 0; - m_mainLayout = new QVBoxLayout(this, KDialog::marginHint()); + m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint()); Q_CHECK_PTR(m_mainLayout); // Game configuration. - m_configBox = new QVGroupBox(i18n("Game Configuration"), this, "configBox"); + m_configBox = new TQVGroupBox(i18n("Game Configuration"), this, "configBox"); m_mainLayout->addWidget(m_configBox); // Player buttons. - QHBoxLayout *playerButtons = new QHBoxLayout(m_mainLayout, KDialog::spacingHint()); + TQHBoxLayout *playerButtons = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint()); playerButtons->setMargin(0); - playerButtons->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + playerButtons->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); // Vertical spacer. - m_mainLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding)); + m_mainLayout->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); // Server buttons. - QHBoxLayout *serverButtons = new QHBoxLayout(m_mainLayout, KDialog::spacingHint()); + TQHBoxLayout *serverButtons = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint()); serverButtons->setMargin(0); m_backButton = new KPushButton(SmallIcon("back"), i18n("Leave Game"), this); serverButtons->addWidget(m_backButton); - connect(m_backButton, SIGNAL(clicked()), this, SIGNAL(leaveGame())); + connect(m_backButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(leaveGame())); - serverButtons->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + serverButtons->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); m_startButton = new KPushButton(SmallIconSet("forward"), i18n("Start Game"), this); serverButtons->addWidget(m_startButton); m_startButton->setEnabled(false); - connect(m_startButton, SIGNAL(clicked()), this, SIGNAL(startGame())); + connect(m_startButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(startGame())); Player *playerSelf = m_atlanticCore->playerSelf(); playerChanged(playerSelf); - connect(playerSelf, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); + connect(playerSelf, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); emit statusMessage(i18n("Retrieving configuration list...")); } @@ -86,22 +86,22 @@ void SelectConfiguration::initGame() void SelectConfiguration::addConfigOption(ConfigOption *configOption) { // FIXME: only bool types supported! - QCheckBox *checkBox = new QCheckBox(configOption->description(), m_configBox, "checkbox"); - m_configMap[(QObject *)checkBox] = configOption; + TQCheckBox *checkBox = new TQCheckBox(configOption->description(), m_configBox, "checkbox"); + m_configMap[(TQObject *)checkBox] = configOption; m_configBoxMap[configOption] = checkBox; checkBox->setChecked( configOption->value().toInt() ); checkBox->setEnabled( configOption->edit() && m_atlanticCore->selfIsMaster() ); checkBox->show(); - connect(checkBox, SIGNAL(clicked()), this, SLOT(changeOption())); - connect(configOption, SIGNAL(changed(ConfigOption *)), this, SLOT(optionChanged(ConfigOption *))); + connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeOption())); + connect(configOption, TQT_SIGNAL(changed(ConfigOption *)), this, TQT_SLOT(optionChanged(ConfigOption *))); } -void SelectConfiguration::gameOption(QString title, QString type, QString value, QString edit, QString command) +void SelectConfiguration::gameOption(TQString title, TQString type, TQString value, TQString edit, TQString command) { // Find if option exists in GUI yet - if (QCheckBox *checkBox = dynamic_cast<QCheckBox *>(m_checkBoxMap[command])) + if (TQCheckBox *checkBox = dynamic_cast<TQCheckBox *>(m_checkBoxMap[command])) { checkBox->setChecked(value.toInt()); checkBox->setEnabled(edit.toInt()); @@ -111,14 +111,14 @@ void SelectConfiguration::gameOption(QString title, QString type, QString value, // Create option if (type == "bool") { - QCheckBox *checkBox = new QCheckBox(title, m_configBox, "checkbox"); - m_optionCommandMap[(QObject *)checkBox] = command; + TQCheckBox *checkBox = new TQCheckBox(title, m_configBox, "checkbox"); + m_optionCommandMap[(TQObject *)checkBox] = command; m_checkBoxMap[command] = checkBox; checkBox->setChecked(value.toInt()); checkBox->setEnabled(edit.toInt()); checkBox->show(); - connect(checkBox, SIGNAL(clicked()), this, SLOT(optionChanged())); + connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(optionChanged())); } // TODO: create options other than type=bool @@ -127,17 +127,17 @@ void SelectConfiguration::gameOption(QString title, QString type, QString value, void SelectConfiguration::changeOption() { - ConfigOption *configOption = m_configMap[(QObject *)QObject::sender()]; + ConfigOption *configOption = m_configMap[(TQObject *)TQObject::sender()]; if (configOption) { - kdDebug() << "checked " << ((QCheckBox *)QObject::sender())->isChecked() << endl; - emit changeOption( configOption->id(), QString::number( ((QCheckBox *)QObject::sender())->isChecked() ) ); + kdDebug() << "checked " << ((TQCheckBox *)TQObject::sender())->isChecked() << endl; + emit changeOption( configOption->id(), TQString::number( ((TQCheckBox *)TQObject::sender())->isChecked() ) ); } } void SelectConfiguration::optionChanged(ConfigOption *configOption) { - QCheckBox *checkBox = m_configBoxMap[configOption]; + TQCheckBox *checkBox = m_configBoxMap[configOption]; if (checkBox) { checkBox->setText( configOption->description() ); @@ -148,11 +148,11 @@ void SelectConfiguration::optionChanged(ConfigOption *configOption) void SelectConfiguration::optionChanged() { - QString command = m_optionCommandMap[(QObject *)QObject::sender()]; + TQString command = m_optionCommandMap[(TQObject *)TQObject::sender()]; - if (QCheckBox *checkBox = m_checkBoxMap[command]) + if (TQCheckBox *checkBox = m_checkBoxMap[command]) { - command.append(QString::number(checkBox->isChecked())); + command.append(TQString::number(checkBox->isChecked())); emit buttonCommand(command); } } @@ -171,12 +171,12 @@ void SelectConfiguration::playerChanged(Player *player) kdDebug() << "playerChanged::change" << endl; if (m_game) - disconnect(m_game, SIGNAL(changed(Game *)), this, SLOT(gameChanged(Game *))); + disconnect(m_game, TQT_SIGNAL(changed(Game *)), this, TQT_SLOT(gameChanged(Game *))); m_game = player->game(); if (m_game) - connect(m_game, SIGNAL(changed(Game *)), this, SLOT(gameChanged(Game *))); + connect(m_game, TQT_SIGNAL(changed(Game *)), this, TQT_SLOT(gameChanged(Game *))); } } @@ -184,6 +184,6 @@ void SelectConfiguration::gameChanged(Game *game) { m_startButton->setEnabled( game->master() == m_atlanticCore->playerSelf() ); - for (QMapIterator<ConfigOption *, QCheckBox *> it = m_configBoxMap.begin() ; it != m_configBoxMap.end() ; ++it) + for (TQMapIterator<ConfigOption *, TQCheckBox *> it = m_configBoxMap.begin() ; it != m_configBoxMap.end() ; ++it) (*it)->setEnabled( it.key()->edit() && m_atlanticCore->selfIsMaster() ); } diff --git a/atlantik/client/selectconfiguration_widget.h b/atlantik/client/selectconfiguration_widget.h index 033a0eb0..1bc8c241 100644 --- a/atlantik/client/selectconfiguration_widget.h +++ b/atlantik/client/selectconfiguration_widget.h @@ -17,9 +17,9 @@ #ifndef ATLANTIK_SELECTCONFIGURATION_WIDGET_H #define ATLANTIK_SELECTCONFIGURATION_WIDGET_H -#include <qwidget.h> -#include <qlayout.h> -#include <qvgroupbox.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqvgroupbox.h> #include <klistview.h> #include <kpushbutton.h> @@ -37,16 +37,16 @@ class SelectConfiguration : public QWidget Q_OBJECT public: - SelectConfiguration(AtlanticCore *atlanticCore, QWidget *parent, const char *name=0); + SelectConfiguration(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=0); void setCanStart(const bool &canStart); - QString hostToConnect() const; + TQString hostToConnect() const; int portToConnect(); private slots: void addConfigOption(ConfigOption *configOption); void changeOption(); - void gameOption(QString title, QString type, QString value, QString edit, QString command); + void gameOption(TQString title, TQString type, TQString value, TQString edit, TQString command); void optionChanged(ConfigOption *configOption); void optionChanged(); void slotEndUpdate(); @@ -59,20 +59,20 @@ signals: void leaveGame(); void joinConfiguration(int configurationId); void newConfiguration(); - void changeOption(int configId, const QString &value); - void buttonCommand(QString); - void iconSelected(const QString &); - void statusMessage(const QString &message); + void changeOption(int configId, const TQString &value); + void buttonCommand(TQString); + void iconSelected(const TQString &); + void statusMessage(const TQString &message); private: - QVBoxLayout *m_mainLayout; - QVGroupBox *m_configBox, *m_messageBox; + TQVBoxLayout *m_mainLayout; + TQVGroupBox *m_configBox, *m_messageBox; KPushButton *m_backButton, *m_startButton; - QMap <QObject *, QString> m_optionCommandMap; - QMap <QObject *, ConfigOption *> m_configMap; - QMap <ConfigOption *, QCheckBox *> m_configBoxMap; - QMap <QString, QCheckBox *> m_checkBoxMap; - QMap <Player *, QListViewItem *> m_items; + TQMap <TQObject *, TQString> m_optionCommandMap; + TQMap <TQObject *, ConfigOption *> m_configMap; + TQMap <ConfigOption *, TQCheckBox *> m_configBoxMap; + TQMap <TQString, TQCheckBox *> m_checkBoxMap; + TQMap <Player *, TQListViewItem *> m_items; Game *m_game; AtlanticCore *m_atlanticCore; }; diff --git a/atlantik/client/selectgame_widget.cpp b/atlantik/client/selectgame_widget.cpp index 85d4f886..8f39ff08 100644 --- a/atlantik/client/selectgame_widget.cpp +++ b/atlantik/client/selectgame_widget.cpp @@ -14,8 +14,8 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qvgroupbox.h> -#include <qradiobutton.h> +#include <tqvgroupbox.h> +#include <tqradiobutton.h> #include <kdebug.h> #include <kdialog.h> @@ -29,18 +29,18 @@ #include "selectgame_widget.h" -SelectGame::SelectGame(AtlanticCore *atlanticCore, QWidget *parent, const char *name) : QWidget(parent, name) +SelectGame::SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = atlanticCore; - connect(m_atlanticCore, SIGNAL(createGUI(Game *)), this, SLOT(addGame(Game *))); - connect(m_atlanticCore, SIGNAL(removeGUI(Game *)), this, SLOT(delGame(Game *))); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(Game *)), this, TQT_SLOT(addGame(Game *))); + connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Game *)), this, TQT_SLOT(delGame(Game *))); - m_mainLayout = new QVBoxLayout(this, KDialog::marginHint()); + m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint()); Q_CHECK_PTR(m_mainLayout); - QVGroupBox *groupBox; - groupBox = new QVGroupBox(i18n("Create or Select monopd Game"), this, "groupBox"); + TQVGroupBox *groupBox; + groupBox = new TQVGroupBox(i18n("Create or Select monopd Game"), this, "groupBox"); m_mainLayout->addWidget(groupBox); // List of games @@ -52,47 +52,47 @@ SelectGame::SelectGame(AtlanticCore *atlanticCore, QWidget *parent, const char * m_gameList->setAllColumnsShowFocus(true); // m_mainLayout->addWidget(m_gameList); - connect(m_gameList, SIGNAL(clicked(QListViewItem *)), this, SLOT(validateConnectButton())); - connect(m_gameList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(connectClicked())); - connect(m_gameList, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), this, SLOT(validateConnectButton())); - connect(m_gameList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(validateConnectButton())); + connect(m_gameList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(validateConnectButton())); + connect(m_gameList, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(connectClicked())); + connect(m_gameList, TQT_SIGNAL(rightButtonClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(validateConnectButton())); + connect(m_gameList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(validateConnectButton())); - QHBoxLayout *buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint()); + TQHBoxLayout *buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint()); KPushButton *backButton = new KPushButton(SmallIcon("back"), i18n("Server List"), this); buttonBox->addWidget(backButton); - connect(backButton, SIGNAL(clicked()), this, SIGNAL(leaveServer())); + connect(backButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(leaveServer())); - buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); m_connectButton = new KPushButton(SmallIconSet("forward"), i18n("Create Game"), this); m_connectButton->setEnabled(false); buttonBox->addWidget(m_connectButton); - connect(m_connectButton, SIGNAL(clicked()), this, SLOT(connectClicked())); + connect(m_connectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(connectClicked())); } void SelectGame::addGame(Game *game) { - connect(game, SIGNAL(changed(Game *)), this, SLOT(updateGame(Game *))); + connect(game, TQT_SIGNAL(changed(Game *)), this, TQT_SLOT(updateGame(Game *))); if (game->id() == -1) { - QListViewItem *item = new QListViewItem( m_gameList, i18n("Create a new %1 Game").arg(game->name()), game->description(), QString::null, QString::null, game->type() ); - item->setPixmap(0, QPixmap(SmallIcon("filenew"))); + TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Create a new %1 Game").arg(game->name()), game->description(), TQString::null, TQString::null, game->type() ); + item->setPixmap(0, TQPixmap(SmallIcon("filenew"))); } else { Player *master = game->master(); - QListViewItem *item = new QListViewItem( m_gameList, i18n("Join %1's %2 Game").arg( (master ? master->name() : QString::null), game->name() ), game->description(), QString::number(game->id()), QString::number(game->players()), game->type() ); - item->setPixmap( 0, QPixmap(SmallIcon("atlantik")) ); + TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString::null), game->name() ), game->description(), TQString::number(game->id()), TQString::number(game->players()), game->type() ); + item->setPixmap( 0, TQPixmap(SmallIcon("atlantik")) ); item->setEnabled(game->canBeJoined()); KNotifyClient::event(winId(), "newgame"); - connect(master, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); + connect(master, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); } // validateConnectButton(); @@ -100,7 +100,7 @@ void SelectGame::addGame(Game *game) void SelectGame::delGame(Game *game) { - QListViewItem *item = findItem(game); + TQListViewItem *item = findItem(game); if (!item) return; @@ -111,7 +111,7 @@ void SelectGame::delGame(Game *game) void SelectGame::updateGame(Game *game) { - QListViewItem *item = findItem(game); + TQListViewItem *item = findItem(game); if (!item) return; @@ -122,11 +122,11 @@ void SelectGame::updateGame(Game *game) else { Player *master = game->master(); - item->setText( 0, i18n("Join %1's %2 Game").arg( (master ? master->name() : QString::null), game->name() ) ); - item->setText( 3, QString::number( game->players() ) ); + item->setText( 0, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString::null), game->name() ) ); + item->setText( 3, TQString::number( game->players() ) ); item->setEnabled( game->canBeJoined() ); - connect(master, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); + connect(master, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); } m_gameList->triggerUpdate(); @@ -135,7 +135,7 @@ void SelectGame::updateGame(Game *game) void SelectGame::playerChanged(Player *player) { - QListViewItem *item = m_gameList->firstChild(); + TQListViewItem *item = m_gameList->firstChild(); Game *game = 0; while (item) @@ -150,12 +150,12 @@ void SelectGame::playerChanged(Player *player) } } -QListViewItem *SelectGame::findItem(Game *game) +TQListViewItem *SelectGame::findItem(Game *game) { - QListViewItem *item = m_gameList->firstChild(); + TQListViewItem *item = m_gameList->firstChild(); while (item) { - if ( (game->id() == -1 || item->text(2) == QString::number(game->id())) && item->text(4) == game->type() ) + if ( (game->id() == -1 || item->text(2) == TQString::number(game->id())) && item->text(4) == game->type() ) return item; item = item->nextSibling(); @@ -165,7 +165,7 @@ QListViewItem *SelectGame::findItem(Game *game) void SelectGame::validateConnectButton() { - if (QListViewItem *item = m_gameList->selectedItem()) + if (TQListViewItem *item = m_gameList->selectedItem()) { if (item->text(2).toInt() > 0) m_connectButton->setText(i18n("Join Game")); @@ -180,7 +180,7 @@ void SelectGame::validateConnectButton() void SelectGame::connectClicked() { - if (QListViewItem *item = m_gameList->selectedItem()) + if (TQListViewItem *item = m_gameList->selectedItem()) { if (int gameId = item->text(2).toInt()) emit joinGame(gameId); diff --git a/atlantik/client/selectgame_widget.h b/atlantik/client/selectgame_widget.h index d47e905e..f6d28f43 100644 --- a/atlantik/client/selectgame_widget.h +++ b/atlantik/client/selectgame_widget.h @@ -17,8 +17,8 @@ #ifndef ATLANTIK_SELECTGAME_WIDGET_H #define ATLANTIK_SELECTGAME_WIDGET_H -#include <qwidget.h> -#include <qlayout.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <klistview.h> #include <kpushbutton.h> @@ -32,11 +32,11 @@ class SelectGame : public QWidget Q_OBJECT public: - SelectGame(AtlanticCore *atlanticCore, QWidget *parent, const char *name=0); + SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=0); void initPage(); bool validateNext(); - QString hostToConnect() const; + TQString hostToConnect() const; int portToConnect(); private slots: @@ -49,15 +49,15 @@ private slots: signals: void joinGame(int gameId); - void newGame(const QString &gameType); + void newGame(const TQString &gameType); void leaveServer(); - void msgStatus(const QString &status); + void msgStatus(const TQString &status); private: - QListViewItem *findItem(Game *game); + TQListViewItem *findItem(Game *game); AtlanticCore *m_atlanticCore; - QVBoxLayout *m_mainLayout; + TQVBoxLayout *m_mainLayout; KListView *m_gameList; KPushButton *m_connectButton; }; diff --git a/atlantik/client/selectserver_widget.cpp b/atlantik/client/selectserver_widget.cpp index 39c07b50..97a594c4 100644 --- a/atlantik/client/selectserver_widget.cpp +++ b/atlantik/client/selectserver_widget.cpp @@ -14,12 +14,12 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qsizepolicy.h> -#include <qvbuttongroup.h> -#include <qhgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqsizepolicy.h> +#include <tqvbuttongroup.h> +#include <tqhgroupbox.h> #include <kdialog.h> #include <kextendedsocket.h> @@ -28,32 +28,32 @@ #include "selectserver_widget.moc" -SelectServer::SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, QWidget *parent, const char *name) : QWidget(parent, name) +SelectServer::SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_hideDevelopmentServers = hideDevelopmentServers; - m_mainLayout = new QVBoxLayout(this, KDialog::marginHint()); + m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint()); Q_CHECK_PTR(m_mainLayout); // Custom server group - QHGroupBox *customGroup = new QHGroupBox(i18n("Enter Custom monopd Server"), this, "customGroup"); + TQHGroupBox *customGroup = new TQHGroupBox(i18n("Enter Custom monopd Server"), this, "customGroup"); m_mainLayout->addWidget(customGroup); - QLabel *hostLabel = new QLabel(i18n("Hostname:"), customGroup); + TQLabel *hostLabel = new TQLabel(i18n("Hostname:"), customGroup); m_hostEdit = new KLineEdit(customGroup); - m_hostEdit->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum)); + m_hostEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum)); - QLabel *portLabel = new QLabel(i18n("Port:"), customGroup); + TQLabel *portLabel = new TQLabel(i18n("Port:"), customGroup); - m_portEdit = new KLineEdit(QString::number(1234), customGroup); - m_portEdit->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum)); + m_portEdit = new KLineEdit(TQString::number(1234), customGroup); + m_portEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum)); KPushButton *connectButton = new KPushButton( KGuiItem(i18n("Connect"), "network"), customGroup); - connect(connectButton, SIGNAL(clicked()), this, SLOT(customConnect())); + connect(connectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(customConnect())); // Server list group - QVButtonGroup *bgroup = new QVButtonGroup(i18n("Select monopd Server"), this, "bgroup"); + TQVButtonGroup *bgroup = new TQVButtonGroup(i18n("Select monopd Server"), this, "bgroup"); bgroup->setExclusive(true); m_mainLayout->addWidget(bgroup); @@ -67,33 +67,33 @@ SelectServer::SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServe m_serverList->setSorting(1); // m_mainLayout->addWidget(m_serverList); - connect(m_serverList, SIGNAL(clicked(QListViewItem *)), this, SLOT(validateConnectButton())); - connect(m_serverList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotConnect())); - connect(m_serverList, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), this, SLOT(validateConnectButton())); - connect(m_serverList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(validateConnectButton())); + connect(m_serverList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(validateConnectButton())); + connect(m_serverList, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotConnect())); + connect(m_serverList, TQT_SIGNAL(rightButtonClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(validateConnectButton())); + connect(m_serverList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(validateConnectButton())); - QHBoxLayout *buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint()); - buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + TQHBoxLayout *buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint()); + buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); // Server List / Refresh m_refreshButton = new KPushButton( KGuiItem(useMonopigatorOnStart ? i18n("Reload Server List") : i18n("Get Server List"), useMonopigatorOnStart ? "reload" : "network"), this); buttonBox->addWidget(m_refreshButton); - connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefresh())); + connect(m_refreshButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRefresh())); // Connect m_connectButton = new KPushButton(BarIconSet("forward", KIcon::SizeSmall), i18n("Connect"), this); m_connectButton->setEnabled(false); buttonBox->addWidget(m_connectButton); - connect(m_connectButton, SIGNAL(clicked()), this, SLOT(slotConnect())); + connect(m_connectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConnect())); // Monopigator m_monopigator = new Monopigator(); - connect(m_monopigator, SIGNAL(monopigatorAdd(QString, QString, QString, QString, int)), this, SLOT(slotMonopigatorAdd(QString, QString, QString, QString, int))); - connect(m_monopigator, SIGNAL(finished()), SLOT(monopigatorFinished())); - connect(m_monopigator, SIGNAL(timeout()), SLOT(monopigatorTimeout())); + connect(m_monopigator, TQT_SIGNAL(monopigatorAdd(TQString, TQString, TQString, TQString, int)), this, TQT_SLOT(slotMonopigatorAdd(TQString, TQString, TQString, TQString, int))); + connect(m_monopigator, TQT_SIGNAL(finished()), TQT_SLOT(monopigatorFinished())); + connect(m_monopigator, TQT_SIGNAL(timeout()), TQT_SLOT(monopigatorTimeout())); } SelectServer::~SelectServer() @@ -119,15 +119,15 @@ void SelectServer::initMonopigator() m_monopigator->loadData(KURL( "http://monopd-gator.kde.org/")); } -void SelectServer::slotMonopigatorAdd(QString ip, QString host, QString port, QString version, int users) +void SelectServer::slotMonopigatorAdd(TQString ip, TQString host, TQString port, TQString version, int users) { - MonopigatorEntry *item = new MonopigatorEntry(m_serverList, host, QString::number(9999), version, (users == -1) ? i18n("unknown") : QString::number(users), port, ip); + MonopigatorEntry *item = new MonopigatorEntry(m_serverList, host, TQString::number(9999), version, (users == -1) ? i18n("unknown") : TQString::number(users), port, ip); item->setPixmap(0, BarIcon("atlantik", KIcon::SizeSmall)); if ( item->isDev() ) { item->setVisible( !m_hideDevelopmentServers ); - connect(this, SIGNAL(showDevelopmentServers(bool)), item, SLOT(showDevelopmentServers(bool))); + connect(this, TQT_SIGNAL(showDevelopmentServers(bool)), item, TQT_SLOT(showDevelopmentServers(bool))); } validateConnectButton(); @@ -167,7 +167,7 @@ void SelectServer::slotRefresh(bool useMonopigator) void SelectServer::slotConnect() { - if (QListViewItem *item = m_serverList->selectedItem()) + if (TQListViewItem *item = m_serverList->selectedItem()) emit serverConnect(item->text(0), item->text(4).toInt()); } diff --git a/atlantik/client/selectserver_widget.h b/atlantik/client/selectserver_widget.h index c5d1b586..471bc8d2 100644 --- a/atlantik/client/selectserver_widget.h +++ b/atlantik/client/selectserver_widget.h @@ -17,9 +17,9 @@ #ifndef ATLANTIK_SELECTSERVER_WIDGET_H #define ATLANTIK_SELECTSERVER_WIDGET_H -#include <qwidget.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <klineedit.h> #include <klistview.h> @@ -34,19 +34,19 @@ class SelectServer : public QWidget Q_OBJECT public: - SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, QWidget *parent, const char *name=0); + SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, TQWidget *parent, const char *name=0); virtual ~SelectServer(); void initPage(); void setHideDevelopmentServers(bool hideDevelopmentServers); bool validateNext(); - QString hostToConnect() const; + TQString hostToConnect() const; int portToConnect(); public slots: void validateConnectButton(); void slotRefresh(bool useMonopigator = true); - void slotMonopigatorAdd(QString ip, QString host, QString port, QString version, int users); + void slotMonopigatorAdd(TQString ip, TQString host, TQString port, TQString version, int users); private slots: void slotConnect(); @@ -55,14 +55,14 @@ private slots: void monopigatorTimeout(); signals: - void serverConnect(const QString host, int port); - void msgStatus(const QString &message); + void serverConnect(const TQString host, int port); + void msgStatus(const TQString &message); void showDevelopmentServers(bool show); private: void initMonopigator(); - QVBoxLayout *m_mainLayout; + TQVBoxLayout *m_mainLayout; KListView *m_serverList; KLineEdit *m_hostEdit, *m_portEdit; KPushButton *m_addServerButton, *m_refreshButton, *m_customConnect, *m_connectButton; diff --git a/atlantik/kio_atlantik/kio_atlantik.cpp b/atlantik/kio_atlantik/kio_atlantik.cpp index 3707d41b..de74a1e0 100644 --- a/atlantik/kio_atlantik/kio_atlantik.cpp +++ b/atlantik/kio_atlantik/kio_atlantik.cpp @@ -16,7 +16,7 @@ #include <stdlib.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <kdeversion.h> #undef KDE_3_1_FEATURES @@ -49,13 +49,13 @@ void AtlantikProtocol::get( const KURL& url ) *proc << "atlantik"; #ifdef KDE_3_1_FEATURES - QString host = url.hasHost() ? url.host() : KProcess::quote( url.queryItem("host") ); + TQString host = url.hasHost() ? url.host() : KProcess::quote( url.queryItem("host") ); #else - QString host = url.hasHost() ? url.host() : url.queryItem("host"); + TQString host = url.hasHost() ? url.host() : url.queryItem("host"); #endif - QString port = QString::number( url.port() ? url.port() : 1234 ); + TQString port = TQString::number( url.port() ? url.port() : 1234 ); int game = url.queryItem("game").toInt(); - QString gameString = game ? QString::number( game ) : QString::null; + TQString gameString = game ? TQString::number( game ) : TQString::null; if (!host.isNull() && !port.isNull()) { diff --git a/atlantik/kio_atlantik/kio_atlantik.h b/atlantik/kio_atlantik/kio_atlantik.h index ac794ca9..de1804e8 100644 --- a/atlantik/kio_atlantik/kio_atlantik.h +++ b/atlantik/kio_atlantik/kio_atlantik.h @@ -17,6 +17,6 @@ class AtlantikProtocol : public KIO::SlaveBase { public: - AtlantikProtocol( const QCString &pool, const QCString &app) : SlaveBase( "atlantik", pool, app ) {} + AtlantikProtocol( const TQCString &pool, const TQCString &app) : SlaveBase( "atlantik", pool, app ) {} virtual void get( const KURL& url ); }; 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<Trade> it(m_trades); (trade = *it) ; ++it) + for (TQPtrListIterator<Trade> 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<Player> it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator<Player> 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<Game> it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator<Game> it(m_games); (game = *it) ; ++it) { emit removeGUI(game); game->deleteLater(); @@ -98,7 +98,7 @@ Player *AtlanticCore::playerSelf() return m_playerSelf; } -QPtrList<Player> AtlanticCore::players() +TQPtrList<Player> 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<Player> it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator<Player> it(m_players); (player = *it) ; ++it) if (player->id() == playerId) return player; @@ -136,12 +136,12 @@ void AtlanticCore::removePlayer(Player *player) player->deleteLater(); } -QPtrList<Game> AtlanticCore::games() +TQPtrList<Game> 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<Game> it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator<Game> 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<Game> it(m_games); (game = *it) ; ++it) + for (TQPtrListIterator<Game> 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<Game> it(m_games); (*it) ; ++it) + for (TQPtrListIterator<Game> it(m_games); (*it) ; ++it) emit createGUI( (*it) ); } -QPtrList<Estate> AtlanticCore::estates() +TQPtrList<Estate> AtlanticCore::estates() { return m_estates; } @@ -210,7 +210,7 @@ Estate *AtlanticCore::newEstate(int estateId) Estate *AtlanticCore::findEstate(int estateId) { Estate *estate = 0; - for (QPtrListIterator<Estate> it(m_estates); (estate = *it) ; ++it) + for (TQPtrListIterator<Estate> 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<Estate> it(m_estates); (eTmp = *it) ; ++it) + for (TQPtrListIterator<Estate> it(m_estates); (eTmp = *it) ; ++it) { if (!eFirst) eFirst = eTmp; @@ -233,7 +233,7 @@ Estate *AtlanticCore::estateAfter(Estate *estate) return eFirst; } -QPtrList<EstateGroup> AtlanticCore::estateGroups() +TQPtrList<EstateGroup> AtlanticCore::estateGroups() { return m_estateGroups; } @@ -248,14 +248,14 @@ EstateGroup *AtlanticCore::newEstateGroup(int groupId) EstateGroup *AtlanticCore::findEstateGroup(int groupId) { EstateGroup *estateGroup = 0; - for (QPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it) + for (TQPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it) if (estateGroup->id() == groupId) return estateGroup; return 0; } -QPtrList<Trade> AtlanticCore::trades() +TQPtrList<Trade> AtlanticCore::trades() { return m_trades; } @@ -273,7 +273,7 @@ Trade *AtlanticCore::newTrade(int tradeId) Trade *AtlanticCore::findTrade(int tradeId) { Trade *trade = 0; - for (QPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it) + for (TQPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it) if (trade->tradeId() == tradeId) return trade; @@ -287,7 +287,7 @@ void AtlanticCore::removeTrade(Trade *trade) trade->deleteLater(); } -QPtrList<Auction> AtlanticCore::auctions() +TQPtrList<Auction> AtlanticCore::auctions() { return m_auctions; } @@ -325,7 +325,7 @@ void AtlanticCore::removeConfigOption(ConfigOption *configOption) ConfigOption *AtlanticCore::findConfigOption(int configId) { ConfigOption *configOption = 0; - for (QPtrListIterator<ConfigOption> it(m_configOptions); (configOption = *it) ; ++it) + for (TQPtrListIterator<ConfigOption> 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<Player> it(m_players); (player = *it) ; ++it) + for (TQPtrListIterator<Player> 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<Game> 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<Game> 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<Estate> it(m_estates); (estate = *it) ; ++it) + for (TQPtrListIterator<Estate> it(m_estates); (estate = *it) ; ++it) std::cout << " E: " << estate->name().latin1() << std::endl; EstateGroup *estateGroup = 0; - for (QPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it) + for (TQPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it) std::cout << "EG: " << estateGroup->name().latin1() << std::endl; Auction *auction = 0; - for (QPtrListIterator<Auction> it(m_auctions); (auction = *it) ; ++it) - std::cout << " A: " << QString::number(auction->auctionId()).latin1() << std::endl; + for (TQPtrListIterator<Auction> it(m_auctions); (auction = *it) ; ++it) + std::cout << " A: " << TQString::number(auction->auctionId()).latin1() << std::endl; Trade *trade = 0; - for (QPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it) - std::cout << " T: " << QString::number(trade->tradeId()).latin1() << std::endl; + for (TQPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it) + std::cout << " T: " << TQString::number(trade->tradeId()).latin1() << std::endl; ConfigOption *configOption = 0; - for (QPtrListIterator<ConfigOption> it(m_configOptions); (configOption = *it) ; ++it) - std::cout << "CO:" << QString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << " " << configOption->value().latin1() << std::endl; + for (TQPtrListIterator<ConfigOption> 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" diff --git a/atlantik/libatlantic/atlantic_core.h b/atlantik/libatlantic/atlantic_core.h index bca5b783..197fca91 100644 --- a/atlantik/libatlantic/atlantic_core.h +++ b/atlantik/libatlantic/atlantic_core.h @@ -17,8 +17,8 @@ #ifndef LIBATLANTIC_CORE_H #define LIBATLANTIC_CORE_H -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "libatlantic_export.h" @@ -35,7 +35,7 @@ class LIBATLANTIC_EXPORT AtlanticCore : public QObject Q_OBJECT public: - AtlanticCore(QObject *parent, const char *name); + AtlanticCore(TQObject *parent, const char *name); void reset(bool deletePermanents = false); @@ -44,34 +44,34 @@ public: void setPlayerSelf(Player *player); Player *playerSelf(); - QPtrList<Player> players(); + TQPtrList<Player> players(); Player *newPlayer(int playerId, const bool &playerSelf = false); Player *findPlayer(int playerId); void removePlayer(Player *player); - QPtrList<Game> games(); - Game *newGame(int gameId, const QString &type = QString::null); - Game *findGame(const QString &type); // finds game types + TQPtrList<Game> games(); + Game *newGame(int gameId, const TQString &type = TQString::null); + Game *findGame(const TQString &type); // finds game types Game *findGame(int gameId); // finds actual games Game *gameSelf(); void removeGame(Game *game); void emitGames(); - QPtrList<Estate> estates(); + TQPtrList<Estate> estates(); Estate *newEstate(int estateId); Estate *findEstate(int estateId); Estate *estateAfter(Estate *estate); - QPtrList<EstateGroup> estateGroups(); + TQPtrList<EstateGroup> estateGroups(); EstateGroup *newEstateGroup(int groupId); EstateGroup *findEstateGroup(int groupId); - QPtrList<Trade> trades(); + TQPtrList<Trade> trades(); Trade *newTrade(int tradeId); Trade *findTrade(int tradeId); void removeTrade(Trade *trade); - QPtrList<Auction> auctions(); + TQPtrList<Auction> auctions(); Auction *newAuction(int auctionId, Estate *estate); void delAuction(Auction *auction); @@ -93,13 +93,13 @@ signals: private: Player *m_playerSelf; - QPtrList<Player> m_players; - QPtrList<Game> m_games; - QPtrList<Estate> m_estates; - QPtrList<EstateGroup> m_estateGroups; - QPtrList<Trade> m_trades; - QPtrList<Auction> m_auctions; - QPtrList<ConfigOption> m_configOptions; + TQPtrList<Player> m_players; + TQPtrList<Game> m_games; + TQPtrList<Estate> m_estates; + TQPtrList<EstateGroup> m_estateGroups; + TQPtrList<Trade> m_trades; + TQPtrList<Auction> m_auctions; + TQPtrList<ConfigOption> m_configOptions; }; #endif diff --git a/atlantik/libatlantic/auction.cpp b/atlantik/libatlantic/auction.cpp index 70734c4e..2e09a685 100644 --- a/atlantik/libatlantic/auction.cpp +++ b/atlantik/libatlantic/auction.cpp @@ -19,7 +19,7 @@ #include "player.h" #include "estate.h" -Auction::Auction(int auctionId, Estate *estate) : QObject() +Auction::Auction(int auctionId, Estate *estate) : TQObject() { m_auctionId = auctionId; m_estate = estate; diff --git a/atlantik/libatlantic/auction.h b/atlantik/libatlantic/auction.h index cc44cce5..80633bc8 100644 --- a/atlantik/libatlantic/auction.h +++ b/atlantik/libatlantic/auction.h @@ -17,7 +17,7 @@ #ifndef LIBATLANTIC_AUCTION_H #define LIBATLANTIC_AUCTION_H -#include <qobject.h> +#include <tqobject.h> #include "libatlantic_export.h" diff --git a/atlantik/libatlantic/configoption.cpp b/atlantik/libatlantic/configoption.cpp index 00a8eb12..1d1dcc62 100644 --- a/atlantik/libatlantic/configoption.cpp +++ b/atlantik/libatlantic/configoption.cpp @@ -16,7 +16,7 @@ #include "configoption.h" -ConfigOption::ConfigOption(int configId) : QObject() +ConfigOption::ConfigOption(int configId) : TQObject() { m_id = configId; m_name = ""; @@ -31,7 +31,7 @@ int ConfigOption::id() return m_id; } -void ConfigOption::setName(const QString &name) +void ConfigOption::setName(const TQString &name) { if (m_name != name) { @@ -40,12 +40,12 @@ void ConfigOption::setName(const QString &name) } } -QString ConfigOption::name() const +TQString ConfigOption::name() const { return m_name; } -void ConfigOption::setDescription(const QString &description) +void ConfigOption::setDescription(const TQString &description) { if (m_description != description) { @@ -54,7 +54,7 @@ void ConfigOption::setDescription(const QString &description) } } -QString ConfigOption::description() const +TQString ConfigOption::description() const { return m_description; } @@ -73,7 +73,7 @@ bool ConfigOption::edit() return m_edit; } -void ConfigOption::setValue(const QString &value) +void ConfigOption::setValue(const TQString &value) { if (m_value != value) { @@ -82,7 +82,7 @@ void ConfigOption::setValue(const QString &value) } } -QString ConfigOption::value() const +TQString ConfigOption::value() const { return m_value; } diff --git a/atlantik/libatlantic/configoption.h b/atlantik/libatlantic/configoption.h index a29d6b45..823938c8 100644 --- a/atlantik/libatlantic/configoption.h +++ b/atlantik/libatlantic/configoption.h @@ -17,8 +17,8 @@ #ifndef LIBATLANTIC_CONFIGOPTION_H #define LIBATLANTIC_CONFIGOPTION_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include "libatlantic_export.h" @@ -29,14 +29,14 @@ Q_OBJECT public: ConfigOption(int configId); int id(); - void setName(const QString &name); - QString name() const; - void setDescription(const QString &description); - QString description() const; + void setName(const TQString &name); + TQString name() const; + void setDescription(const TQString &description); + TQString description() const; void setEdit(bool edit); bool edit(); - void setValue(const QString &value); - QString value() const; + void setValue(const TQString &value); + TQString value() const; void update(bool force = false); signals: @@ -45,7 +45,7 @@ signals: private: int m_id; bool m_changed, m_edit; - QString m_name, m_description, m_value; + TQString m_name, m_description, m_value; }; #endif diff --git a/atlantik/libatlantic/estate.cpp b/atlantik/libatlantic/estate.cpp index eef69280..c9b40e73 100644 --- a/atlantik/libatlantic/estate.cpp +++ b/atlantik/libatlantic/estate.cpp @@ -20,18 +20,18 @@ #include "estate.moc" #include "player.h" -Estate::Estate(int estateId) : QObject() +Estate::Estate(int estateId) : TQObject() { m_id = estateId; - m_name = QString::null; + m_name = TQString::null; m_owner = 0; m_houses = 0; m_price = 0; m_money = 0; m_estateGroup = 0; m_changed = m_canBeOwned = m_canBuyHouses = m_canSellHouses = m_isMortgaged = m_canToggleMortgage = false; - m_bgColor = QColor(); - m_color = QColor(); + m_bgColor = TQColor(); + m_color = TQColor(); } void Estate::setEstateGroup(EstateGroup *estateGroup) @@ -71,7 +71,7 @@ void Estate::setHouses(unsigned int houses) m_changed = true; } -void Estate::setName(QString name) +void Estate::setName(TQString name) { if (m_name != name) { @@ -80,12 +80,12 @@ void Estate::setName(QString name) } } -QString Estate::name() const +TQString Estate::name() const { return m_name; } -void Estate::setColor(QColor color) +void Estate::setColor(TQColor color) { if (m_color != color) { @@ -94,7 +94,7 @@ void Estate::setColor(QColor color) } } -void Estate::setBgColor(QColor color) +void Estate::setBgColor(TQColor color) { if (m_bgColor != color) { diff --git a/atlantik/libatlantic/estate.h b/atlantik/libatlantic/estate.h index b6b768a5..cbbd51e1 100644 --- a/atlantik/libatlantic/estate.h +++ b/atlantik/libatlantic/estate.h @@ -17,8 +17,8 @@ #ifndef LIBATLANTIC_ESTATE_H #define LIBATLANTIC_ESTATE_H -#include <qobject.h> -#include <qcolor.h> +#include <tqobject.h> +#include <tqcolor.h> #include "libatlantic_export.h" @@ -32,8 +32,8 @@ Q_OBJECT public: Estate(int estateId); int id() { return m_id; } - void setName(QString name); - QString name() const; + void setName(TQString name); + TQString name() const; void setEstateGroup(EstateGroup *estateGroup); EstateGroup *estateGroup() { return m_estateGroup; } void setOwner(Player *player); @@ -60,10 +60,10 @@ public: unsigned int mortgagePrice() const { return m_mortgagePrice; } void setUnmortgagePrice(const unsigned int unmortgagePrice) { m_unmortgagePrice = unmortgagePrice; } unsigned int unmortgagePrice() const { return m_unmortgagePrice; } - void setColor(QColor color); - QColor color() const { return m_color; } - void setBgColor(QColor color); - QColor bgColor() const { return m_bgColor; } + void setColor(TQColor color); + TQColor color() const { return m_color; } + void setBgColor(TQColor color); + TQColor bgColor() const { return m_bgColor; } void setPrice(const unsigned int price) { m_price = price; } unsigned int price() const { return m_price; } void setMoney(int money); @@ -83,13 +83,13 @@ protected: int m_id; private: - QString m_name; + TQString m_name; Player *m_owner; EstateGroup *m_estateGroup; unsigned int m_houses, m_price, m_housePrice, m_houseSellPrice, m_mortgagePrice, m_unmortgagePrice; int m_money; bool m_canBeOwned, m_canBuyHouses, m_canSellHouses, m_isMortgaged, m_canToggleMortgage; - QColor m_bgColor, m_color; + TQColor m_bgColor, m_color; }; #endif diff --git a/atlantik/libatlantic/estategroup.cpp b/atlantik/libatlantic/estategroup.cpp index e0148afc..ef96b988 100644 --- a/atlantik/libatlantic/estategroup.cpp +++ b/atlantik/libatlantic/estategroup.cpp @@ -17,12 +17,12 @@ #include "estategroup.h" #include "estategroup.moc" -EstateGroup::EstateGroup(const int id) : QObject() +EstateGroup::EstateGroup(const int id) : TQObject() { m_id = id; } -void EstateGroup::setName(const QString name) +void EstateGroup::setName(const TQString name) { if (m_name != name) { diff --git a/atlantik/libatlantic/estategroup.h b/atlantik/libatlantic/estategroup.h index 3e08a9ce..9e0399bc 100644 --- a/atlantik/libatlantic/estategroup.h +++ b/atlantik/libatlantic/estategroup.h @@ -17,7 +17,7 @@ #ifndef LIBATLANTIC_ESTATEGROUP_H #define LIBATLANTIC_ESTATEGROUP_H -#include <qobject.h> +#include <tqobject.h> #include "libatlantic_export.h" @@ -28,8 +28,8 @@ Q_OBJECT public: EstateGroup(const int id); int id() { return m_id; } - void setName(const QString name); - QString name() const { return m_name; } + void setName(const TQString name); + TQString name() const { return m_name; } void update(bool force = false); signals: @@ -38,7 +38,7 @@ signals: private: int m_id; bool m_changed; - QString m_name; + TQString m_name; }; #endif diff --git a/atlantik/libatlantic/game.cpp b/atlantik/libatlantic/game.cpp index 1f4eb244..308a827d 100644 --- a/atlantik/libatlantic/game.cpp +++ b/atlantik/libatlantic/game.cpp @@ -14,15 +14,15 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qstring.h> +#include <tqstring.h> #include "game.h" -Game::Game(int gameId) : QObject() +Game::Game(int gameId) : TQObject() { m_id = gameId; - m_description = QString::null; - m_type = QString::null; + m_description = TQString::null; + m_type = TQString::null; m_players = 0; m_master = 0; @@ -48,7 +48,7 @@ bool Game::canBeJoined() const return m_canBeJoined; } -void Game::setDescription(const QString &description) +void Game::setDescription(const TQString &description) { if (m_description != description) { @@ -57,12 +57,12 @@ void Game::setDescription(const QString &description) } } -QString Game::description() const +TQString Game::description() const { return m_description; } -void Game::setName(const QString &name) +void Game::setName(const TQString &name) { if (m_name != name) { @@ -71,12 +71,12 @@ void Game::setName(const QString &name) } } -QString Game::name() const +TQString Game::name() const { return m_name; } -void Game::setType(const QString &type) +void Game::setType(const TQString &type) { if (m_type != type) { @@ -85,7 +85,7 @@ void Game::setType(const QString &type) } } -QString Game::type() const +TQString Game::type() const { return m_type; } diff --git a/atlantik/libatlantic/game.h b/atlantik/libatlantic/game.h index 8eaa85f6..7194dfd3 100644 --- a/atlantik/libatlantic/game.h +++ b/atlantik/libatlantic/game.h @@ -17,7 +17,7 @@ #ifndef LIBATLANTIC_GAME_H #define LIBATLANTIC_GAME_H -#include <qobject.h> +#include <tqobject.h> #include "libatlantic_export.h" @@ -35,12 +35,12 @@ public: int id() const; void setCanBeJoined(const bool &canBeJoined); bool canBeJoined() const; - void setDescription(const QString &description); - QString description() const; - void setName(const QString &name); - QString name() const; - void setType(const QString &type); - QString type() const; + void setDescription(const TQString &description); + TQString description() const; + void setName(const TQString &name); + TQString name() const; + void setType(const TQString &type); + TQString type() const; int players(); void setPlayers(int players); Player *master(); @@ -54,7 +54,7 @@ signals: private: bool m_changed; bool m_canBeJoined; - QString m_description, m_name, m_type; + TQString m_description, m_name, m_type; int m_id, m_players; Player *m_master; }; diff --git a/atlantik/libatlantic/player.cpp b/atlantik/libatlantic/player.cpp index ab5e9268..e944e970 100644 --- a/atlantik/libatlantic/player.cpp +++ b/atlantik/libatlantic/player.cpp @@ -18,7 +18,7 @@ #include "player.moc" #include "estate.h" -Player::Player(int playerId) : QObject() +Player::Player(int playerId) : TQObject() { m_id = playerId; m_game = 0; @@ -137,7 +137,7 @@ void Player::setInJail(const bool inJail) } } -void Player::setName(const QString _n) +void Player::setName(const TQString _n) { if (m_name != _n) { @@ -146,7 +146,7 @@ void Player::setName(const QString _n) } } -void Player::setHost(const QString &host) +void Player::setHost(const TQString &host) { if (m_host != host) { @@ -155,7 +155,7 @@ void Player::setHost(const QString &host) } } -void Player::setImage(const QString &image) +void Player::setImage(const TQString &image) { if (m_image != image) { diff --git a/atlantik/libatlantic/player.h b/atlantik/libatlantic/player.h index 571276ef..f36b1e8a 100644 --- a/atlantik/libatlantic/player.h +++ b/atlantik/libatlantic/player.h @@ -17,8 +17,8 @@ #ifndef LIBATLANTIC_PLAYER_H #define LIBATLANTIC_PLAYER_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include "libatlantic_export.h" @@ -57,12 +57,12 @@ public: bool canUseCard() const { return m_canUseCard; } void setInJail(const bool inJail); bool inJail() const { return m_inJail; } - void setName(const QString _n); - QString name() const { return m_name; } - void setHost(const QString &host); - QString host() const { return m_host; } - void setImage(const QString &image); - const QString image() const { return m_image; } + void setName(const TQString _n); + TQString name() const { return m_name; } + void setHost(const TQString &host); + TQString host() const { return m_host; } + void setImage(const TQString &image); + const TQString image() const { return m_image; } void setMoney(unsigned int _m); unsigned int money() const { return m_money; } void update(bool force = false); @@ -76,7 +76,7 @@ private: bool m_changed, m_isSelf; bool m_bankrupt, m_hasDebt, m_hasTurn, m_canRoll, m_canBuy, m_canAuction, m_canUseCard, m_inJail; unsigned int m_money; - QString m_name, m_host, m_image; + TQString m_name, m_host, m_image; Game *m_game; Estate *m_location, *m_destination; }; diff --git a/atlantik/libatlantic/trade.cpp b/atlantik/libatlantic/trade.cpp index b516dc70..7bd638c9 100644 --- a/atlantik/libatlantic/trade.cpp +++ b/atlantik/libatlantic/trade.cpp @@ -49,7 +49,7 @@ void Trade::removePlayer(Player *player) unsigned int Trade::count( bool acceptOnly ) { unsigned int count = 0; - for (QMapIterator<Player *, bool> it = m_playerAcceptMap.begin() ; it != m_playerAcceptMap.end() ; ++it) + for (TQMapIterator<Player *, bool> it = m_playerAcceptMap.begin() ; it != m_playerAcceptMap.end() ; ++it) if ( !acceptOnly || it.data() ) count++; return count; @@ -59,7 +59,7 @@ void Trade::updateEstate(Estate *estate, Player *to) { TradeEstate *t=0; - for (QPtrListIterator<TradeItem> i(mTradeItems); *i; ++i) + for (TQPtrListIterator<TradeItem> i(mTradeItems); *i; ++i) { t=dynamic_cast<TradeEstate*>(*i); @@ -100,7 +100,7 @@ void Trade::updateMoney(unsigned int money, Player *from, Player *to) { TradeMoney *t=0; - for (QPtrListIterator<TradeItem> i(mTradeItems); *i; ++i) + for (TQPtrListIterator<TradeItem> i(mTradeItems); *i; ++i) { t=dynamic_cast<TradeMoney*>(*i); @@ -163,8 +163,8 @@ void Trade::update(bool force) TradeItem::TradeItem(Trade *trade, Player *from, Player *to) : mFrom(from), mTo(to), mTrade(trade) { - connect(from, SIGNAL(changed(Player *)), this, SLOT(playerChanged())); - connect(to, SIGNAL(changed(Player *)), this, SLOT(playerChanged())); + connect(from, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged())); + connect(to, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged())); } void TradeItem::playerChanged() @@ -176,7 +176,7 @@ TradeEstate::TradeEstate(Estate *estate, Trade *trade, Player *to) : TradeItem(t { } -QString TradeEstate::text() const +TQString TradeEstate::text() const { return mEstate->name(); } @@ -194,7 +194,7 @@ void TradeMoney::setMoney(unsigned int money) } } -QString TradeMoney::text() const +TQString TradeMoney::text() const { - return QString("$%1").arg(m_money); + return TQString("$%1").arg(m_money); } diff --git a/atlantik/libatlantic/trade.h b/atlantik/libatlantic/trade.h index 5d8f3c01..0d168f0a 100644 --- a/atlantik/libatlantic/trade.h +++ b/atlantik/libatlantic/trade.h @@ -17,9 +17,9 @@ #ifndef LIBATLANTIC_TRADE_H #define LIBATLANTIC_TRADE_H -#include <qobject.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "libatlantic_export.h" #include "player.h" @@ -44,7 +44,7 @@ public: /** * how to visualize this **/ - virtual QString text() const=0; + virtual TQString text() const=0; signals: void changed(TradeItem *); @@ -66,7 +66,7 @@ public: Estate *estate() { return mEstate; } - virtual QString text() const; + virtual TQString text() const; signals: void updateEstate(Trade *trade, Estate *estate, Player *player); @@ -86,7 +86,7 @@ public: unsigned int money() const { return m_money; } void setMoney(unsigned int money); - virtual QString text() const; + virtual TQString text() const; signals: void changed(TradeItem *tradeItem); @@ -143,10 +143,10 @@ private: bool m_changed, m_rejected; int m_tradeId, m_revision; - QPtrList<Player> mPlayers; - QMap<Player *, bool> m_playerAcceptMap; + TQPtrList<Player> mPlayers; + TQMap<Player *, bool> m_playerAcceptMap; - QPtrList<TradeItem> mTradeItems; + TQPtrList<TradeItem> mTradeItems; }; #endif diff --git a/atlantik/libatlantikclient/atlantik_network.cpp b/atlantik/libatlantikclient/atlantik_network.cpp index 7b1926d3..51347f84 100644 --- a/atlantik/libatlantikclient/atlantik_network.cpp +++ b/atlantik/libatlantikclient/atlantik_network.cpp @@ -16,10 +16,10 @@ #include <iostream> -#include <qdom.h> -#include <qtextcodec.h> -#include <qtextstream.h> -#include <qtimer.h> +#include <tqdom.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -38,18 +38,18 @@ AtlantikNetwork::AtlantikNetwork(AtlanticCore *atlanticCore) : KExtendedSocket(0, 0, KExtendedSocket::inputBufferedSocket) { m_atlanticCore = atlanticCore; - m_textStream = new QTextStream(this); - m_textStream->setCodec(QTextCodec::codecForName("utf8")); + m_textStream = new TQTextStream(this); + m_textStream->setCodec(TQTextCodec::codecForName("utf8")); m_playerId = -1; m_serverVersion = ""; - QObject::connect(this, SIGNAL(readyRead()), this, SLOT(slotRead())); - QObject::connect(this, SIGNAL(lookupFinished(int)), - this, SLOT(slotLookupFinished(int))); - QObject::connect(this, SIGNAL(connectionSuccess()), - this, SLOT(slotConnectionSuccess())); - QObject::connect(this, SIGNAL(connectionFailed(int)), - this, SLOT(slotConnectionFailed(int))); + TQObject::connect(this, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotRead())); + TQObject::connect(this, TQT_SIGNAL(lookupFinished(int)), + this, TQT_SLOT(slotLookupFinished(int))); + TQObject::connect(this, TQT_SIGNAL(connectionSuccess()), + this, TQT_SLOT(slotConnectionSuccess())); + TQObject::connect(this, TQT_SIGNAL(connectionFailed(int)), + this, TQT_SLOT(slotConnectionFailed(int))); } AtlantikNetwork::~AtlantikNetwork(void) @@ -77,7 +77,7 @@ void AtlantikNetwork::startGame() writeData(".gs"); } -void AtlantikNetwork::reconnect(const QString &cookie) +void AtlantikNetwork::reconnect(const TQString &cookie) { writeData(".R" + cookie); } @@ -92,85 +92,85 @@ void AtlantikNetwork::endTurn() writeData(".E"); } -void AtlantikNetwork::setName(QString name) +void AtlantikNetwork::setName(TQString name) { // Almost deprecated, will be replaced by libmonopdprotocol - writeData(QString(".n%1").arg(name)); + writeData(TQString(".n%1").arg(name)); } void AtlantikNetwork::tokenConfirmation(Estate *estate) { - writeData(QString(".t%1").arg(estate ? estate->id() : -1)); + writeData(TQString(".t%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateToggleMortgage(Estate *estate) { - writeData(QString(".em%1").arg(estate ? estate->id() : -1)); + writeData(TQString(".em%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateHouseBuy(Estate *estate) { - writeData(QString(".hb%1").arg(estate ? estate->id() : -1)); + writeData(TQString(".hb%1").arg(estate ? estate->id() : -1)); } void AtlantikNetwork::estateHouseSell(Estate *estate) { - writeData(QString(".hs%1").arg(estate ? estate->id() : -1)); + writeData(TQString(".hs%1").arg(estate ? estate->id() : -1)); } -void AtlantikNetwork::newGame(const QString &gameType) +void AtlantikNetwork::newGame(const TQString &gameType) { - writeData(QString(".gn%1").arg(gameType)); + writeData(TQString(".gn%1").arg(gameType)); } void AtlantikNetwork::joinGame(int gameId) { - writeData(QString(".gj%1").arg(gameId)); + writeData(TQString(".gj%1").arg(gameId)); } -void AtlantikNetwork::cmdChat(QString msg) +void AtlantikNetwork::cmdChat(TQString msg) { writeData(msg); } void AtlantikNetwork::newTrade(Player *player) { - writeData(QString(".Tn%1").arg(player ? player->id() : -1)); + writeData(TQString(".Tn%1").arg(player ? player->id() : -1)); } void AtlantikNetwork::kickPlayer(Player *player) { - writeData(QString(".gk%1").arg(player ? player->id() : -1)); + writeData(TQString(".gk%1").arg(player ? player->id() : -1)); } void AtlantikNetwork::tradeUpdateEstate(Trade *trade, Estate *estate, Player *player) { - writeData(QString(".Te%1:%2:%3").arg(trade ? trade->tradeId() : -1).arg(estate ? estate->id() : -1).arg(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(QString(".Tm%1:%2:%3:%4").arg(trade ? trade->tradeId() : -1).arg(pFrom ? pFrom->id() : -1).arg(pTo ? pTo->id() : -1).arg(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(QString(".Tr%1").arg(trade ? trade->tradeId() : -1)); + writeData(TQString(".Tr%1").arg(trade ? trade->tradeId() : -1)); } void AtlantikNetwork::tradeAccept(Trade *trade) { - writeData(QString(".Ta%1:%2").arg(trade ? trade->tradeId() : -1).arg(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(QString(".ab%1:%2").arg(auction ? auction->auctionId() : -1).arg(amount)); + writeData(TQString(".ab%1:%2").arg(auction ? auction->auctionId() : -1).arg(amount)); } -void AtlantikNetwork::setImage(const QString &name) +void AtlantikNetwork::setImage(const TQString &name) { - writeData(QString(".pi%1").arg(name)); + writeData(TQString(".pi%1").arg(name)); } void AtlantikNetwork::jailPay() @@ -188,12 +188,12 @@ void AtlantikNetwork::jailCard() writeData(".jc"); } -void AtlantikNetwork::changeOption(int configId, const QString &value) +void AtlantikNetwork::changeOption(int configId, const TQString &value) { - writeData( QString(".gc%1:%2").arg(configId).arg(value) ); + writeData( TQString(".gc%1:%2").arg(configId).arg(value) ); } -void AtlantikNetwork::writeData(QString msg) +void AtlantikNetwork::writeData(TQString msg) { emit networkEvent(msg, "1rightarrow"); msg.append("\n"); @@ -212,7 +212,7 @@ void AtlantikNetwork::slotRead() { processMsg(m_textStream->readLine()); // There might be more data - QTimer::singleShot(0, this, SLOT(slotRead())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRead())); } else { @@ -223,36 +223,36 @@ void AtlantikNetwork::slotRead() } } -void AtlantikNetwork::processMsg(const QString &msg) +void AtlantikNetwork::processMsg(const TQString &msg) { emit networkEvent(msg, "1leftarrow"); - QDomDocument dom; + TQDomDocument dom; dom.setContent(msg); - QDomElement e = dom.documentElement(); + TQDomElement e = dom.documentElement(); if (e.tagName() != "monopd") { // Invalid data, request full update from server writeData(".f"); return; } - QDomNode n = e.firstChild(); + TQDomNode n = e.firstChild(); processNode(n); m_atlanticCore->printDebug(); } -void AtlantikNetwork::processNode(QDomNode n) +void AtlantikNetwork::processNode(TQDomNode n) { - QDomAttr a; + TQDomAttr a; for ( ; !n.isNull() ; n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if(!e.isNull()) { if (e.tagName() == "server") { - a = e.attributeNode( QString("version") ); + a = e.attributeNode( TQString("version") ); if ( !a.isNull() ) m_serverVersion = a.value(); @@ -260,37 +260,37 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "msg") { - a = e.attributeNode(QString("type")); + a = e.attributeNode(TQString("type")); if (!a.isNull()) { if (a.value() == "error") - emit msgError(e.attributeNode(QString("value")).value()); + emit msgError(e.attributeNode(TQString("value")).value()); else if (a.value() == "info") - emit msgInfo(e.attributeNode(QString("value")).value()); + emit msgInfo(e.attributeNode(TQString("value")).value()); else if (a.value() == "chat") - emit msgChat(e.attributeNode(QString("author")).value(), e.attributeNode(QString("value")).value()); + emit msgChat(e.attributeNode(TQString("author")).value(), e.attributeNode(TQString("value")).value()); } } else if (e.tagName() == "display") { int estateId = -1; - a = e.attributeNode(QString("estateid")); + a = e.attributeNode(TQString("estateid")); if (!a.isNull()) { estateId = a.value().toInt(); Estate *estate; estate = m_atlanticCore->findEstate(a.value().toInt()); - emit displayDetails(e.attributeNode(QString("text")).value(), e.attributeNode(QString("cleartext")).value().toInt(), e.attributeNode(QString("clearbuttons")).value().toInt(), estate); + emit displayDetails(e.attributeNode(TQString("text")).value(), e.attributeNode(TQString("cleartext")).value().toInt(), e.attributeNode(TQString("clearbuttons")).value().toInt(), estate); bool hasButtons = false; - for( QDomNode nButtons = n.firstChild() ; !nButtons.isNull() ; nButtons = nButtons.nextSibling() ) + for( TQDomNode nButtons = n.firstChild() ; !nButtons.isNull() ; nButtons = nButtons.nextSibling() ) { - QDomElement eButton = nButtons.toElement(); + TQDomElement eButton = nButtons.toElement(); if (!eButton.isNull() && eButton.tagName() == "button") { - emit addCommandButton(eButton.attributeNode(QString("command")).value(), eButton.attributeNode(QString("caption")).value(), eButton.attributeNode(QString("enabled")).value().toInt()); + emit addCommandButton(eButton.attributeNode(TQString("command")).value(), eButton.attributeNode(TQString("caption")).value(), eButton.attributeNode(TQString("enabled")).value().toInt()); hasButtons = true; } } @@ -301,18 +301,18 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "client") { - a = e.attributeNode(QString("playerid")); + a = e.attributeNode(TQString("playerid")); if (!a.isNull()) m_playerId = a.value().toInt(); - a = e.attributeNode(QString("cookie")); + a = e.attributeNode(TQString("cookie")); if (!a.isNull()) emit clientCookie(a.value()); } else if (e.tagName() == "configupdate") { int configId = -1; - a = e.attributeNode(QString("configid")); + a = e.attributeNode(TQString("configid")); if (!a.isNull()) { configId = a.value().toInt(); @@ -320,19 +320,19 @@ void AtlantikNetwork::processNode(QDomNode n) if (!(configOption = m_atlanticCore->findConfigOption(configId))) configOption = m_atlanticCore->newConfigOption( configId ); - a = e.attributeNode(QString("name")); + a = e.attributeNode(TQString("name")); if (configOption && !a.isNull()) configOption->setName(a.value()); - a = e.attributeNode(QString("description")); + a = e.attributeNode(TQString("description")); if (configOption && !a.isNull()) configOption->setDescription(a.value()); - a = e.attributeNode(QString("edit")); + a = e.attributeNode(TQString("edit")); if (configOption && !a.isNull()) configOption->setEdit(a.value().toInt()); - a = e.attributeNode(QString("value")); + a = e.attributeNode(TQString("value")); if (configOption && !a.isNull()) configOption->setValue(a.value()); @@ -341,22 +341,22 @@ void AtlantikNetwork::processNode(QDomNode n) } int gameId = -1; - a = e.attributeNode(QString("gameid")); + a = e.attributeNode(TQString("gameid")); if (!a.isNull()) { gameId = a.value().toInt(); - for( QDomNode nOptions = n.firstChild() ; !nOptions.isNull() ; nOptions = nOptions.nextSibling() ) + for( TQDomNode nOptions = n.firstChild() ; !nOptions.isNull() ; nOptions = nOptions.nextSibling() ) { - QDomElement eOption = nOptions.toElement(); + TQDomElement eOption = nOptions.toElement(); if (!eOption.isNull() && eOption.tagName() == "option") - emit gameOption(eOption.attributeNode(QString("title")).value(), eOption.attributeNode(QString("type")).value(), eOption.attributeNode(QString("value")).value(), eOption.attributeNode(QString("edit")).value(), eOption.attributeNode(QString("command")).value()); + emit gameOption(eOption.attributeNode(TQString("title")).value(), eOption.attributeNode(TQString("type")).value(), eOption.attributeNode(TQString("value")).value(), eOption.attributeNode(TQString("edit")).value(), eOption.attributeNode(TQString("command")).value()); } emit endConfigUpdate(); } } else if (e.tagName() == "deletegame") { - a = e.attributeNode(QString("gameid")); + a = e.attributeNode(TQString("gameid")); if (!a.isNull()) { int gameId = a.value().toInt(); @@ -370,45 +370,45 @@ void AtlantikNetwork::processNode(QDomNode n) { int gameId = -1; - a = e.attributeNode(QString("gameid")); + a = e.attributeNode(TQString("gameid")); if (!a.isNull()) { gameId = a.value().toInt(); Player *playerSelf = m_atlanticCore->playerSelf(); if ( playerSelf && playerSelf->game() ) - kdDebug() << "gameupdate for " << QString::number(gameId) << " with playerSelf in game " << QString::number(playerSelf->game()->id()) << endl; + kdDebug() << "gameupdate for " << TQString::number(gameId) << " with playerSelf in game " << TQString::number(playerSelf->game()->id()) << endl; else - kdDebug() << "gameupdate for " << QString::number(gameId) << endl; + kdDebug() << "gameupdate for " << TQString::number(gameId) << endl; Game *game = 0; if (gameId == -1) { - a = e.attributeNode(QString("gametype")); + a = e.attributeNode(TQString("gametype")); if ( !a.isNull() && !(game = m_atlanticCore->findGame(a.value())) ) game = m_atlanticCore->newGame(gameId, a.value()); } else if (!(game = m_atlanticCore->findGame(gameId))) game = m_atlanticCore->newGame(gameId); - a = e.attributeNode(QString("canbejoined")); + a = e.attributeNode(TQString("canbejoined")); if (game && !a.isNull()) game->setCanBeJoined(a.value().toInt()); - a = e.attributeNode(QString("description")); + a = e.attributeNode(TQString("description")); if (game && !a.isNull()) game->setDescription(a.value()); - a = e.attributeNode(QString("name")); + a = e.attributeNode(TQString("name")); if (game && !a.isNull()) game->setName(a.value()); - a = e.attributeNode(QString("players")); + a = e.attributeNode(TQString("players")); if (game && !a.isNull()) game->setPlayers(a.value().toInt()); - a = e.attributeNode(QString("master")); + a = e.attributeNode(TQString("master")); if (game && !a.isNull()) { // Ensure setMaster succeeds by creating player if necessary @@ -418,7 +418,7 @@ void AtlantikNetwork::processNode(QDomNode n) game->setMaster( player ); } - QString status = e.attributeNode(QString("status")).value(); + TQString status = e.attributeNode(TQString("status")).value(); if ( m_serverVersion.left(4) == "0.9." || (playerSelf && playerSelf->game() == game) ) { if (status == "config") @@ -437,7 +437,7 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "deleteplayer") { - a = e.attributeNode(QString("playerid")); + a = e.attributeNode(TQString("playerid")); if (!a.isNull()) { int playerId = a.value().toInt(); @@ -451,7 +451,7 @@ void AtlantikNetwork::processNode(QDomNode n) { int playerId = -1; - a = e.attributeNode(QString("playerid")); + a = e.attributeNode(TQString("playerid")); if (!a.isNull()) { playerId = a.value().toInt(); @@ -461,12 +461,12 @@ void AtlantikNetwork::processNode(QDomNode n) player = m_atlanticCore->newPlayer( playerId, (m_playerId == playerId) ); // Update player name - a = e.attributeNode(QString("name")); + a = e.attributeNode(TQString("name")); if (player && !a.isNull()) player->setName(a.value()); // Update player game - a = e.attributeNode(QString("game")); + a = e.attributeNode(TQString("game")); if (player && !a.isNull()) { int gameId = a.value().toInt(); @@ -483,54 +483,54 @@ void AtlantikNetwork::processNode(QDomNode n) } // Update player host - a = e.attributeNode(QString("host")); + a = e.attributeNode(TQString("host")); if (player && !a.isNull()) player->setHost(a.value()); // Update player image/token - a = e.attributeNode(QString("image")); + a = e.attributeNode(TQString("image")); if (player && !a.isNull()) player->setImage(a.value()); // Update player money - a = e.attributeNode(QString("money")); + a = e.attributeNode(TQString("money")); if (player && !a.isNull()) player->setMoney(a.value().toInt()); - a = e.attributeNode(QString("bankrupt")); + a = e.attributeNode(TQString("bankrupt")); if (player && !a.isNull()) player->setBankrupt(a.value().toInt()); - a = e.attributeNode(QString("hasdebt")); + a = e.attributeNode(TQString("hasdebt")); if (player && !a.isNull()) player->setHasDebt(a.value().toInt()); - a = e.attributeNode(QString("hasturn")); + a = e.attributeNode(TQString("hasturn")); if (player && !a.isNull()) player->setHasTurn(a.value().toInt()); // Update whether player can roll - a = e.attributeNode(QString("can_roll")); + a = e.attributeNode(TQString("can_roll")); if (player && !a.isNull()) player->setCanRoll(a.value().toInt()); // Update whether player can buy - a = e.attributeNode(QString("can_buyestate")); + a = e.attributeNode(TQString("can_buyestate")); if (player && !a.isNull()) player->setCanBuy(a.value().toInt()); // Update whether player can auction - a = e.attributeNode(QString("canauction")); + a = e.attributeNode(TQString("canauction")); if (player && !a.isNull()) player->setCanAuction(a.value().toInt()); // Update whether player can use a card - a = e.attributeNode(QString("canusecard")); + a = e.attributeNode(TQString("canusecard")); if (player && !a.isNull()) player->setCanUseCard(a.value().toInt()); // Update whether player is jailed - a = e.attributeNode(QString("jailed")); + a = e.attributeNode(TQString("jailed")); if (player && !a.isNull()) { player->setInJail(a.value().toInt()); @@ -538,7 +538,7 @@ void AtlantikNetwork::processNode(QDomNode n) } // Update player location - a = e.attributeNode(QString("location")); + a = e.attributeNode(TQString("location")); if (!a.isNull()) { m_playerLocationMap[player] = a.value().toInt(); @@ -547,7 +547,7 @@ void AtlantikNetwork::processNode(QDomNode n) Estate *estate = m_atlanticCore->findEstate(a.value().toInt()); - a = e.attributeNode(QString("directmove")); + a = e.attributeNode(TQString("directmove")); if (!a.isNull()) directMove = a.value().toInt(); @@ -566,7 +566,7 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "estategroupupdate") { - a = e.attributeNode(QString("groupid")); + a = e.attributeNode(TQString("groupid")); if (!a.isNull()) { int groupId = a.value().toInt(); @@ -581,7 +581,7 @@ void AtlantikNetwork::processNode(QDomNode n) b_newEstateGroup = true; } - a = e.attributeNode(QString("name")); + a = e.attributeNode(TQString("name")); if (estateGroup && !a.isNull()) estateGroup->setName(a.value()); @@ -599,7 +599,7 @@ void AtlantikNetwork::processNode(QDomNode n) { int estateId = -1; - a = e.attributeNode(QString("estateid")); + a = e.attributeNode(TQString("estateid")); if (!a.isNull()) { estateId = a.value().toInt(); @@ -614,45 +614,45 @@ void AtlantikNetwork::processNode(QDomNode n) estate = m_atlanticCore->newEstate(estateId); b_newEstate = true; - QObject::connect(estate, SIGNAL(estateToggleMortgage(Estate *)), this, SLOT(estateToggleMortgage(Estate *))); - QObject::connect(estate, SIGNAL(estateHouseBuy(Estate *)), this, SLOT(estateHouseBuy(Estate *))); - QObject::connect(estate, SIGNAL(estateHouseSell(Estate *)), this, SLOT(estateHouseSell(Estate *))); - QObject::connect(estate, SIGNAL(newTrade(Player *)), this, SLOT(newTrade(Player *))); + TQObject::connect(estate, TQT_SIGNAL(estateToggleMortgage(Estate *)), this, TQT_SLOT(estateToggleMortgage(Estate *))); + TQObject::connect(estate, TQT_SIGNAL(estateHouseBuy(Estate *)), this, TQT_SLOT(estateHouseBuy(Estate *))); + TQObject::connect(estate, TQT_SIGNAL(estateHouseSell(Estate *)), this, TQT_SLOT(estateHouseSell(Estate *))); + TQObject::connect(estate, TQT_SIGNAL(newTrade(Player *)), this, TQT_SLOT(newTrade(Player *))); // Players without estate should get one Player *player = 0; - QPtrList<Player> playerList = m_atlanticCore->players(); - for (QPtrListIterator<Player> it(playerList); (player = *it) ; ++it) + TQPtrList<Player> playerList = m_atlanticCore->players(); + for (TQPtrListIterator<Player> it(playerList); (player = *it) ; ++it) if (m_playerLocationMap[player] == estate->id()) player->setLocation(estate); } - a = e.attributeNode(QString("name")); + a = e.attributeNode(TQString("name")); if (estate && !a.isNull()) estate->setName(a.value()); - a = e.attributeNode(QString("color")); + a = e.attributeNode(TQString("color")); if (estate && !a.isNull() && !a.value().isEmpty()) estate->setColor(a.value()); - a = e.attributeNode(QString("bgcolor")); + a = e.attributeNode(TQString("bgcolor")); if (estate && !a.isNull()) estate->setBgColor(a.value()); - a = e.attributeNode(QString("owner")); + a = e.attributeNode(TQString("owner")); Player *player = m_atlanticCore->findPlayer(a.value().toInt()); if (estate && !a.isNull()) estate->setOwner(player); - a = e.attributeNode(QString("houses")); + a = e.attributeNode(TQString("houses")); if (estate && !a.isNull()) estate->setHouses(a.value().toInt()); - a = e.attributeNode(QString("mortgaged")); + a = e.attributeNode(TQString("mortgaged")); if (estate && !a.isNull()) estate->setIsMortgaged(a.value().toInt()); - a = e.attributeNode(QString("group")); + a = e.attributeNode(TQString("group")); if (!a.isNull()) { EstateGroup *estateGroup = m_atlanticCore->findEstateGroup(a.value().toInt()); @@ -660,43 +660,43 @@ void AtlantikNetwork::processNode(QDomNode n) estate->setEstateGroup(estateGroup); } - a = e.attributeNode(QString("can_toggle_mortgage")); + a = e.attributeNode(TQString("can_toggle_mortgage")); if (estate && !a.isNull()) estate->setCanToggleMortgage(a.value().toInt()); - a = e.attributeNode(QString("can_be_owned")); + a = e.attributeNode(TQString("can_be_owned")); if (estate && !a.isNull()) estate->setCanBeOwned(a.value().toInt()); - a = e.attributeNode(QString("can_buy_houses")); + a = e.attributeNode(TQString("can_buy_houses")); if (estate && !a.isNull()) estate->setCanBuyHouses(a.value().toInt()); - a = e.attributeNode(QString("can_sell_houses")); + a = e.attributeNode(TQString("can_sell_houses")); if (estate && !a.isNull()) estate->setCanSellHouses(a.value().toInt()); - a = e.attributeNode(QString("price")); + a = e.attributeNode(TQString("price")); if (estate && !a.isNull()) estate->setPrice(a.value().toInt()); - a = e.attributeNode(QString("houseprice")); + a = e.attributeNode(TQString("houseprice")); if (estate && !a.isNull()) estate->setHousePrice(a.value().toInt()); - a = e.attributeNode(QString("sellhouseprice")); + a = e.attributeNode(TQString("sellhouseprice")); if (estate && !a.isNull()) estate->setHouseSellPrice(a.value().toInt()); - a = e.attributeNode(QString("mortgageprice")); + a = e.attributeNode(TQString("mortgageprice")); if (estate && !a.isNull()) estate->setMortgagePrice(a.value().toInt()); - a = e.attributeNode(QString("unmortgageprice")); + a = e.attributeNode(TQString("unmortgageprice")); if (estate && !a.isNull()) estate->setUnmortgagePrice(a.value().toInt()); - a = e.attributeNode(QString("money")); + a = e.attributeNode(TQString("money")); if (estate && !a.isNull()) estate->setMoney(a.value().toInt()); @@ -712,7 +712,7 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "tradeupdate") { - a = e.attributeNode(QString("tradeid")); + a = e.attributeNode(TQString("tradeid")); if (!a.isNull()) { int tradeId = a.value().toInt(); @@ -723,35 +723,35 @@ void AtlantikNetwork::processNode(QDomNode n) // Create trade object trade = m_atlanticCore->newTrade(tradeId); - QObject::connect(trade, SIGNAL(updateEstate(Trade *, Estate *, Player *)), this, SLOT(tradeUpdateEstate(Trade *, Estate *, Player *))); - QObject::connect(trade, SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), this, SLOT(tradeUpdateMoney(Trade *, unsigned int, Player *, Player *))); - QObject::connect(trade, SIGNAL(reject(Trade *)), this, SLOT(tradeReject(Trade *))); - QObject::connect(trade, SIGNAL(accept(Trade *)), this, SLOT(tradeAccept(Trade *))); + TQObject::connect(trade, TQT_SIGNAL(updateEstate(Trade *, Estate *, Player *)), this, TQT_SLOT(tradeUpdateEstate(Trade *, Estate *, Player *))); + TQObject::connect(trade, TQT_SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), this, TQT_SLOT(tradeUpdateMoney(Trade *, unsigned int, Player *, Player *))); + TQObject::connect(trade, TQT_SIGNAL(reject(Trade *)), this, TQT_SLOT(tradeReject(Trade *))); + TQObject::connect(trade, TQT_SIGNAL(accept(Trade *)), this, TQT_SLOT(tradeAccept(Trade *))); } - a = e.attributeNode(QString("revision")); + a = e.attributeNode(TQString("revision")); if (trade && !a.isNull()) trade->setRevision(a.value().toInt()); - QString type = e.attributeNode(QString("type")).value(); + TQString type = e.attributeNode(TQString("type")).value(); if (type=="new") { // TODO: trade->setActor - // Player *player = m_atlanticCore->findPlayer(e.attributeNode(QString("actor")).value().toInt()); + // Player *player = m_atlanticCore->findPlayer(e.attributeNode(TQString("actor")).value().toInt()); // if (trade && player) // trade->setActor(player); - QDomNode n_player = n.firstChild(); + TQDomNode n_player = n.firstChild(); while(!n_player.isNull()) { - QDomElement e_player = n_player.toElement(); + TQDomElement e_player = n_player.toElement(); if (!e_player.isNull() && e_player.tagName() == "tradeplayer") { - Player *player = m_atlanticCore->findPlayer(e_player.attributeNode(QString("playerid")).value().toInt()); + Player *player = m_atlanticCore->findPlayer(e_player.attributeNode(TQString("playerid")).value().toInt()); if (trade && player) { trade->addPlayer(player); - QObject::connect(m_atlanticCore, SIGNAL(removePlayer(Player *)), trade, SLOT(removePlayer(Player *))); + TQObject::connect(m_atlanticCore, TQT_SIGNAL(removePlayer(Player *)), trade, TQT_SLOT(removePlayer(Player *))); } } n_player = n_player.nextSibling(); @@ -766,7 +766,7 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (type=="rejected") { - Player *player = m_atlanticCore->findPlayer(e.attributeNode(QString("actor")).value().toInt()); + Player *player = m_atlanticCore->findPlayer(e.attributeNode(TQString("actor")).value().toInt()); if (trade) trade->reject(player); if ( player && player == m_atlanticCore->playerSelf() ) @@ -779,31 +779,31 @@ void AtlantikNetwork::processNode(QDomNode n) { // No type specified, edit is implied. - QDomNode n_child = n.firstChild(); + TQDomNode n_child = n.firstChild(); while(!n_child.isNull()) { - QDomElement e_child = n_child.toElement(); + TQDomElement e_child = n_child.toElement(); if (!e_child.isNull()) { if (e_child.tagName() == "tradeplayer") { - a = e_child.attributeNode(QString("playerid")); + a = e_child.attributeNode(TQString("playerid")); if (!a.isNull()) { Player *player = m_atlanticCore->findPlayer(a.value().toInt()); - a = e_child.attributeNode(QString("accept")); + a = e_child.attributeNode(TQString("accept")); if (trade && player && !a.isNull()) trade->updateAccept(player, (bool)(a.value().toInt())); } } else if (e_child.tagName() == "tradeestate") { - a = e_child.attributeNode(QString("estateid")); + a = e_child.attributeNode(TQString("estateid")); if (!a.isNull()) { Estate *estate = m_atlanticCore->findEstate(a.value().toInt()); - a = e_child.attributeNode(QString("targetplayer")); + a = e_child.attributeNode(TQString("targetplayer")); if (!a.isNull()) { Player *player = m_atlanticCore->findPlayer(a.value().toInt()); @@ -817,15 +817,15 @@ void AtlantikNetwork::processNode(QDomNode n) { Player *pFrom = 0, *pTo = 0; - a = e_child.attributeNode(QString("playerfrom")); + a = e_child.attributeNode(TQString("playerfrom")); if (!a.isNull()) pFrom = m_atlanticCore->findPlayer(a.value().toInt()); - a = e_child.attributeNode(QString("playerto")); + a = e_child.attributeNode(TQString("playerto")); if (!a.isNull()) pTo = m_atlanticCore->findPlayer(a.value().toInt()); - a = e_child.attributeNode(QString("money")); + a = e_child.attributeNode(TQString("money")); kdDebug() << "tradeupdatemoney" << (pFrom ? "1" : "0") << (pTo ? "1" : "0") << (a.isNull() ? "0" : "1") << endl; if (trade && pFrom && pTo && !a.isNull()) trade->updateMoney(a.value().toInt(), pFrom, pTo); @@ -841,7 +841,7 @@ void AtlantikNetwork::processNode(QDomNode n) } else if (e.tagName() == "auctionupdate") { - a = e.attributeNode(QString("auctionid")); + a = e.attributeNode(TQString("auctionid")); if (!a.isNull()) { int auctionId = a.value().toInt(); @@ -851,24 +851,24 @@ void AtlantikNetwork::processNode(QDomNode n) if (!(auction = m_auctions[auctionId])) { // Create auction object - auction = m_atlanticCore->newAuction(auctionId, m_atlanticCore->findEstate(e.attributeNode(QString("estateid")).value().toInt())); + auction = m_atlanticCore->newAuction(auctionId, m_atlanticCore->findEstate(e.attributeNode(TQString("estateid")).value().toInt())); m_auctions[auctionId] = auction; - QObject::connect(auction, SIGNAL(bid(Auction *, int)), this, SLOT(auctionBid(Auction *, int))); + TQObject::connect(auction, TQT_SIGNAL(bid(Auction *, int)), this, TQT_SLOT(auctionBid(Auction *, int))); b_newAuction = true; } - a = e.attributeNode(QString("highbidder")); + a = e.attributeNode(TQString("highbidder")); if (!a.isNull()) { - Player *player = m_atlanticCore->findPlayer(e.attributeNode(QString("highbidder")).value().toInt()); - a = e.attributeNode(QString("highbid")); + Player *player = m_atlanticCore->findPlayer(e.attributeNode(TQString("highbidder")).value().toInt()); + a = e.attributeNode(TQString("highbid")); if (auction && !a.isNull()) auction->newBid(player, a.value().toInt()); } - a = e.attributeNode(QString("status")); + a = e.attributeNode(TQString("status")); if (auction && !a.isNull()) { int status = a.value().toInt(); @@ -897,16 +897,16 @@ void AtlantikNetwork::processNode(QDomNode n) kdDebug() << "ignored TAG: " << e.tagName() << endl; } // TODO: remove permanently? - // QDomNode node = n.firstChild(); + // TQDomNode node = n.firstChild(); // processNode(node); } } -void AtlantikNetwork::serverConnect(const QString host, int port) +void AtlantikNetwork::serverConnect(const TQString host, int port) { setAddress(host, port); enableRead(true); - emit msgStatus(i18n("Connecting to %1:%2...").arg(host).arg(QString::number(port)), "connect_creating"); + emit msgStatus(i18n("Connecting to %1:%2...").arg(host).arg(TQString::number(port)), "connect_creating"); startAsyncConnect(); } diff --git a/atlantik/libatlantikclient/atlantik_network.h b/atlantik/libatlantikclient/atlantik_network.h index 087a01be..cd1477f8 100644 --- a/atlantik/libatlantikclient/atlantik_network.h +++ b/atlantik/libatlantikclient/atlantik_network.h @@ -17,7 +17,7 @@ #ifndef LIBATLANTIK_NETWORK_H #define LIBATLANTIK_NETWORK_H -#include <qmap.h> +#include <tqmap.h> #include <kextsock.h> #include "libatlantic_export.h" @@ -39,15 +39,15 @@ Q_OBJECT public: AtlantikNetwork(AtlanticCore *atlanticCore); virtual ~AtlantikNetwork(void); - void setName(QString name); - void cmdChat(QString msg); + void setName(TQString name); + void cmdChat(TQString msg); private slots: - void writeData(QString msg); + void writeData(TQString msg); void rollDice(); void endTurn(); - void newGame(const QString &gameType); - void reconnect(const QString &cookie); + void newGame(const TQString &gameType); + void reconnect(const TQString &cookie); void startGame(); void buyEstate(); void auctionEstate(); @@ -65,17 +65,17 @@ private slots: void tradeReject(Trade *trade); void tradeAccept(Trade *trade); void auctionBid(Auction *auction, int amount); - void changeOption(int, const QString &value); + void changeOption(int, const TQString &value); void slotLookupFinished(int count); void slotConnectionSuccess(); void slotConnectionFailed(int error); public slots: - void serverConnect(const QString host, int port); + void serverConnect(const TQString host, int port); void joinGame(int gameId); void leaveGame(); void slotRead(); - void setImage(const QString &name); + void setImage(const TQString &name); signals: /** @@ -98,17 +98,17 @@ signals: */ void newEstateGroup(EstateGroup *estateGroup); - void msgInfo(QString); - void msgError(QString); - void msgChat(QString, QString); - void msgStatus(const QString &data, const QString &icon = QString::null); - void networkEvent(const QString &data, const QString &icon); + void msgInfo(TQString); + void msgError(TQString); + void msgChat(TQString, TQString); + void msgStatus(const TQString &data, const TQString &icon = TQString::null); + void networkEvent(const TQString &data, const TQString &icon); - void displayDetails(QString text, bool clearText, bool clearButtons, Estate *estate = 0); - void addCommandButton(QString command, QString caption, bool enabled); + void displayDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0); + void addCommandButton(TQString command, TQString caption, bool enabled); void addCloseButton(); - void gameOption(QString title, QString type, QString value, QString edit, QString command); + void gameOption(TQString title, TQString type, TQString value, TQString edit, TQString command); void endConfigUpdate(); void gameConfig(); @@ -136,20 +136,20 @@ signals: void newAuction(Auction *auction); void auctionCompleted(Auction *auction); void receivedHandshake(); - void clientCookie(QString cookie); + void clientCookie(TQString cookie); private: - void processMsg(const QString &msg); - void processNode(QDomNode); + void processMsg(const TQString &msg); + void processNode(TQDomNode); AtlanticCore *m_atlanticCore; - QTextStream *m_textStream; + TQTextStream *m_textStream; int m_playerId; - QString m_serverVersion; + TQString m_serverVersion; - QMap<Player *, int> m_playerLocationMap; - QMap<int, Auction *> m_auctions; + TQMap<Player *, int> m_playerLocationMap; + TQMap<int, Auction *> m_auctions; }; #endif diff --git a/atlantik/libatlantikclient/monopdprotocol.cpp b/atlantik/libatlantikclient/monopdprotocol.cpp index 5f6c401b..f024f163 100644 --- a/atlantik/libatlantikclient/monopdprotocol.cpp +++ b/atlantik/libatlantikclient/monopdprotocol.cpp @@ -14,7 +14,7 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qstring.h> +#include <tqstring.h> /* #include <atlantic_core.h> @@ -30,50 +30,50 @@ #include "monopdprotocol.h" #include "monopdprotocol.moc" -MonopdProtocol::MonopdProtocol() : QObject() +MonopdProtocol::MonopdProtocol() : TQObject() { } void MonopdProtocol::auctionEstate() { - sendData(QString::fromLatin1(".ea")); + sendData(TQString::fromLatin1(".ea")); } void MonopdProtocol::buyEstate() { - sendData(QString::fromLatin1(".eb")); + sendData(TQString::fromLatin1(".eb")); } void MonopdProtocol::confirmTokenLocation(Estate *estate) { - QString data(".t"); - data.append(QString::number(estate ? estate->id() : -1)); + TQString data(".t"); + data.append(TQString::number(estate ? estate->id() : -1)); sendData(data); } void MonopdProtocol::endTurn() { - sendData(QString::fromLatin1(".E")); + sendData(TQString::fromLatin1(".E")); } void MonopdProtocol::rollDice() { - sendData(QString::fromLatin1(".r")); + sendData(TQString::fromLatin1(".r")); } -void MonopdProtocol::setName(QString name) +void MonopdProtocol::setName(TQString name) { - QString data(".n"); + TQString data(".n"); data.append(name); sendData(data); } void MonopdProtocol::startGame() { - sendData(QString::fromLatin1(".gs")); + sendData(TQString::fromLatin1(".gs")); } -void MonopdProtocol::sendData(QString) +void MonopdProtocol::sendData(TQString) { // Your reimplementation of this method should send send data over the // network. diff --git a/atlantik/libatlantikclient/monopdprotocol.h b/atlantik/libatlantikclient/monopdprotocol.h index 0fc16ad8..36e8fcb6 100644 --- a/atlantik/libatlantikclient/monopdprotocol.h +++ b/atlantik/libatlantikclient/monopdprotocol.h @@ -20,7 +20,7 @@ #ifndef MONOPDPROTOCOL_H_H #define MONOPDPROTOCOL_H_H -#include <qobject.h> +#include <tqobject.h> class QString; @@ -48,11 +48,11 @@ private slots: void confirmTokenLocation(Estate *estate); void endTurn(); void rollDice(); - void setName(QString name); + void setName(TQString name); void startGame(); private: - virtual void sendData(QString data); + virtual void sendData(TQString data); }; #endif diff --git a/atlantik/libatlantikui/auction_widget.cpp b/atlantik/libatlantikui/auction_widget.cpp index e7dc7fd8..219c8b2b 100644 --- a/atlantik/libatlantikui/auction_widget.cpp +++ b/atlantik/libatlantikui/auction_widget.cpp @@ -14,10 +14,10 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qvgroupbox.h> -#include <qhbox.h> -#include <qspinbox.h> -#include <qlabel.h> +#include <tqvgroupbox.h> +#include <tqhbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> #include <kdebug.h> @@ -33,21 +33,21 @@ #include "auction_widget.moc" -AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidget *parent, const char *name) : QWidget(parent, name) +AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = atlanticCore; m_auction = auction; - connect(m_auction, SIGNAL(changed()), this, SLOT(auctionChanged())); - connect(m_auction, SIGNAL(updateBid(Player *, int)), this, SLOT(updateBid(Player *, int))); - connect(this, SIGNAL(bid(Auction *, int)), m_auction, SIGNAL(bid(Auction *, int))); + connect(m_auction, TQT_SIGNAL(changed()), this, TQT_SLOT(auctionChanged())); + connect(m_auction, TQT_SIGNAL(updateBid(Player *, int)), this, TQT_SLOT(updateBid(Player *, int))); + connect(this, TQT_SIGNAL(bid(Auction *, int)), m_auction, TQT_SIGNAL(bid(Auction *, int))); - m_mainLayout = new QVBoxLayout(this, KDialog::marginHint()); + m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint()); Q_CHECK_PTR(m_mainLayout); // Player list Estate *estate = auction->estate(); - m_playerGroupBox = new QVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox"); + m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox"); m_mainLayout->addWidget(m_playerGroupBox); m_playerList = new KListView(m_playerGroupBox); @@ -58,36 +58,36 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidg KListViewItem *item; Player *player, *pSelf = m_atlanticCore->playerSelf(); - QPtrList<Player> playerList = m_atlanticCore->players(); - for (QPtrListIterator<Player> it(playerList); *it; ++it) + TQPtrList<Player> playerList = m_atlanticCore->players(); + for (TQPtrListIterator<Player> it(playerList); *it; ++it) { if ( (player = *it) && player->game() == pSelf->game() ) { - item = new KListViewItem(m_playerList, player->name(), QString("0")); - item->setPixmap(0, QPixmap(SmallIcon("personal"))); + item = new KListViewItem(m_playerList, player->name(), TQString("0")); + item->setPixmap(0, TQPixmap(SmallIcon("personal"))); m_playerItems[player] = item; - connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); + connect(player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); } } // Bid spinbox and button - QHBox *bidBox = new QHBox(this); + TQHBox *bidBox = new TQHBox(this); m_mainLayout->addWidget(bidBox); - m_bidSpinBox = new QSpinBox(1, 10000, 1, bidBox); + m_bidSpinBox = new TQSpinBox(1, 10000, 1, bidBox); KPushButton *bidButton = new KPushButton(i18n("Make Bid"), bidBox, "bidButton"); - connect(bidButton, SIGNAL(clicked()), this, SLOT(slotBidButtonClicked())); + connect(bidButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBidButtonClicked())); // Status label - m_statusLabel = new QLabel(this, "statusLabel"); + m_statusLabel = new TQLabel(this, "statusLabel"); m_mainLayout->addWidget(m_statusLabel); } void AuctionWidget::auctionChanged() { - QString status; + TQString status; switch (m_auction->status()) { case 1: @@ -103,7 +103,7 @@ void AuctionWidget::auctionChanged() break; default: - status = QString::null; + status = TQString::null; } m_statusLabel->setText(status); } @@ -113,7 +113,7 @@ void AuctionWidget::playerChanged(Player *player) if (!player) return; - QListViewItem *item; + TQListViewItem *item; if (!(item = m_playerItems[player])) return; @@ -126,11 +126,11 @@ void AuctionWidget::updateBid(Player *player, int amount) if (!player) return; - QListViewItem *item; + TQListViewItem *item; if (!(item = m_playerItems[player])) return; - item->setText(1, QString::number(amount)); + item->setText(1, TQString::number(amount)); m_bidSpinBox->setMinValue(amount+1); m_playerList->triggerUpdate(); } diff --git a/atlantik/libatlantikui/auction_widget.h b/atlantik/libatlantikui/auction_widget.h index a87b8fc4..72568615 100644 --- a/atlantik/libatlantikui/auction_widget.h +++ b/atlantik/libatlantikui/auction_widget.h @@ -17,9 +17,9 @@ #ifndef ATLANTIK_AUCTION_WIDGET_H #define ATLANTIK_AUCTION_WIDGET_H -#include <qwidget.h> -#include <qlayout.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqmap.h> #include <klistview.h> @@ -38,7 +38,7 @@ class AuctionWidget : public QWidget Q_OBJECT public: - AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidget *parent, const char *name=0); + AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name=0); private slots: void auctionChanged(); @@ -50,11 +50,11 @@ signals: void bid(Auction *auction, int amount); private: - QVBoxLayout *m_mainLayout; - QVGroupBox *m_playerGroupBox; - QSpinBox *m_bidSpinBox; - QMap<Player *, KListViewItem *> m_playerItems; - QLabel *m_statusLabel; + TQVBoxLayout *m_mainLayout; + TQVGroupBox *m_playerGroupBox; + TQSpinBox *m_bidSpinBox; + TQMap<Player *, KListViewItem *> m_playerItems; + TQLabel *m_statusLabel; KListView *m_playerList; diff --git a/atlantik/libatlantikui/board.cpp b/atlantik/libatlantikui/board.cpp index a4fdf3ce..1b9ae0b5 100644 --- a/atlantik/libatlantikui/board.cpp +++ b/atlantik/libatlantikui/board.cpp @@ -16,8 +16,8 @@ #include <iostream> -#include <qpainter.h> -#include <qstring.h> +#include <tqpainter.h> +#include <tqstring.h> #include <kdebug.h> #include <klocale.h> @@ -35,7 +35,7 @@ #include "board.h" #include "board.moc" -AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, QWidget *parent, const char *name) : QWidget(parent, name) +AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = atlanticCore; m_maxEstates = maxEstates; @@ -43,17 +43,17 @@ AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, Display m_animateTokens = false; m_lastServerDisplay = 0; - setMinimumSize(QSize(500, 500)); + setMinimumSize(TQSize(500, 500)); int sideLen = maxEstates/4; // Animated token movement m_movingToken = 0; - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotMoveToken())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotMoveToken())); m_resumeTimer = false; - m_gridLayout = new QGridLayout(this, sideLen+1, sideLen+1); + m_gridLayout = new TQGridLayout(this, sideLen+1, sideLen+1); for(int i=0;i<=sideLen;i++) { if (i==0 || i==sideLen) @@ -68,7 +68,7 @@ AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, Display } } -// spacer = new QWidget(this); +// spacer = new TQWidget(this); // m_gridLayout->addWidget(spacer, sideLen, sideLen); // SE m_displayQueue.setAutoDelete(true); @@ -101,7 +101,7 @@ void AtlantikBoard::setViewProperties(bool indicateUnowned, bool highliteUnowned // Update EstateViews EstateView *estateView; - for (QPtrListIterator<EstateView> it(m_estateViews); *it; ++it) + for (TQPtrListIterator<EstateView> it(m_estateViews); *it; ++it) if ((estateView = dynamic_cast<EstateView*>(*it))) estateView->setViewProperties(indicateUnowned, highliteUnowned, darkenMortgaged, quartzEffects); } @@ -114,7 +114,7 @@ int AtlantikBoard::heightForWidth(int width) EstateView *AtlantikBoard::findEstateView(Estate *estate) { EstateView *estateView; - for (QPtrListIterator<EstateView> i(m_estateViews); *i; ++i) + for (TQPtrListIterator<EstateView> i(m_estateViews); *i; ++i) { estateView = dynamic_cast<EstateView*>(*i); if (estateView && estateView->estate() == estate) @@ -125,7 +125,7 @@ EstateView *AtlantikBoard::findEstateView(Estate *estate) void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects) { - QString icon = QString(); + TQString icon = TQString(); int estateId = estate->id(); EstateOrientation orientation = North; int sideLen = m_gridLayout->numRows() - 1; @@ -142,16 +142,16 @@ void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool hig EstateView *estateView = new EstateView(estate, orientation, icon, indicateUnowned, highliteUnowned, darkenMortgaged, quartzEffects, this, "estateview"); m_estateViews.append(estateView); - connect(estate, SIGNAL(changed()), estateView, SLOT(estateChanged())); - connect(estateView, SIGNAL(estateToggleMortgage(Estate *)), estate, SIGNAL(estateToggleMortgage(Estate *))); - connect(estateView, SIGNAL(LMBClicked(Estate *)), estate, SIGNAL(LMBClicked(Estate *))); - connect(estateView, SIGNAL(estateHouseBuy(Estate *)), estate, SIGNAL(estateHouseBuy(Estate *))); - connect(estateView, SIGNAL(estateHouseSell(Estate *)), estate, SIGNAL(estateHouseSell(Estate *))); - connect(estateView, SIGNAL(newTrade(Player *)), estate, SIGNAL(newTrade(Player *))); + connect(estate, TQT_SIGNAL(changed()), estateView, TQT_SLOT(estateChanged())); + connect(estateView, TQT_SIGNAL(estateToggleMortgage(Estate *)), estate, TQT_SIGNAL(estateToggleMortgage(Estate *))); + connect(estateView, TQT_SIGNAL(LMBClicked(Estate *)), estate, TQT_SIGNAL(LMBClicked(Estate *))); + connect(estateView, TQT_SIGNAL(estateHouseBuy(Estate *)), estate, TQT_SIGNAL(estateHouseBuy(Estate *))); + connect(estateView, TQT_SIGNAL(estateHouseSell(Estate *)), estate, TQT_SIGNAL(estateHouseSell(Estate *))); + connect(estateView, TQT_SIGNAL(newTrade(Player *)), estate, TQT_SIGNAL(newTrade(Player *))); // Designer has its own LMBClicked slot if (m_mode == Play) - connect(estateView, SIGNAL(LMBClicked(Estate *)), this, SLOT(prependEstateDetails(Estate *))); + connect(estateView, TQT_SIGNAL(LMBClicked(Estate *)), this, TQT_SLOT(prependEstateDetails(Estate *))); if (estateId<sideLen) m_gridLayout->addWidget(estateView, sideLen, sideLen-estateId); @@ -167,8 +167,8 @@ void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool hig if (m_atlanticCore) { Player *player = 0; - QPtrList<Player> playerList = m_atlanticCore->players(); - for (QPtrListIterator<Player> it(playerList); (player = *it) ; ++it) + TQPtrList<Player> playerList = m_atlanticCore->players(); + for (TQPtrListIterator<Player> it(playerList); (player = *it) ; ++it) if (player->location() == estate) addToken(player); } @@ -181,13 +181,13 @@ void AtlantikBoard::addAuctionWidget(Auction *auction) m_displayQueue.prepend(auctionW); updateCenter(); - connect(auction, SIGNAL(completed()), this, SLOT(displayDefault())); + connect(auction, TQT_SIGNAL(completed()), this, TQT_SLOT(displayDefault())); } Token *AtlantikBoard::findToken(Player *player) { Token *token = 0; - for (QPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it) + for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it) if (token->player() == player) return token; return 0; @@ -215,12 +215,12 @@ void AtlantikBoard::addToken(Player *player) Token *token = new Token(player, this, "token"); m_tokens.append(token); - connect(player, SIGNAL(changed(Player *)), token, SLOT(playerChanged())); + connect(player, TQT_SIGNAL(changed(Player *)), token, TQT_SLOT(playerChanged())); jumpToken(token); // Timer to reinit the gameboard _after_ event loop - QTimer::singleShot(100, this, SLOT(slotResizeAftermath())); + TQTimer::singleShot(100, this, TQT_SLOT(slotResizeAftermath())); } void AtlantikBoard::playerChanged(Player *player) @@ -305,7 +305,7 @@ void AtlantikBoard::jumpToken(Token *token) kdDebug() << "jumpToken to " << token->location()->name() << endl; - QPoint tGeom = calculateTokenDestination(token); + TQPoint tGeom = calculateTokenDestination(token); token->setGeometry(tGeom.x(), tGeom.y(), token->width(), token->height()); Player *player = token->player(); @@ -339,14 +339,14 @@ void AtlantikBoard::moveToken(Token *token) m_timer->start(15); } -QPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest) +TQPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest) { if (!eDest) eDest = token->location(); EstateView *evDest = findEstateView(eDest); if (!evDest) - return QPoint(0, 0); + return TQPoint(0, 0); int x = 0, y = 0; if (token->player()->inJail()) @@ -374,7 +374,7 @@ QPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest) } */ } - return QPoint(x, y); + return TQPoint(x, y); } void AtlantikBoard::slotMoveToken() @@ -399,7 +399,7 @@ void AtlantikBoard::slotMoveToken() // Where do we want to go today? Estate *eDest = m_atlanticCore->estateAfter(m_movingToken->location()); - QPoint tGeom = calculateTokenDestination(m_movingToken, eDest); + TQPoint tGeom = calculateTokenDestination(m_movingToken, eDest); int xDest = tGeom.x(); int yDest = tGeom.y(); @@ -442,7 +442,7 @@ void AtlantikBoard::slotMoveToken() } } -void AtlantikBoard::resizeEvent(QResizeEvent *) +void AtlantikBoard::resizeEvent(TQResizeEvent *) { // Stop moving tokens, slotResizeAftermath will re-enable this if (m_timer!=0 && m_timer->isActive()) @@ -456,17 +456,17 @@ void AtlantikBoard::resizeEvent(QResizeEvent *) int q = e->size().width() - e->size().height(); if (q > 0) { - QSize s(q, 0); + TQSize s(q, 0); spacer->setFixedSize(s); } else { - QSize s(0, -q); + TQSize s(0, -q); spacer->setFixedSize(s); } */ // Timer to reinit the gameboard _after_ resizeEvent - QTimer::singleShot(0, this, SLOT(slotResizeAftermath())); + TQTimer::singleShot(0, this, TQT_SLOT(slotResizeAftermath())); } void AtlantikBoard::slotResizeAftermath() @@ -477,7 +477,7 @@ void AtlantikBoard::slotResizeAftermath() // adjusted estate geometries. Token *token = 0; - for (QPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it) + for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it) jumpToken(token); // Restart the timer that was stopped in resizeEvent @@ -493,7 +493,7 @@ void AtlantikBoard::displayDefault() switch(m_displayQueue.count()) { case 0: - m_displayQueue.prepend(new QWidget(this)); + m_displayQueue.prepend(new TQWidget(this)); break; case 1: if (EstateDetails *display = dynamic_cast<EstateDetails*>(m_lastServerDisplay)) @@ -508,7 +508,7 @@ void AtlantikBoard::displayDefault() updateCenter(); } -void AtlantikBoard::displayButton(QString command, QString caption, bool enabled) +void AtlantikBoard::displayButton(TQString command, TQString caption, bool enabled) { if (EstateDetails *display = dynamic_cast<EstateDetails*>(m_lastServerDisplay)) display->addButton(command, caption, enabled); @@ -521,7 +521,7 @@ void AtlantikBoard::addCloseButton() eDetails->addCloseButton(); } -void AtlantikBoard::insertDetails(QString text, bool clearText, bool clearButtons, Estate *estate) +void AtlantikBoard::insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate) { EstateDetails *eDetails = 0; @@ -544,8 +544,8 @@ void AtlantikBoard::insertDetails(QString text, bool clearText, bool clearButton eDetails = new EstateDetails(estate, text, this); m_lastServerDisplay = eDetails; - connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString))); - connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault())); + connect(eDetails, TQT_SIGNAL(buttonCommand(TQString)), this, TQT_SIGNAL(buttonCommand(TQString))); + connect(eDetails, TQT_SIGNAL(buttonClose()), this, TQT_SLOT(displayDefault())); m_displayQueue.insert(0, eDetails); updateCenter(); @@ -560,11 +560,11 @@ void AtlantikBoard::prependEstateDetails(Estate *estate) if (m_displayQueue.getFirst() == m_lastServerDisplay) { - eDetails = new EstateDetails(estate, QString::null, this); + eDetails = new EstateDetails(estate, TQString::null, this); m_displayQueue.prepend(eDetails); - connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString))); - connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault())); + connect(eDetails, TQT_SIGNAL(buttonCommand(TQString)), this, TQT_SIGNAL(buttonCommand(TQString))); + connect(eDetails, TQT_SIGNAL(buttonClose()), this, TQT_SLOT(displayDefault())); } else { @@ -572,7 +572,7 @@ void AtlantikBoard::prependEstateDetails(Estate *estate) if (eDetails) { eDetails->setEstate(estate); - eDetails->setText( QString::null ); + eDetails->setText( TQString::null ); // eDetails->clearButtons(); } else @@ -590,12 +590,12 @@ void AtlantikBoard::prependEstateDetails(Estate *estate) void AtlantikBoard::updateCenter() { - QWidget *center = m_displayQueue.getFirst(); + TQWidget *center = m_displayQueue.getFirst(); m_gridLayout->addMultiCellWidget(center, 1, m_gridLayout->numRows()-2, 1, m_gridLayout->numCols()-2); center->show(); } -QWidget *AtlantikBoard::centerWidget() +TQWidget *AtlantikBoard::centerWidget() { return m_displayQueue.getFirst(); } diff --git a/atlantik/libatlantikui/board.h b/atlantik/libatlantikui/board.h index deedb3d6..21c47991 100644 --- a/atlantik/libatlantikui/board.h +++ b/atlantik/libatlantikui/board.h @@ -17,10 +17,10 @@ #ifndef ATLANTIK_BOARD_H #define ATLANTIK_BOARD_H -#include <qwidget.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqptrlist.h> #include "libatlantikui_export.h" class QPoint; @@ -39,7 +39,7 @@ Q_OBJECT public: enum DisplayMode { Play, Edit }; - AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, QWidget *parent, const char *name=0); + AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name=0); ~AtlantikBoard(); void reset(); @@ -53,7 +53,7 @@ public: void indicateUnownedChanged(); EstateView *findEstateView(Estate *estate); - QWidget *centerWidget(); + TQWidget *centerWidget(); public slots: void slotMoveToken(); @@ -62,41 +62,41 @@ public slots: private slots: void playerChanged(Player *player); - void displayButton(QString command, QString caption, bool enabled); + void displayButton(TQString command, TQString caption, bool enabled); void prependEstateDetails(Estate *); - void insertDetails(QString text, bool clearText, bool clearButtons, Estate *estate = 0); + void insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0); void addCloseButton(); signals: void tokenConfirmation(Estate *estate); - void buttonCommand(QString command); + void buttonCommand(TQString command); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); private: Token *findToken(Player *player); void jumpToken(Token *token); void moveToken(Token *token); - QPoint calculateTokenDestination(Token *token, Estate *estate = 0); + TQPoint calculateTokenDestination(Token *token, Estate *estate = 0); void updateCenter(); AtlanticCore *m_atlanticCore; DisplayMode m_mode; - QWidget *spacer, *m_lastServerDisplay; - QGridLayout *m_gridLayout; + TQWidget *spacer, *m_lastServerDisplay; + TQGridLayout *m_gridLayout; Token *m_movingToken; - QTimer *m_timer; + TQTimer *m_timer; bool m_resumeTimer; bool m_animateTokens; int m_maxEstates; - QPtrList<EstateView> m_estateViews; - QPtrList<Token> m_tokens; - QPtrList<QWidget> m_displayQueue; + TQPtrList<EstateView> m_estateViews; + TQPtrList<Token> m_tokens; + TQPtrList<TQWidget> m_displayQueue; }; #endif diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp index d143033c..3a71f25a 100644 --- a/atlantik/libatlantikui/estatedetails.cpp +++ b/atlantik/libatlantikui/estatedetails.cpp @@ -14,12 +14,12 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qpainter.h> -#include <qpixmap.h> -#include <qlayout.h> -#include <qptrlist.h> -#include <qregexp.h> -#include <qvgroupbox.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqlayout.h> +#include <tqptrlist.h> +#include <tqregexp.h> +#include <tqvgroupbox.h> #include <kdialog.h> #include <kglobalsettings.h> @@ -39,7 +39,7 @@ #include "estatedetails.h" #include "kwrappedlistviewitem.h" -EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, const char *name) : QWidget(parent, name) +EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_pixmap = 0; m_quartzBlocks = 0; @@ -51,22 +51,22 @@ EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, cons m_closeButton = 0; m_buttons.setAutoDelete(true); - m_mainLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); Q_CHECK_PTR(m_mainLayout); - m_mainLayout->addItem(new QSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, QSizePolicy::Fixed, QSizePolicy::Minimum)); + m_mainLayout->addItem(new TQSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, TQSizePolicy::Fixed, TQSizePolicy::Minimum)); m_infoListView = new KListView(this, "infoListView"); - m_infoListView->addColumn(m_estate ? m_estate->name() : QString("") ); + m_infoListView->addColumn(m_estate ? m_estate->name() : TQString("") ); m_infoListView->setSorting(-1); m_mainLayout->addWidget(m_infoListView); appendText(text); - m_buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint()); + m_buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint()); m_buttonBox->setMargin(0); - m_buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + m_buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); setEstate(estate); } @@ -78,7 +78,7 @@ EstateDetails::~EstateDetails() delete m_infoListView; } -void EstateDetails::paintEvent(QPaintEvent *) +void EstateDetails::paintEvent(TQPaintEvent *) { if (m_recreateQuartz) { @@ -109,11 +109,11 @@ void EstateDetails::paintEvent(QPaintEvent *) if (b_recreate) { delete m_pixmap; - m_pixmap = new QPixmap(width(), height()); + m_pixmap = new TQPixmap(width(), height()); - QColor greenHouse(0, 255, 0); - QColor redHotel(255, 51, 51); - QPainter painter; + TQColor greenHouse(0, 255, 0); + TQColor redHotel(255, 51, 51); + TQPainter painter; painter.begin(m_pixmap, this); painter.setPen(Qt::black); @@ -130,12 +130,12 @@ void EstateDetails::paintEvent(QPaintEvent *) if (m_estate) { int titleHeight = 50; - QColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80)); + TQColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80)); KPixmap* quartzBuffer = new KPixmap; quartzBuffer->resize(25, (height()/4)-2); - QPainter quartzPainter; + TQPainter quartzPainter; quartzPainter.begin(quartzBuffer, this); painter.setBrush(titleColor); @@ -178,7 +178,7 @@ void EstateDetails::paintEvent(QPaintEvent *) if (fontSize == -1) fontSize = KGlobalSettings::generalFont().pixelSize(); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize * 2, QFont::Bold)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize * 2, TQFont::Bold)); painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, Qt::AlignJustify, m_estate->name()); painter.setPen(Qt::black); @@ -189,12 +189,12 @@ void EstateDetails::paintEvent(QPaintEvent *) if (m_estate->estateGroup()) { xText = titleHeight - fontSize - KDialog::marginHint(); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Bold)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Bold)); painter.drawText(5, xText, width()-10, titleHeight, Qt::AlignRight, m_estate->estateGroup()->name().upper()); } xText = titleHeight + fontSize + 5; - painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Normal)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Normal)); } b_recreate = false; @@ -202,7 +202,7 @@ void EstateDetails::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, m_pixmap); } -void EstateDetails::resizeEvent(QResizeEvent *) +void EstateDetails::resizeEvent(TQResizeEvent *) { m_recreateQuartz = true; b_recreate = true; @@ -212,43 +212,43 @@ void EstateDetails::addDetails() { if (m_estate) { - QListViewItem *infoText = 0; + TQListViewItem *infoText = 0; // Price if (m_estate->price()) { - infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price())); - infoText->setPixmap(0, QPixmap(SmallIcon("info"))); + infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price())); + infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); } // Owner, houses, isMortgaged if (m_estate && m_estate->canBeOwned()) { - infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned"))); - infoText->setPixmap(0, QPixmap(SmallIcon("info"))); + infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned"))); + infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); if (m_estate->isOwned()) { - infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses())); - infoText->setPixmap(0, QPixmap(SmallIcon("info"))); + infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses())); + infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); - infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No"))); - infoText->setPixmap(0, QPixmap(SmallIcon("info"))); + infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No"))); + infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); } } } } -void EstateDetails::addButton(QString command, QString caption, bool enabled) +void EstateDetails::addButton(TQString command, TQString caption, bool enabled) { KPushButton *button = new KPushButton(caption, this); m_buttons.append(button); - m_buttonCommandMap[(QObject *)button] = command; + m_buttonCommandMap[(TQObject *)button] = command; m_buttonBox->addWidget(button); if (m_estate) { - QColor bgColor, fgColor; + TQColor bgColor, fgColor; bgColor = m_estate->bgColor().light(110); fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? Qt::white : Qt::black; @@ -258,7 +258,7 @@ void EstateDetails::addButton(QString command, QString caption, bool enabled) button->setEnabled(enabled); button->show(); - connect(button, SIGNAL(pressed()), this, SLOT(buttonPressed())); + connect(button, TQT_SIGNAL(pressed()), this, TQT_SLOT(buttonPressed())); } void EstateDetails::addCloseButton() @@ -268,7 +268,7 @@ void EstateDetails::addCloseButton() m_closeButton = new KPushButton(KStdGuiItem::close(), this); m_buttonBox->addWidget(m_closeButton); m_closeButton->show(); - connect(m_closeButton, SIGNAL(pressed()), this, SIGNAL(buttonClose())); + connect(m_closeButton, TQT_SIGNAL(pressed()), this, TQT_SIGNAL(buttonClose())); } } @@ -278,30 +278,30 @@ void EstateDetails::setEstate(Estate *estate) { m_estate = estate; - m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : QString("") ); + m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : TQString("") ); b_recreate = true; update(); } } -void EstateDetails::setText(QString text) +void EstateDetails::setText(TQString text) { m_infoListView->clear(); appendText(text); } -void EstateDetails::appendText(QString text) +void EstateDetails::appendText(TQString text) { if ( text.isEmpty() ) return; KWrappedListViewItem *infoText = new KWrappedListViewItem(m_infoListView, m_infoListView->lastItem(), text); - if ( text.find( QRegExp("rolls") ) != -1 ) - infoText->setPixmap(0, QPixmap(SmallIcon("roll"))); + if ( text.find( TQRegExp("rolls") ) != -1 ) + infoText->setPixmap(0, TQPixmap(SmallIcon("roll"))); else - infoText->setPixmap(0, QPixmap(SmallIcon("atlantik"))); + infoText->setPixmap(0, TQPixmap(SmallIcon("atlantik"))); m_infoListView->ensureItemVisible( infoText ); } @@ -321,7 +321,7 @@ void EstateDetails::clearButtons() void EstateDetails::buttonPressed() { - emit buttonCommand(QString(m_buttonCommandMap[(QObject *)QObject::sender()])); + emit buttonCommand(TQString(m_buttonCommandMap[(TQObject *)TQObject::sender()])); } #include "estatedetails.moc" diff --git a/atlantik/libatlantikui/estatedetails.h b/atlantik/libatlantikui/estatedetails.h index b8264a51..6c8a7640 100644 --- a/atlantik/libatlantikui/estatedetails.h +++ b/atlantik/libatlantikui/estatedetails.h @@ -17,7 +17,7 @@ #ifndef ATLANTIK_ESTATEDETAILS_H #define ATLANTIK_ESTATEDETAILS_H -#include <qwidget.h> +#include <tqwidget.h> class QPixmap; class QString; @@ -37,41 +37,41 @@ class EstateDetails : public QWidget Q_OBJECT public: - EstateDetails(Estate *estate, QString text, QWidget *parent, const char *name = 0); + EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name = 0); ~EstateDetails(); Estate *estate() { return m_estate; } void addDetails(); - void addButton(const QString command, const QString caption, bool enabled); + void addButton(const TQString command, const TQString caption, bool enabled); void addCloseButton(); void setEstate(Estate *estate); - void setText(QString text); - void appendText(QString text); + void setText(TQString text); + void appendText(TQString text); void clearButtons(); protected: - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); private slots: void buttonPressed(); signals: - void buttonCommand(QString); + void buttonCommand(TQString); void buttonClose(); private: Estate *m_estate; - QPixmap *m_pixmap; + TQPixmap *m_pixmap; KPixmap *m_quartzBlocks; KListView *m_infoListView; KPushButton *m_closeButton; bool b_recreate, m_recreateQuartz; - QVBoxLayout *m_mainLayout; - QHBoxLayout *m_buttonBox; - QVGroupBox *m_textGroupBox; - QMap <QObject *, QString> m_buttonCommandMap; - QPtrList<KPushButton> m_buttons; + TQVBoxLayout *m_mainLayout; + TQHBoxLayout *m_buttonBox; + TQVGroupBox *m_textGroupBox; + TQMap <TQObject *, TQString> m_buttonCommandMap; + TQPtrList<KPushButton> m_buttons; }; #endif diff --git a/atlantik/libatlantikui/estateview.cpp b/atlantik/libatlantikui/estateview.cpp index b8c3f38c..4755ccd3 100644 --- a/atlantik/libatlantikui/estateview.cpp +++ b/atlantik/libatlantikui/estateview.cpp @@ -14,11 +14,11 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qtooltip.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwmatrix.h> -#include <qcursor.h> +#include <tqtooltip.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwmatrix.h> +#include <tqcursor.h> #include <kdebug.h> #include <kdeversion.h> @@ -36,7 +36,7 @@ #include "estateview.moc" #include "config.h" -EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QString &_icon, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, QWidget *parent, const char *name) : QWidget(parent, name, WResizeNoErase) +EstateView::EstateView(Estate *estate, EstateOrientation orientation, const TQString &_icon, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name) : TQWidget(parent, name, WResizeNoErase) { m_estate = estate; m_orientation = orientation; @@ -57,7 +57,7 @@ EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QStr pe = 0; updatePE(); - icon = new QPixmap(locate("data", "atlantik/pics/" + _icon)); + icon = new TQPixmap(locate("data", "atlantik/pics/" + _icon)); icon = rotatePixmap(icon); updateToolTip(); @@ -65,11 +65,11 @@ EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QStr void EstateView::updateToolTip() { - QToolTip::remove(this); + TQToolTip::remove(this); if ( m_estate ) { - QString toolTip = m_estate->name(); + TQString toolTip = m_estate->name(); if ( m_estate->isOwned() ) { toolTip.append( "\n" + i18n("Owner: %1").arg( m_estate->owner()->name() ) ); @@ -87,7 +87,7 @@ void EstateView::updateToolTip() else if ( m_estate->money() ) toolTip.append( "\n" + i18n("Money: %1").arg( m_estate->money() ) ); - QToolTip::add( this, toolTip ); + TQToolTip::add( this, toolTip ); } } @@ -123,12 +123,12 @@ void EstateView::setViewProperties(bool indicateUnowned, bool highliteUnowned, b update(); } -QPixmap *EstateView::rotatePixmap(QPixmap *p) +TQPixmap *EstateView::rotatePixmap(TQPixmap *p) { if (p==0 || p->isNull()) return 0; - QWMatrix m; + TQWMatrix m; switch(m_orientation) { @@ -152,7 +152,7 @@ KPixmap *EstateView::rotatePixmap(KPixmap *p) if (p==0 || p->isNull()) return 0; - QWMatrix m; + TQWMatrix m; switch(m_orientation) { @@ -217,7 +217,7 @@ void EstateView::repositionPortfolioEstate() } } -void EstateView::paintEvent(QPaintEvent *) +void EstateView::paintEvent(TQPaintEvent *) { m_titleHeight = height()/4; m_titleWidth = width()/4; @@ -250,11 +250,11 @@ void EstateView::paintEvent(QPaintEvent *) if (b_recreate) { delete qpixmap; - qpixmap = new QPixmap(width(), height()); + qpixmap = new TQPixmap(width(), height()); - QColor greenHouse(0, 255, 0); - QColor redHotel(255, 51, 51); - QPainter painter; + TQColor greenHouse(0, 255, 0); + TQColor redHotel(255, 51, 51); + TQPainter painter; painter.begin(qpixmap, this); painter.setPen(Qt::black); @@ -280,7 +280,7 @@ void EstateView::paintEvent(QPaintEvent *) else quartzBuffer->resize(m_titleWidth-2, 25); - QPainter quartzPainter; + TQPainter quartzPainter; quartzPainter.begin(quartzBuffer, this); painter.setBrush(m_estate->color()); @@ -401,15 +401,15 @@ void EstateView::paintEvent(QPaintEvent *) delete quartzBuffer; } - QFont font = QFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal ); + TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal ); painter.setFont(font); - QString estateName = m_estate->name(); + TQString estateName = m_estate->name(); #if defined(KDE_MAKE_VERSION) #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) if ( m_estate->color().isValid() && ( m_orientation == West || m_orientation == East ) ) - estateName = KStringHandler::rPixelSqueeze( m_estate->name(), QFontMetrics( font ), 3*width()/4 ); + estateName = KStringHandler::rPixelSqueeze( m_estate->name(), TQFontMetrics( font ), 3*width()/4 ); else - estateName = KStringHandler::rPixelSqueeze( m_estate->name(), QFontMetrics( font ), width() ); + estateName = KStringHandler::rPixelSqueeze( m_estate->name(), TQFontMetrics( font ), width() ); #endif #endif if (m_estate->color().isValid() && m_orientation == West) @@ -422,15 +422,15 @@ void EstateView::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, qpixmap); } -void EstateView::resizeEvent(QResizeEvent *) +void EstateView::resizeEvent(TQResizeEvent *) { m_recreateQuartz = true; b_recreate = true; - QTimer::singleShot(0, this, SLOT(slotResizeAftermath())); + TQTimer::singleShot(0, this, TQT_SLOT(slotResizeAftermath())); } -void EstateView::mousePressEvent(QMouseEvent *e) +void EstateView::mousePressEvent(TQMouseEvent *e) { if (e->button()==RightButton && m_estate->isOwned()) { @@ -482,9 +482,9 @@ void EstateView::mousePressEvent(QMouseEvent *e) KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu); if (pm) { - connect(pm, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int))); + connect(pm, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int))); } - QPoint g = QCursor::pos(); + TQPoint g = TQCursor::pos(); rmbMenu->exec(g); delete rmbMenu; } @@ -521,9 +521,9 @@ void EstateView::slotMenuAction(int item) // Kudos to Gallium <gallium@kde.org> for writing the Quartz KWin style and // letting me use the ultra slick algorithm! -void EstateView::drawQuartzBlocks(KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2) +void EstateView::drawQuartzBlocks(KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2) { - QPainter px; + TQPainter px; if (pi==0 || pi->isNull()) return; diff --git a/atlantik/libatlantikui/estateview.h b/atlantik/libatlantikui/estateview.h index 864c8983..7e1d8cdc 100644 --- a/atlantik/libatlantikui/estateview.h +++ b/atlantik/libatlantikui/estateview.h @@ -17,8 +17,8 @@ #ifndef ATLANTIK_ESTATEVIEW_H #define ATLANTIK_ESTATEVIEW_H -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> #include <kpixmap.h> @@ -34,7 +34,7 @@ class EstateView : public QWidget Q_OBJECT public: - EstateView(Estate *estate, EstateOrientation orientation, const QString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, QWidget *parent, const char *name = 0); + EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name = 0); void setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects); Estate *estate() { return m_estate; } void updatePE(); @@ -51,20 +51,20 @@ Q_OBJECT void LMBClicked(Estate *estate); protected: - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); - void mousePressEvent(QMouseEvent *); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); + void mousePressEvent(TQMouseEvent *); private: void updateToolTip(); - QPixmap *rotatePixmap(QPixmap *); + TQPixmap *rotatePixmap(TQPixmap *); KPixmap *rotatePixmap(KPixmap *); - void drawQuartzBlocks(KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2); + void drawQuartzBlocks(KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2); void repositionPortfolioEstate(); Estate *m_estate; - QPixmap *qpixmap, *icon; + TQPixmap *qpixmap, *icon; KPixmap *m_quartzBlocks; bool m_indicateUnowned, m_highliteUnowned, m_darkenMortgaged, m_quartzEffects; bool b_recreate, m_recreateQuartz; diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.cpp b/atlantik/libatlantikui/kwrappedlistviewitem.cpp index 7bd9e2cf..38c0d636 100644 --- a/atlantik/libatlantikui/kwrappedlistviewitem.cpp +++ b/atlantik/libatlantikui/kwrappedlistviewitem.cpp @@ -22,8 +22,8 @@ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. -#include <qheader.h> -#include <qstring.h> +#include <tqheader.h> +#include <tqstring.h> #include <kglobalsettings.h> #include <klistview.h> @@ -31,14 +31,14 @@ #include "kwrappedlistviewitem.h" -KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QString text, QString t2 ) -: QObject(), KListViewItem( parent ) +KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 ) +: TQObject(), KListViewItem( parent ) { init( parent, text, t2 ); } -KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QListViewItem *after, QString text, QString t2 ) -: QObject(), KListViewItem( parent, after ) +KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 ) +: TQObject(), KListViewItem( parent, after ) { init( parent, text, t2 ); } @@ -49,7 +49,7 @@ void KWrappedListViewItem::setup() } /* -int KWrappedListViewItem::width( const QFontMetrics&, const QListView*, int ) const +int KWrappedListViewItem::width( const TQFontMetrics&, const TQListView*, int ) const { return m_wrap->boundingRect().width(); } @@ -60,12 +60,12 @@ void KWrappedListViewItem::wrapColumn( int c ) if ( c != m_wrapColumn ) return; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFont font = QFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal ); - QFontMetrics fm = QFontMetrics( font ); + TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal ); + TQFontMetrics fm = TQFontMetrics( font ); int wrapWidth = lv->width(); for ( int i = 0 ; i < m_wrapColumn ; i++ ) @@ -74,16 +74,16 @@ void KWrappedListViewItem::wrapColumn( int c ) if ( pixmap(c) ) wrapWidth -= ( pixmap( c )->width() + lv->itemMargin() ); - QScrollBar *scrollBar = lv->verticalScrollBar(); + TQScrollBar *scrollBar = lv->verticalScrollBar(); if ( !scrollBar->isHidden() ) wrapWidth -= scrollBar->width(); - QRect rect = QRect( 0, 0, wrapWidth - 20, -1 ); + TQRect rect = TQRect( 0, 0, wrapWidth - 20, -1 ); KWordWrap *wrap = KWordWrap::formatText( fm, rect, 0, m_origText ); setText( c, wrap->wrappedString() ); - int lc = text(c).contains( QChar( '\n' ) ) + 1; + int lc = text(c).contains( TQChar( '\n' ) ) + 1; setHeight( wrap->boundingRect().height() + lc*lv->itemMargin() ); widthChanged( c ); @@ -91,11 +91,11 @@ void KWrappedListViewItem::wrapColumn( int c ) delete wrap; } -void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 ) +void KWrappedListViewItem::init( TQListView *parent, TQString text, TQString t2 ) { m_wrapColumn = 0; setMultiLinesEnabled( true ); - parent->setResizeMode( QListView::LastColumn ); + parent->setResizeMode( TQListView::LastColumn ); m_origText = text; @@ -110,7 +110,7 @@ void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 ) wrapColumn( m_wrapColumn ); - connect( parent->header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(wrapColumn(int))); + connect( parent->header(), TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(wrapColumn(int))); } #include "kwrappedlistviewitem.moc" diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.h b/atlantik/libatlantikui/kwrappedlistviewitem.h index 056cef6d..ceda1afe 100644 --- a/atlantik/libatlantikui/kwrappedlistviewitem.h +++ b/atlantik/libatlantikui/kwrappedlistviewitem.h @@ -25,29 +25,29 @@ #ifndef KWRAPPEDLISTVIEWITEM_H #define KWRAPPEDLISTVIEWITEM_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <klistview.h> class KWordWrap; -class KWrappedListViewItem : public QObject, public KListViewItem +class KWrappedListViewItem : public TQObject, public KListViewItem { Q_OBJECT public: - KWrappedListViewItem( QListView *parent, QString text, QString=QString::null ); - KWrappedListViewItem( QListView *parent, QListViewItem *after, QString text, QString=QString::null ); + KWrappedListViewItem( TQListView *parent, TQString text, QString=TQString::null ); + KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, QString=TQString::null ); void setup(); -// int width(const QFontMetrics& fm, const QListView* lv, int c) const; +// int width(const TQFontMetrics& fm, const TQListView* lv, int c) const; private slots: void wrapColumn( int c ); private: - void init( QListView *parent, QString text, QString=QString::null ); - QString m_origText; + void init( TQListView *parent, TQString text, QString=TQString::null ); + TQString m_origText; int m_wrapColumn; }; diff --git a/atlantik/libatlantikui/portfolioestate.cpp b/atlantik/libatlantikui/portfolioestate.cpp index 625fb055..3bfed677 100644 --- a/atlantik/libatlantikui/portfolioestate.cpp +++ b/atlantik/libatlantikui/portfolioestate.cpp @@ -14,20 +14,20 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qcolor.h> -#include <qpainter.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqrect.h> #include "portfolioestate.moc" #include "estate.h" -PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, QWidget *parent, const char *name) : QWidget(parent, name) +PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_estate = estate; m_player = player; m_alwaysOwned = alwaysOwned; - QSize s(PE_WIDTH, PE_HEIGHT); + TQSize s(PE_WIDTH, PE_HEIGHT); setFixedSize(s); b_recreate = true; @@ -39,16 +39,16 @@ void PortfolioEstate::estateChanged() update(); } -QPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysOwned) +TQPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysOwned) { - QColor lightGray(204, 204, 204), darkGray(153, 153, 153); - QPixmap qpixmap(PE_WIDTH, PE_HEIGHT); - QPainter painter; + TQColor lightGray(204, 204, 204), darkGray(153, 153, 153); + TQPixmap qpixmap(PE_WIDTH, PE_HEIGHT); + TQPainter painter; painter.begin(&qpixmap); painter.setPen(lightGray); painter.setBrush(white); - painter.drawRect(QRect(0, 0, PE_WIDTH, PE_HEIGHT)); + painter.drawRect(TQRect(0, 0, PE_WIDTH, PE_HEIGHT)); if (alwaysOwned || (estate && estate->isOwned() && player == estate->owner())) { painter.setPen(darkGray); @@ -77,7 +77,7 @@ QPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysO return qpixmap; } -void PortfolioEstate::paintEvent(QPaintEvent *) +void PortfolioEstate::paintEvent(TQPaintEvent *) { if (b_recreate) { @@ -87,7 +87,7 @@ void PortfolioEstate::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, &m_pixmap); } -void PortfolioEstate::mousePressEvent(QMouseEvent *e) +void PortfolioEstate::mousePressEvent(TQMouseEvent *e) { if (e->button()==LeftButton) emit estateClicked(m_estate); diff --git a/atlantik/libatlantikui/portfolioestate.h b/atlantik/libatlantikui/portfolioestate.h index 65bd5db3..fb1dc8d3 100644 --- a/atlantik/libatlantikui/portfolioestate.h +++ b/atlantik/libatlantikui/portfolioestate.h @@ -17,8 +17,8 @@ #ifndef ATLANTIK_PORTFOLIOESTATE_H #define ATLANTIK_PORTFOLIOESTATE_H -#include <qpixmap.h> -#include <qwidget.h> +#include <tqpixmap.h> +#include <tqwidget.h> #define PE_WIDTH 13 #define PE_HEIGHT 16 @@ -31,13 +31,13 @@ class PortfolioEstate : public QWidget Q_OBJECT public: - PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, QWidget *parent, const char *name = 0); + PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name = 0); Estate *estate() { return m_estate; } - static QPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true); + static TQPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true); protected: - void paintEvent(QPaintEvent *); - void mousePressEvent(QMouseEvent *); + void paintEvent(TQPaintEvent *); + void mousePressEvent(TQMouseEvent *); private slots: void estateChanged(); @@ -48,7 +48,7 @@ signals: private: Estate *m_estate; Player *m_player; - QPixmap m_pixmap; + TQPixmap m_pixmap; bool b_recreate, m_alwaysOwned; }; diff --git a/atlantik/libatlantikui/portfolioview.cpp b/atlantik/libatlantikui/portfolioview.cpp index c07d426b..6725cbca 100644 --- a/atlantik/libatlantikui/portfolioview.cpp +++ b/atlantik/libatlantikui/portfolioview.cpp @@ -14,8 +14,8 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qpainter.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqcursor.h> #include <kdebug.h> #include <kdialogbase.h> @@ -40,7 +40,7 @@ #define PE_MARGINH 2 #define ICONSIZE 48 -PortfolioView::PortfolioView(AtlanticCore *core, Player *player, QColor activeColor, QColor inactiveColor, QWidget *parent, const char *name) : QWidget(parent, name) +PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = core; m_player = player; @@ -79,14 +79,14 @@ void PortfolioView::buildPortfolio() clearPortfolio(); // Loop through estate groups in order - QPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups(); + TQPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups(); PortfolioEstate *lastPE = 0, *firstPEprevGroup = 0; int x = 100, y = 25, marginHint = 5, bottom; bottom = ICONSIZE - PE_HEIGHT - marginHint; EstateGroup *estateGroup; - for (QPtrListIterator<EstateGroup> it(estateGroups); *it; ++it) + for (TQPtrListIterator<EstateGroup> it(estateGroups); *it; ++it) { if ((estateGroup = *it)) { @@ -94,9 +94,9 @@ void PortfolioView::buildPortfolio() lastPE = 0; // Loop through estates - QPtrList<Estate> estates = m_atlanticCore->estates(); + TQPtrList<Estate> estates = m_atlanticCore->estates(); Estate *estate; - for (QPtrListIterator<Estate> it(estates); *it; ++it) + for (TQPtrListIterator<Estate> it(estates); *it; ++it) { if ((estate = *it) && estate->estateGroup() == estateGroup) { @@ -104,7 +104,7 @@ void PortfolioView::buildPortfolio() PortfolioEstate *portfolioEstate = new PortfolioEstate(estate, m_player, false, this, "portfolioestate"); m_portfolioEstates.append(portfolioEstate); - connect(portfolioEstate, SIGNAL(estateClicked(Estate *)), this, SIGNAL(estateClicked(Estate *))); + connect(portfolioEstate, TQT_SIGNAL(estateClicked(Estate *)), this, TQT_SIGNAL(estateClicked(Estate *))); if (lastPE) { x = lastPE->x() + 2; @@ -130,7 +130,7 @@ void PortfolioView::buildPortfolio() portfolioEstate->setGeometry(x, y, portfolioEstate->width(), portfolioEstate->height()); portfolioEstate->show(); - connect(estate, SIGNAL(changed()), portfolioEstate, SLOT(estateChanged())); + connect(estate, TQT_SIGNAL(changed()), portfolioEstate, TQT_SLOT(estateChanged())); lastPE = portfolioEstate; } @@ -159,9 +159,9 @@ void PortfolioView::loadIcon() if (!m_imageName.isEmpty()) { - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); } if (!m_image) @@ -171,31 +171,31 @@ void PortfolioView::loadIcon() /* m_imageName = "hamburger.png"; - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); */ } else if (ICONSIZE > minimumHeight()) setMinimumHeight(ICONSIZE); - QWMatrix m; + TQWMatrix m; m.scale(double(ICONSIZE) / m_image->width(), double(ICONSIZE) / m_image->height()); - QPixmap *scaledPixmap = new QPixmap(ICONSIZE, ICONSIZE); + TQPixmap *scaledPixmap = new TQPixmap(ICONSIZE, ICONSIZE); *scaledPixmap = m_image->xForm(m); delete m_image; m_image = scaledPixmap; } -void PortfolioView::paintEvent(QPaintEvent *) +void PortfolioView::paintEvent(TQPaintEvent *) { if (b_recreate) { delete qpixmap; - qpixmap = new QPixmap(width(), height()); + qpixmap = new TQPixmap(width(), height()); - QPainter painter; + TQPainter painter; painter.begin(qpixmap, this); painter.setPen(Qt::white); @@ -216,17 +216,17 @@ void PortfolioView::paintEvent(QPaintEvent *) } painter.setPen(Qt::white); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Bold)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Bold)); painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name()); if ( m_portfolioEstates.count() ) - painter.drawText(width() - 50, 15, QString::number(m_player->money())); + painter.drawText(width() - 50, 15, TQString::number(m_player->money())); else { painter.setPen(Qt::black); painter.setBrush(Qt::white); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal)); painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host()); } @@ -235,7 +235,7 @@ void PortfolioView::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, qpixmap); } -void PortfolioView::resizeEvent(QResizeEvent *) +void PortfolioView::resizeEvent(TQResizeEvent *) { b_recreate = true; } @@ -248,7 +248,7 @@ void PortfolioView::playerChanged() update(); } -void PortfolioView::mousePressEvent(QMouseEvent *e) +void PortfolioView::mousePressEvent(TQMouseEvent *e) { Player *playerSelf = m_atlanticCore->playerSelf(); @@ -269,8 +269,8 @@ void PortfolioView::mousePressEvent(QMouseEvent *e) rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() ); } - connect(rmbMenu, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int))); - QPoint g = QCursor::pos(); + connect(rmbMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int))); + TQPoint g = TQCursor::pos(); rmbMenu->exec(g); } } diff --git a/atlantik/libatlantikui/portfolioview.h b/atlantik/libatlantikui/portfolioview.h index 26317e2b..d1443a3e 100644 --- a/atlantik/libatlantikui/portfolioview.h +++ b/atlantik/libatlantikui/portfolioview.h @@ -17,9 +17,9 @@ #ifndef ATLANTIK_PORTFOLIOVIEW_H #define ATLANTIK_PORTFOLIOVIEW_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqptrlist.h> #include "portfolioestate.h" #include "libatlantikui_export.h" @@ -35,7 +35,7 @@ class LIBATLANTIKUI_EXPORT PortfolioView : public QWidget Q_OBJECT public: - PortfolioView(AtlanticCore *core, Player *_player, QColor activeColor, QColor inactiveColor, QWidget *parent, const char *name = 0); + PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name = 0); ~PortfolioView(); void buildPortfolio(); @@ -44,9 +44,9 @@ public: Player *player(); protected: - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); - void mousePressEvent(QMouseEvent *); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); + void mousePressEvent(TQMouseEvent *); signals: void newTrade(Player *player); @@ -63,11 +63,11 @@ private: AtlanticCore *m_atlanticCore; Player *m_player; PortfolioEstate *m_lastPE; - QColor m_activeColor, m_inactiveColor; - QPixmap *qpixmap, *m_image; - QString m_imageName; + TQColor m_activeColor, m_inactiveColor; + TQPixmap *qpixmap, *m_image; + TQString m_imageName; bool b_recreate; - QPtrList<PortfolioEstate> m_portfolioEstates; + TQPtrList<PortfolioEstate> m_portfolioEstates; }; #endif diff --git a/atlantik/libatlantikui/token.cpp b/atlantik/libatlantikui/token.cpp index 6f13333f..c77aeadb 100644 --- a/atlantik/libatlantikui/token.cpp +++ b/atlantik/libatlantikui/token.cpp @@ -16,9 +16,9 @@ #include <iostream> -#include <qpainter.h> -#include <qpixmap.h> -#include <qfont.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqfont.h> #include <kdebug.h> @@ -33,14 +33,14 @@ #define TOKEN_ICONSIZE 32 -Token::Token(Player *player, AtlantikBoard *parent, const char *name) : QWidget(parent, name) +Token::Token(Player *player, AtlantikBoard *parent, const char *name) : TQWidget(parent, name) { setBackgroundMode(NoBackground); // avoid flickering m_parentBoard = parent; m_player = player; - connect(m_player, SIGNAL(changed(Player *)), this, SLOT(playerChanged())); + connect(m_player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged())); m_inJail = m_player->inJail(); m_location = m_player->location(); @@ -53,7 +53,7 @@ Token::Token(Player *player, AtlantikBoard *parent, const char *name) : QWidget( m_image = 0; loadIcon(); - setFixedSize(QSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + KGlobalSettings::generalFont().pointSize())); + setFixedSize(TQSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + KGlobalSettings::generalFont().pointSize())); } Token::~Token() @@ -96,37 +96,37 @@ void Token::loadIcon() if (!m_imageName.isEmpty()) { - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); } if (!m_image) { m_imageName = "hamburger.png"; - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); } - QWMatrix m; + TQWMatrix m; m.scale(double(TOKEN_ICONSIZE) / m_image->width(), double(TOKEN_ICONSIZE) / m_image->height()); - QPixmap *scaledPixmap = new QPixmap(TOKEN_ICONSIZE, TOKEN_ICONSIZE); + TQPixmap *scaledPixmap = new TQPixmap(TOKEN_ICONSIZE, TOKEN_ICONSIZE); *scaledPixmap = m_image->xForm(m); delete m_image; m_image = scaledPixmap; } -void Token::paintEvent(QPaintEvent *) +void Token::paintEvent(TQPaintEvent *) { if (b_recreate) { delete qpixmap; - qpixmap = new QPixmap(width(), height()); + qpixmap = new TQPixmap(width(), height()); - QPainter painter; + TQPainter painter; painter.begin(qpixmap, this); if (m_image) @@ -143,15 +143,15 @@ void Token::paintEvent(QPaintEvent *) painter.drawRect(0, TOKEN_ICONSIZE, width(), KGlobalSettings::generalFont().pointSize()); painter.setPen(Qt::white); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::DemiBold)); - painter.drawText(1, height()-1, (m_player ? m_player->name() : QString::null)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::DemiBold)); + painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString::null)); b_recreate = false; } bitBlt(this, 0, 0, qpixmap); } -void Token::resizeEvent(QResizeEvent *) +void Token::resizeEvent(TQResizeEvent *) { b_recreate = true; } diff --git a/atlantik/libatlantikui/token.h b/atlantik/libatlantikui/token.h index f0e52f2b..81408501 100644 --- a/atlantik/libatlantikui/token.h +++ b/atlantik/libatlantikui/token.h @@ -17,7 +17,7 @@ #ifndef ATLANTIK_TOKEN_H #define ATLANTIK_TOKEN_H -#include <qwidget.h> +#include <tqwidget.h> class QPixmap; @@ -44,8 +44,8 @@ Q_OBJECT void playerChanged(); protected: - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); private: void loadIcon(); @@ -55,8 +55,8 @@ private: bool m_inJail; AtlantikBoard *m_parentBoard; bool b_recreate; - QPixmap *qpixmap, *m_image; - QString m_imageName; + TQPixmap *qpixmap, *m_image; + TQString m_imageName; }; #endif diff --git a/atlantik/libatlantikui/trade_widget.cpp b/atlantik/libatlantikui/trade_widget.cpp index b2658abb..be8b2749 100644 --- a/atlantik/libatlantikui/trade_widget.cpp +++ b/atlantik/libatlantikui/trade_widget.cpp @@ -16,15 +16,15 @@ #include <iostream> -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qheader.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qvalidator.h> -#include <qmap.h> -#include <qlabel.h> -#include <qspinbox.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqheader.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqvalidator.h> +#include <tqmap.h> +#include <tqlabel.h> +#include <tqspinbox.h> #include <klocale.h> #include <klistview.h> @@ -44,8 +44,8 @@ #include "trade_widget.moc" -TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *parent, const char *name) - : QWidget(parent, name, +TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent, const char *name) + : TQWidget(parent, name, WType_Dialog | WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_Minimize | WStyle_ContextHelp ) { @@ -54,21 +54,21 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa setCaption(i18n("Trade %1").arg(trade->tradeId())); - QVBoxLayout *listCompBox = new QVBoxLayout(this, KDialog::marginHint()); + TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint()); - m_updateComponentBox = new QHGroupBox(i18n("Add Component"), this); + m_updateComponentBox = new TQHGroupBox(i18n("Add Component"), this); listCompBox->addWidget(m_updateComponentBox); m_editTypeCombo = new KComboBox(m_updateComponentBox); m_editTypeCombo->insertItem(i18n("Estate")); m_editTypeCombo->insertItem(i18n("Money")); - connect(m_editTypeCombo, SIGNAL(activated(int)), this, SLOT(setTypeCombo(int))); + connect(m_editTypeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTypeCombo(int))); m_estateCombo = new KComboBox(m_updateComponentBox); - QPtrList<Estate> estateList = m_atlanticCore->estates(); + TQPtrList<Estate> estateList = m_atlanticCore->estates(); Estate *estate; - for (QPtrListIterator<Estate> it(estateList); *it; ++it) + for (TQPtrListIterator<Estate> it(estateList); *it; ++it) { if ((estate = *it) && estate->isOwned()) { @@ -78,22 +78,22 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa } } - connect(m_estateCombo, SIGNAL(activated(int)), this, SLOT(setEstateCombo(int))); + connect(m_estateCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setEstateCombo(int))); - m_moneyBox = new QSpinBox(0, 10000, 1, m_updateComponentBox); + m_moneyBox = new TQSpinBox(0, 10000, 1, m_updateComponentBox); - QPtrList<Player> playerList = m_atlanticCore->players(); + TQPtrList<Player> playerList = m_atlanticCore->players(); Player *player, *pSelf = m_atlanticCore->playerSelf(); - m_fromLabel = new QLabel(m_updateComponentBox); + m_fromLabel = new TQLabel(m_updateComponentBox); m_fromLabel->setText(i18n("From")); m_playerFromCombo = new KComboBox(m_updateComponentBox); - m_toLabel = new QLabel(m_updateComponentBox); + m_toLabel = new TQLabel(m_updateComponentBox); m_toLabel->setText(i18n("To")); m_playerTargetCombo = new KComboBox(m_updateComponentBox); - for (QPtrListIterator<Player> it(playerList); *it; ++it) + for (TQPtrListIterator<Player> it(playerList); *it; ++it) { if ((player = *it) && player->game() == pSelf->game()) { @@ -105,14 +105,14 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa m_playerTargetMap[m_playerTargetCombo->count() - 1] = player; m_playerTargetRevMap[player] = m_playerTargetCombo->count() - 1; - connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *))); + connect(player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *))); } } m_updateButton = new KPushButton(i18n("Update"), m_updateComponentBox); m_updateButton->setEnabled(false); - connect(m_updateButton, SIGNAL(clicked()), this, SLOT(updateComponent())); + connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateComponent())); m_componentList = new KListView(this, "componentList"); listCompBox->addWidget(m_componentList); @@ -122,26 +122,26 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa m_componentList->addColumn(i18n("Player")); m_componentList->addColumn(i18n("Item")); - connect(m_componentList, SIGNAL(contextMenu(KListView*, QListViewItem *, const QPoint&)), SLOT(contextMenu(KListView *, QListViewItem *, const QPoint&))); - connect(m_componentList, SIGNAL(clicked(QListViewItem *)), this, SLOT(setCombos(QListViewItem *))); + connect(m_componentList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem *, const TQPoint&)), TQT_SLOT(contextMenu(KListView *, TQListViewItem *, const TQPoint&))); + connect(m_componentList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(setCombos(TQListViewItem *))); - QHBoxLayout *actionBox = new QHBoxLayout(this, 0, KDialog::spacingHint()); + TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint()); listCompBox->addItem(actionBox); - actionBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + actionBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); m_rejectButton = new KPushButton(BarIcon("cancel", KIcon::SizeSmall), i18n("Reject"), this); actionBox->addWidget(m_rejectButton); - connect(m_rejectButton, SIGNAL(clicked()), this, SLOT(reject())); + connect(m_rejectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); m_acceptButton = new KPushButton(BarIcon("ok", KIcon::SizeSmall), i18n("Accept"), this); // m_acceptButton->setEnabled(false); actionBox->addWidget(m_acceptButton); - connect(m_acceptButton, SIGNAL(clicked()), this, SLOT(accept())); + connect(m_acceptButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); - m_status = new QLabel(this); + m_status = new TQLabel(this); listCompBox->addWidget(m_status); m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).arg( m_trade->count( true ) ).arg( m_trade->count( false ) ) ); @@ -149,14 +149,14 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa // mPlayerList->setRootIsDecorated(true); // mPlayerList->setResizeMode(KListView::AllColumns); - connect(m_trade, SIGNAL(itemAdded(TradeItem *)), this, SLOT(tradeItemAdded(TradeItem *))); - connect(m_trade, SIGNAL(itemRemoved(TradeItem *)), this, SLOT(tradeItemRemoved(TradeItem *))); - connect(m_trade, SIGNAL(changed(Trade *)), this, SLOT(tradeChanged())); - connect(m_trade, SIGNAL(rejected(Player *)), this, SLOT(tradeRejected(Player *))); - connect(this, SIGNAL(updateEstate(Trade *, Estate *, Player *)), m_trade, SIGNAL(updateEstate(Trade *, Estate *, Player *))); - connect(this, SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), m_trade, SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *))); - connect(this, SIGNAL(reject(Trade *)), m_trade, SIGNAL(reject(Trade *))); - connect(this, SIGNAL(accept(Trade *)), m_trade, SIGNAL(accept(Trade *))); + connect(m_trade, TQT_SIGNAL(itemAdded(TradeItem *)), this, TQT_SLOT(tradeItemAdded(TradeItem *))); + connect(m_trade, TQT_SIGNAL(itemRemoved(TradeItem *)), this, TQT_SLOT(tradeItemRemoved(TradeItem *))); + connect(m_trade, TQT_SIGNAL(changed(Trade *)), this, TQT_SLOT(tradeChanged())); + connect(m_trade, TQT_SIGNAL(rejected(Player *)), this, TQT_SLOT(tradeRejected(Player *))); + connect(this, TQT_SIGNAL(updateEstate(Trade *, Estate *, Player *)), m_trade, TQT_SIGNAL(updateEstate(Trade *, Estate *, Player *))); + connect(this, TQT_SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), m_trade, TQT_SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *))); + connect(this, TQT_SIGNAL(reject(Trade *)), m_trade, TQT_SIGNAL(reject(Trade *))); + connect(this, TQT_SIGNAL(accept(Trade *)), m_trade, TQT_SIGNAL(accept(Trade *))); setTypeCombo(m_editTypeCombo->currentItem()); setEstateCombo(m_estateCombo->currentItem()); @@ -164,7 +164,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa m_contextTradeItem = 0; } -void TradeDisplay::closeEvent(QCloseEvent *e) +void TradeDisplay::closeEvent(TQCloseEvent *e) { // Don't send network event when trade is already rejected if (m_trade->isRejected()) @@ -177,11 +177,11 @@ void TradeDisplay::closeEvent(QCloseEvent *e) void TradeDisplay::tradeItemAdded(TradeItem *tradeItem) { - KListViewItem *item = new KListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : QString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : QString("?")), tradeItem->text()); - connect(tradeItem, SIGNAL(changed(TradeItem *)), this, SLOT(tradeItemChanged(TradeItem *))); + KListViewItem *item = new KListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : TQString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : TQString("?")), tradeItem->text()); + connect(tradeItem, TQT_SIGNAL(changed(TradeItem *)), this, TQT_SLOT(tradeItemChanged(TradeItem *))); - item->setPixmap(0, QPixmap(SmallIcon("personal"))); - item->setPixmap(2, QPixmap(SmallIcon("personal"))); + item->setPixmap(0, TQPixmap(SmallIcon("personal"))); + item->setPixmap(2, TQPixmap(SmallIcon("personal"))); if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(tradeItem)) item->setPixmap(3, PortfolioEstate::drawPixmap(tradeEstate->estate())); @@ -204,10 +204,10 @@ void TradeDisplay::tradeItemChanged(TradeItem *t) KListViewItem *item = m_componentMap[t]; if (item) { - item->setText(0, t->from() ? t->from()->name() : QString("?")); - item->setPixmap(0, QPixmap(SmallIcon("personal"))); - item->setText(2, t->to() ? t->to()->name() : QString("?")); - item->setPixmap(2, QPixmap(SmallIcon("personal"))); + item->setText(0, t->from() ? t->from()->name() : TQString("?")); + item->setPixmap(0, TQPixmap(SmallIcon("personal"))); + item->setText(2, t->to() ? t->to()->name() : TQString("?")); + item->setPixmap(2, TQPixmap(SmallIcon("personal"))); item->setText(3, t->text()); } } @@ -225,7 +225,7 @@ void TradeDisplay::playerChanged(Player *player) m_playerTargetCombo->changeItem(player->name(), m_playerTargetRevMap[player]); TradeItem *item = 0; - for (QMap<KListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it) + for (TQMap<KListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it) tradeItemChanged(item); } @@ -291,7 +291,7 @@ void TradeDisplay::setEstateCombo(int index) m_playerFromCombo->setCurrentItem( m_playerFromRevMap[estate->owner()] ); } -void TradeDisplay::setCombos(QListViewItem *i) +void TradeDisplay::setCombos(TQListViewItem *i) { TradeItem *item = m_componentRevMap[(KListViewItem *)(i)]; if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(item)) @@ -348,7 +348,7 @@ void TradeDisplay::accept() emit accept(m_trade); } -void TradeDisplay::contextMenu(KListView *, QListViewItem *i, const QPoint& p) +void TradeDisplay::contextMenu(KListView *, TQListViewItem *i, const TQPoint& p) { m_contextTradeItem = m_componentRevMap[(KListViewItem *)(i)]; @@ -356,7 +356,7 @@ void TradeDisplay::contextMenu(KListView *, QListViewItem *i, const QPoint& p) // rmbMenu->insertTitle( ... ); rmbMenu->insertItem(i18n("Remove From Trade"), 0); - connect(rmbMenu, SIGNAL(activated(int)), this, SLOT(contextMenuClicked(int))); + connect(rmbMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(contextMenuClicked(int))); rmbMenu->exec(p); } diff --git a/atlantik/libatlantikui/trade_widget.h b/atlantik/libatlantikui/trade_widget.h index 642cc919..5c0e0ff7 100644 --- a/atlantik/libatlantikui/trade_widget.h +++ b/atlantik/libatlantikui/trade_widget.h @@ -17,8 +17,8 @@ #ifndef TRADEWIDGET_H #define TRADEWIDGET_H -#include <qwidget.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqmap.h> #include "libatlantikui_export.h" class QHGroupBox; @@ -41,12 +41,12 @@ class LIBATLANTIKUI_EXPORT TradeDisplay : public QWidget Q_OBJECT public: - TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *parent=0, const char *name = 0); + TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent=0, const char *name = 0); Trade *trade() { return mTrade; } protected: - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); private slots: void tradeItemAdded(TradeItem *); @@ -58,13 +58,13 @@ private slots: void setTypeCombo(int); void setEstateCombo(int); - void setCombos(QListViewItem *i); + void setCombos(TQListViewItem *i); void updateComponent(); void reject(); void accept(); - void contextMenu(KListView *l, QListViewItem *i, const QPoint& p); + void contextMenu(KListView *l, TQListViewItem *i, const TQPoint& p); void contextMenuClicked(int item); signals: @@ -74,9 +74,9 @@ signals: void accept(Trade *trade); private: - QHGroupBox *m_updateComponentBox; - QLabel *m_status, *m_fromLabel, *m_toLabel; - QSpinBox *m_moneyBox; + TQHGroupBox *m_updateComponentBox; + TQLabel *m_status, *m_fromLabel, *m_toLabel; + TQSpinBox *m_moneyBox; KComboBox *m_editTypeCombo, *m_playerFromCombo, *m_playerTargetCombo, *m_estateCombo; KListView *m_componentList; @@ -87,12 +87,12 @@ private: TradeItem *m_contextTradeItem; // TODO: Wouldn't QPair make more sense here? - QMap<TradeItem *, KListViewItem *> m_componentMap; - QMap<KListViewItem *, TradeItem *> m_componentRevMap; - QMap<int, Estate *> m_estateMap; - QMap<Estate *, int> m_estateRevMap; - QMap<int, Player *> m_playerFromMap, m_playerTargetMap; - QMap<Player *, int> m_playerFromRevMap, m_playerTargetRevMap; + TQMap<TradeItem *, KListViewItem *> m_componentMap; + TQMap<KListViewItem *, TradeItem *> m_componentRevMap; + TQMap<int, Estate *> m_estateMap; + TQMap<Estate *, int> m_estateRevMap; + TQMap<int, Player *> m_playerFromMap, m_playerTargetMap; + TQMap<Player *, int> m_playerFromRevMap, m_playerTargetRevMap; }; #endif |