diff options
Diffstat (limited to 'atlantik/client/atlantik.cpp')
-rw-r--r-- | atlantik/client/atlantik.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/atlantik/client/atlantik.cpp b/atlantik/client/atlantik.cpp index f1e24645..2ad1bf98 100644 --- a/atlantik/client/atlantik.cpp +++ b/atlantik/client/atlantik.cpp @@ -64,15 +64,15 @@ #include "selectgame_widget.h" #include "selectconfiguration_widget.h" -LogTextEdit::LogTextEdit( TQWidget *parent, const char *name ) : TQTextEdit( parent, name ) +LogTextEdit::LogTextEdit( TQWidget *tqparent, const char *name ) : TQTextEdit( tqparent, name ) { #ifdef KDE_3_2_FEATURES - m_clear = KStdAction::clear( this, TQT_SLOT( clear() ), 0 ); + m_clear = KStdAction::clear( TQT_TQOBJECT(this), TQT_SLOT( clear() ), 0 ); #else - m_clear = new KAction( i18n("Clear"), "clear", NULL, this, TQT_SLOT( clear() ), static_cast<KActionCollection *>(0), "clear" ); + m_clear = new KAction( i18n("Clear"), "clear", NULL, TQT_TQOBJECT(this), TQT_SLOT( clear() ), static_cast<KActionCollection *>(0), "clear" ); #endif - m_selectAll = KStdAction::selectAll( this, TQT_SLOT( selectAll() ), 0 ); - m_copy = KStdAction::copy( this, TQT_SLOT( copy() ), 0 ); + m_selectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), 0 ); + m_copy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), 0 ); } LogTextEdit::~LogTextEdit() @@ -103,12 +103,12 @@ Atlantik::Atlantik () // Toolbar: Game // 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"); + m_showEventLog = new KAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(showEventLog()), actionCollection(), "showeventlog"); + KStdGameAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection(), "game_quit"); // Toolbar: Settings - KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection()); - KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); + KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()), actionCollection()); // Initialize pointers to 0L m_configDialog = 0; @@ -120,37 +120,37 @@ Atlantik::Atlantik () m_atlantikNetwork = 0; // Game and network core - m_atlanticCore = new AtlanticCore(this, "atlanticCore"); - 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 *))); + m_atlanticCore = new AtlanticCore(TQT_TQOBJECT(this), "atlanticCore"); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(Player *)), TQT_TQOBJECT(this), TQT_SLOT(newPlayer(Player *))); + connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Player *)), TQT_TQOBJECT(this), TQT_SLOT(removeGUI(Player *))); + connect(m_atlanticCore, TQT_SIGNAL(createGUI(Trade *)), TQT_TQOBJECT(this), TQT_SLOT(newTrade(Trade *))); + connect(m_atlanticCore, TQT_SIGNAL(removeGUI(Trade *)), TQT_TQOBJECT(this), TQT_SLOT(removeGUI(Trade *))); initEventLog(); initNetworkObject(); // Menu,toolbar: Move - m_roll = KStdGameAction::roll(this, TQT_SIGNAL(rollDice()), actionCollection()); + m_roll = KStdGameAction::roll(TQT_TQOBJECT(this), TQT_SIGNAL(rollDice()), actionCollection()); m_roll->setEnabled(false); - m_buyEstate = new KAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, this, TQT_SIGNAL(buyEstate()), actionCollection(), "buy_estate"); + m_buyEstate = new KAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, TQT_TQOBJECT(this), TQT_SIGNAL(buyEstate()), actionCollection(), "buy_estate"); m_buyEstate->setEnabled(false); - m_auctionEstate = new KAction(i18n("&Auction"), "auction", CTRL+Key_A, this, TQT_SIGNAL(auctionEstate()), actionCollection(), "auction"); + m_auctionEstate = new KAction(i18n("&Auction"), "auction", CTRL+Key_A, TQT_TQOBJECT(this), TQT_SIGNAL(auctionEstate()), actionCollection(), "auction"); m_auctionEstate->setEnabled(false); - m_endTurn = KStdGameAction::endTurn(this, TQT_SIGNAL(endTurn()), actionCollection()); + m_endTurn = KStdGameAction::endTurn(TQT_TQOBJECT(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, TQT_SIGNAL(jailCard()), actionCollection(), "move_jailcard"); + m_jailCard = new KAction(i18n("Use Card to Leave Jail")/*, "atlantik_move_jail_card"*/, 0, TQT_TQOBJECT(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, TQT_SIGNAL(jailPay()), actionCollection(), "move_jailpay"); + m_jailPay = new KAction(i18n("&Pay to Leave Jail"), "jail_pay", CTRL+Key_P, TQT_TQOBJECT(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, TQT_SIGNAL(jailRoll()), actionCollection(), "move_jailroll"); + m_jailRoll = new KAction(i18n("Roll to Leave &Jail")/*, "atlantik_move_jail_roll"*/, CTRL+Key_J, TQT_TQOBJECT(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(TQString::null, 1); - connect(statusBar(), TQT_SIGNAL(released(int)), this, TQT_SLOT(statusBarClick(int))); + KMainWindow::statusBar()->insertItem(TQString(), 1); + connect(statusBar(), TQT_SIGNAL(released(int)), TQT_TQOBJECT(this), TQT_SLOT(statusBarClick(int))); // Main widget, containing all others m_mainWidget = new TQWidget(this, "main"); @@ -158,7 +158,7 @@ Atlantik::Atlantik () m_mainLayout = new TQGridLayout(m_mainWidget, 3, 2); setCentralWidget(m_mainWidget); - // Vertical view area for portfolios. + //Qt::Vertical view area for portfolios. m_portfolioScroll = new TQScrollView(m_mainWidget, "pfScroll"); m_mainLayout->addWidget( m_portfolioScroll, 0, 0 ); m_portfolioScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); @@ -192,7 +192,7 @@ Atlantik::Atlantik () m_serverMsgs->setFocusProxy(m_input); - connect(m_input, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSendMsg())); + connect(m_input, TQT_SIGNAL(returnPressed()), TQT_TQOBJECT(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 @@ -253,8 +253,8 @@ void Atlantik::newPlayer(Player *player) // we'd better force an update. 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 *)), TQT_TQOBJECT(this), TQT_SLOT(playerChanged(Player *))); + connect(player, TQT_SIGNAL(gainedTurn()), TQT_TQOBJECT(this), TQT_SLOT(gainedTurn())); connect(player, TQT_SIGNAL(changed(Player *)), m_board, TQT_SLOT(playerChanged(Player *))); KNotifyClient::event(winId(), "newplayer"); @@ -315,7 +315,7 @@ void Atlantik::showSelectServer() initNetworkObject(); 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 &))); + connect(m_selectServer, TQT_SIGNAL(msgtqStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &))); m_selectServer->slotRefresh( m_config.connectOnStart ); } @@ -356,8 +356,8 @@ void Atlantik::showSelectGame() 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 &))); + connect(m_selectGame, TQT_SIGNAL(leaveServer()), TQT_TQOBJECT(this), TQT_SLOT(showSelectServer())); + connect(m_selectGame, TQT_SIGNAL(msgtqStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &))); } void Atlantik::showSelectConfiguration() @@ -383,7 +383,7 @@ void Atlantik::showSelectConfiguration() 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 &))); + connect(m_selectConfiguration, TQT_SIGNAL(statusMessage(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &))); } void Atlantik::initBoard() @@ -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()), TQString("connect_no") ); + slotMsgtqStatus( i18n("Connection with server %1:%2 lost.").tqarg(m_atlantikNetwork->host()).tqarg(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()), TQString("connect_no") ); + slotMsgtqStatus( i18n("Disconnected from %1:%2.").tqarg(m_atlantikNetwork->host()).tqarg(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, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotUpdateConfig())); + connect(m_configDialog, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateConfig())); } void Atlantik::showEventLog() @@ -612,7 +612,7 @@ void Atlantik::slotUpdateConfig() void Atlantik::slotSendMsg() { m_atlantikNetwork->cmdChat(m_input->text()); - m_input->setText(TQString::null); + m_input->setText(TQString()); } void Atlantik::slotMsgInfo(TQString msg) @@ -625,7 +625,7 @@ void Atlantik::slotMsgError(TQString msg) serverMsgsAppend("Error: " + msg); } -void Atlantik::slotMsgStatus(const TQString &message, const TQString &icon) +void Atlantik::slotMsgtqStatus(const TQString &message, const TQString &icon) { KMainWindow::statusBar()->changeItem(message, 1); m_eventLog->addEvent(message, icon); @@ -636,7 +636,7 @@ void Atlantik::slotMsgChat(TQString player, TQString msg) if (m_config.chatTimestamps) { TQTime time = TQTime::currentTime(); - serverMsgsAppend(TQString("[%1] %2: %3").arg(time.toString("hh:mm")).arg(player).arg(msg)); + serverMsgsAppend(TQString("[%1] %2: %3").tqarg(time.toString("hh:mm")).tqarg(player).tqarg(msg)); } else serverMsgsAppend(player + ": " + msg); @@ -728,26 +728,26 @@ void Atlantik::initNetworkObject() } m_atlantikNetwork = new AtlantikNetwork(m_atlanticCore); - 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, TQT_SIGNAL(msgInfo(TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgInfo(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgError(TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgError(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgtqStatus(const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &, const TQString &))); + connect(m_atlantikNetwork, TQT_SIGNAL(msgChat(TQString, TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgChat(TQString, TQString))); - 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, TQT_SIGNAL(connectionSuccess()), TQT_TQOBJECT(this), TQT_SLOT(slotNetworkConnected())); + connect(m_atlantikNetwork, TQT_SIGNAL(connectionFailed(int)), TQT_TQOBJECT(this), TQT_SLOT(slotNetworkError(int))); + connect(m_atlantikNetwork, TQT_SIGNAL(closed(int)), TQT_TQOBJECT(this), TQT_SLOT(networkClosed(int))); - connect(m_atlantikNetwork, TQT_SIGNAL(receivedHandshake()), this, TQT_SLOT(sendHandshake())); + connect(m_atlantikNetwork, TQT_SIGNAL(receivedHandshake()), TQT_TQOBJECT(this), TQT_SLOT(sendHandshake())); - 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, TQT_SIGNAL(gameConfig()), TQT_TQOBJECT(this), TQT_SLOT(showSelectConfiguration())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameInit()), TQT_TQOBJECT(this), TQT_SLOT(initBoard())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameRun()), TQT_TQOBJECT(this), TQT_SLOT(showBoard())); + connect(m_atlantikNetwork, TQT_SIGNAL(gameEnd()), TQT_TQOBJECT(this), TQT_SLOT(freezeBoard())); - 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, TQT_SIGNAL(newEstate(Estate *)), TQT_TQOBJECT(this), TQT_SLOT(newEstate(Estate *))); + connect(m_atlantikNetwork, TQT_SIGNAL(newAuction(Auction *)), TQT_TQOBJECT(this), TQT_SLOT(newAuction(Auction *))); - connect(m_atlantikNetwork, TQT_SIGNAL(clientCookie(TQString)), this, TQT_SLOT(clientCookie(TQString))); + connect(m_atlantikNetwork, TQT_SIGNAL(clientCookie(TQString)), TQT_TQOBJECT(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, TQT_SIGNAL(rollDice()), m_atlantikNetwork, TQT_SLOT(rollDice())); |