diff options
Diffstat (limited to 'atlantik/client')
-rw-r--r-- | atlantik/client/atlantik.cpp | 228 | ||||
-rw-r--r-- | atlantik/client/atlantik.h | 52 | ||||
-rw-r--r-- | atlantik/client/configdlg.cpp | 90 | ||||
-rw-r--r-- | atlantik/client/configdlg.h | 34 | ||||
-rw-r--r-- | atlantik/client/event.cpp | 12 | ||||
-rw-r--r-- | atlantik/client/event.h | 14 | ||||
-rw-r--r-- | atlantik/client/eventlogwidget.cpp | 48 | ||||
-rw-r--r-- | atlantik/client/eventlogwidget.h | 14 | ||||
-rw-r--r-- | atlantik/client/monopigator.cpp | 46 | ||||
-rw-r--r-- | atlantik/client/monopigator.h | 28 | ||||
-rw-r--r-- | atlantik/client/selectconfiguration_widget.cpp | 64 | ||||
-rw-r--r-- | atlantik/client/selectconfiguration_widget.h | 34 | ||||
-rw-r--r-- | atlantik/client/selectgame_widget.cpp | 66 | ||||
-rw-r--r-- | atlantik/client/selectgame_widget.h | 16 | ||||
-rw-r--r-- | atlantik/client/selectserver_widget.cpp | 62 | ||||
-rw-r--r-- | atlantik/client/selectserver_widget.h | 18 |
16 files changed, 413 insertions, 413 deletions
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; |