summaryrefslogtreecommitdiffstats
path: root/kbattleship
diff options
context:
space:
mode:
Diffstat (limited to 'kbattleship')
-rw-r--r--kbattleship/kbattleship/kbattleship.cpp208
-rw-r--r--kbattleship/kbattleship/kbattleshipclient.cpp2
-rw-r--r--kbattleship/kbattleship/kbattleshipserver.cpp4
-rw-r--r--kbattleship/kbattleship/kchatwidget.cpp4
-rw-r--r--kbattleship/kbattleship/kclientdialog.cpp8
-rw-r--r--kbattleship/kbattleship/konnectionhandling.cpp36
6 files changed, 131 insertions, 131 deletions
diff --git a/kbattleship/kbattleship/kbattleship.cpp b/kbattleship/kbattleship/kbattleship.cpp
index e2193cb2..2db6be26 100644
--- a/kbattleship/kbattleship/kbattleship.cpp
+++ b/kbattleship/kbattleship/kbattleship.cpp
@@ -92,16 +92,16 @@ void KBattleshipWindow::initStatusBar()
void KBattleshipWindow::initActions()
{
- KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), actionCollection());
- m_gameServerConnect = new TDEAction(i18n("&Connect to Server..."), "connect_no", Key_F2, this, TQT_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect");
- m_gameNewServer = new TDEAction(i18n("&Start Server..."), "network", Key_F3, this, TQT_SLOT(slotNewServer()), actionCollection(), "game_newserver");
- m_gameSingle = new TDEAction(i18n("S&ingle Player..."), "gear", Key_F4, this, TQT_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer");
- m_gameQuit = KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
- KStdGameAction::highscores(this, TQT_SLOT(slotHighscore()), actionCollection());
- m_gameEnemyInfo = new TDEAction(i18n("&Enemy Info"), "view_text", Key_F11, this, TQT_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo");
+ KStdAction::configureNotifications(this, TQ_SLOT(slotConfigureNotifications()), actionCollection());
+ m_gameServerConnect = new TDEAction(i18n("&Connect to Server..."), "connect_no", Key_F2, this, TQ_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect");
+ m_gameNewServer = new TDEAction(i18n("&Start Server..."), "network", Key_F3, this, TQ_SLOT(slotNewServer()), actionCollection(), "game_newserver");
+ m_gameSingle = new TDEAction(i18n("S&ingle Player..."), "gear", Key_F4, this, TQ_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer");
+ m_gameQuit = KStdGameAction::quit(this, TQ_SLOT(close()), actionCollection());
+ KStdGameAction::highscores(this, TQ_SLOT(slotHighscore()), actionCollection());
+ m_gameEnemyInfo = new TDEAction(i18n("&Enemy Info"), "view_text", Key_F11, this, TQ_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo");
m_configSound = new TDEToggleAction(i18n("&Play Sounds"), 0, actionCollection(), "options_configure_sound");
- m_configGrid = new TDEToggleAction(i18n("&Show Grid"), 0, this, TQT_SLOT(slotShowGrid()), actionCollection(), "options_show_grid");
+ m_configGrid = new TDEToggleAction(i18n("&Show Grid"), 0, this, TQ_SLOT(slotShowGrid()), actionCollection(), "options_show_grid");
m_configGrid->setCheckedState(i18n("Hide Grid"));
m_gameEnemyInfo->setEnabled(false);
@@ -111,9 +111,9 @@ void KBattleshipWindow::initActions()
void KBattleshipWindow::initChat()
{
- connect(m_chat, TQT_SIGNAL(sigSendMessage(const TQString &)), this, TQT_SLOT(slotSendChatMessage(const TQString &)));
- connect(m_chat, TQT_SIGNAL(sigChangeEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_chat, TQT_SIGNAL(sigChangeOwnNickname(const TQString &)), this, TQT_SLOT(slotChangedNickCommand(const TQString &)));
+ connect(m_chat, TQ_SIGNAL(sigSendMessage(const TQString &)), this, TQ_SLOT(slotSendChatMessage(const TQString &)));
+ connect(m_chat, TQ_SIGNAL(sigChangeEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_chat, TQ_SIGNAL(sigChangeOwnNickname(const TQString &)), this, TQ_SLOT(slotChangedNickCommand(const TQString &)));
}
void KBattleshipWindow::changeShipPlacementDirection(){
@@ -122,8 +122,8 @@ void KBattleshipWindow::changeShipPlacementDirection(){
void KBattleshipWindow::initShipPlacing()
{
- connect(m_ownshiplist, TQT_SIGNAL(sigOwnFieldDataChanged(int, int, int)), this, TQT_SLOT(slotChangeOwnFieldData(int, int, int)));
- connect(m_ownshiplist, TQT_SIGNAL(sigLastShipAdded()), this, TQT_SLOT(slotShipsReady()));
+ connect(m_ownshiplist, TQ_SIGNAL(sigOwnFieldDataChanged(int, int, int)), this, TQ_SLOT(slotChangeOwnFieldData(int, int, int)));
+ connect(m_ownshiplist, TQ_SIGNAL(sigLastShipAdded()), this, TQ_SLOT(slotShipsReady()));
}
void KBattleshipWindow::initView()
@@ -148,10 +148,10 @@ void KBattleshipWindow::initView()
m_view->startDrawing();
setFocusProxy(m_view);
- connect(m_view, TQT_SIGNAL(sigEnemyFieldClicked(int, int)), this, TQT_SLOT(slotEnemyFieldClick(int, int)));
- connect(m_view, TQT_SIGNAL(sigOwnFieldClicked(int, int)), this, TQT_SLOT(slotPlaceShip(int, int)));
- connect(m_view, TQT_SIGNAL(sigMouseOverField(int, int)), this, TQT_SLOT(slotPlaceShipPreview(int, int)));
- connect(m_view, TQT_SIGNAL(changeShipPlacementDirection()), this, TQT_SLOT(changeShipPlacementDirection()));
+ connect(m_view, TQ_SIGNAL(sigEnemyFieldClicked(int, int)), this, TQ_SLOT(slotEnemyFieldClick(int, int)));
+ connect(m_view, TQ_SIGNAL(sigOwnFieldClicked(int, int)), this, TQ_SLOT(slotPlaceShip(int, int)));
+ connect(m_view, TQ_SIGNAL(sigMouseOverField(int, int)), this, TQ_SLOT(slotPlaceShipPreview(int, int)));
+ connect(m_view, TQ_SIGNAL(changeShipPlacementDirection()), this, TQ_SLOT(changeShipPlacementDirection()));
}
void KBattleshipWindow::slotDeleteAI()
@@ -317,11 +317,11 @@ void KBattleshipWindow::slotEnemyFieldClick(int fieldx, int fieldy)
switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"),TQString(),i18n("Restart"),i18n("Do Not Restart")))
{
case KMessageBox::Yes:
- TQTimer::singleShot(0, this, TQT_SLOT(slotRestartAI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotRestartAI()));
break;
case KMessageBox::No:
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotDeleteAI()));
break;
}
return;
@@ -697,8 +697,8 @@ void KBattleshipWindow::slotServerConnect()
slotStatusMsg(i18n("Loading Connect-Server dialog..."));
m_client = new KClientDialog(this);
- connect(m_client, TQT_SIGNAL(sigConnectServer()), this, TQT_SLOT(slotConnectToBattleshipServer()));
- connect(m_client, TQT_SIGNAL(sigCancelConnect()), this, TQT_SLOT(slotDeleteConnectDialog()));
+ connect(m_client, TQ_SIGNAL(sigConnectServer()), this, TQ_SLOT(slotConnectToBattleshipServer()));
+ connect(m_client, TQ_SIGNAL(sigCancelConnect()), this, TQ_SLOT(slotDeleteConnectDialog()));
m_client->show();
slotStatusMsg(i18n("Ready"));
@@ -806,8 +806,8 @@ void KBattleshipWindow::slotNewServer()
slotStatusMsg(i18n("Loading Start-Server dialog..."));
m_server = new TDEServerDialog(this);
- connect(m_server, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotStartBattleshipServer()));
- connect(m_server, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotDeleteServerDialog()));
+ connect(m_server, TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotStartBattleshipServer()));
+ connect(m_server, TQ_SIGNAL(cancelClicked()), this, TQ_SLOT(slotDeleteServerDialog()));
m_server->show();
slotStatusMsg(i18n("Ready"));
@@ -828,7 +828,7 @@ void KBattleshipWindow::slotSendVersion()
msg->versionMessage();
slotSendMessage(msg);
- TQTimer::singleShot(150, this, TQT_SLOT(slotSendGreet()));
+ TQTimer::singleShot(150, this, TQ_SLOT(slotSendGreet()));
}
void KBattleshipWindow::slotSendGreet()
@@ -862,49 +862,49 @@ void KBattleshipWindow::slotStartBattleshipServer()
if(m_connection == 0)
{
m_connection = new KonnectionHandling(this, m_kbserver);
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
- connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigSendNickname()), this, TQ_SLOT(slotSendGreet()));
+ connect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQ_SIGNAL(sigClientLost()), this, TQ_SLOT(slotClientLost()));
+ connect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplayRequest()));
+ connect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ connect(m_connection, TQ_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQ_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
}
else
{
if(m_connection->type() == KonnectionHandling::CLIENT)
{
- disconnect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- disconnect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
- disconnect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ disconnect(m_kbclient, TQ_SIGNAL(sigConnected()), this, TQ_SLOT(slotSendVersion()));
+ disconnect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ disconnect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ disconnect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ disconnect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ disconnect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigServerLost()), this, TQ_SLOT(slotServerLost()));
+ disconnect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplay()));
+ disconnect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
m_connection->updateInternal(m_kbserver);
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
- connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigSendNickname()), this, TQ_SLOT(slotSendGreet()));
+ connect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQ_SIGNAL(sigClientLost()), this, TQ_SLOT(slotClientLost()));
+ connect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplayRequest()));
+ connect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ connect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
}
else
m_connection->updateInternal(m_kbserver);
@@ -1119,51 +1119,51 @@ void KBattleshipWindow::slotConnectToBattleshipServer(const TQString &host, int
if(m_connection == 0)
{
m_connection = new KonnectionHandling(this, m_kbclient);
- connect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
- connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_kbclient, TQ_SIGNAL(sigConnected()), this, TQ_SLOT(slotSendVersion()));
+ connect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigServerLost()), this, TQ_SLOT(slotServerLost()));
+ connect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplay()));
+ connect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ connect(m_connection, TQ_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQ_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
}
else
{
if(m_connection->type() == KonnectionHandling::SERVER)
{
- disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- disconnect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
- disconnect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ disconnect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ disconnect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ disconnect(m_connection, TQ_SIGNAL(sigSendNickname()), this, TQ_SLOT(slotSendGreet()));
+ disconnect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ disconnect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigClientLost()), this, TQ_SLOT(slotClientLost()));
+ disconnect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ disconnect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplayRequest()));
+ disconnect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ disconnect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
m_connection->updateInternal(m_kbclient);
- connect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
- connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
+ connect(m_kbclient, TQ_SIGNAL(sigConnected()), this, TQ_SLOT(slotSendVersion()));
+ connect(m_connection, TQ_SIGNAL(sigAbortNetworkGame()), this, TQ_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyNickname(const TQString &)), this, TQ_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigSendFieldState(int, int)), this, TQ_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQ_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQ_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQ_SIGNAL(sigShootable(bool)), this, TQ_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigPlaceShips(bool)), this, TQ_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQ_SIGNAL(sigServerLost()), this, TQ_SLOT(slotServerLost()));
+ connect(m_connection, TQ_SIGNAL(sigReplay()), this, TQ_SLOT(slotReplay()));
+ connect(m_connection, TQ_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQ_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
m_kbclient->init();
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQ_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQ_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQ_SIGNAL(sigLost(KMessage *)), this, TQ_SLOT(slotLost(KMessage *)));
}
else
m_connection->updateInternal(m_kbclient);
@@ -1234,7 +1234,7 @@ void KBattleshipWindow::slotSinglePlayer()
slotStatusMsg(i18n("Ready"));
m_stat->clear();
m_chat->clear();
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotDeleteAI()));
cleanup(false);
}
}
@@ -1269,8 +1269,8 @@ void KBattleshipWindow::slotStartBattleshipGame(bool clearstat)
{
m_aiPlayer = new KBAIPlayer();
m_aiPlayer->init(m_view->field(), m_enemyshiplist);
- connect(m_aiPlayer, TQT_SIGNAL(sigReady()), this, TQT_SLOT(slotAIReady()));
- connect(m_aiPlayer, TQT_SIGNAL(sigShootAt(const TQPoint)), this, TQT_SLOT(slotAIShootsAt(const TQPoint)));
+ connect(m_aiPlayer, TQ_SIGNAL(sigReady()), this, TQ_SLOT(slotAIReady()));
+ connect(m_aiPlayer, TQ_SIGNAL(sigShootAt(const TQPoint)), this, TQ_SLOT(slotAIShootsAt(const TQPoint)));
}
m_aiPlayer->slotRestart();
}
@@ -1320,11 +1320,11 @@ void KBattleshipWindow::slotAIShootsAt(const TQPoint pos)
switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"), TQString(), i18n("Restart"), i18n("Do Not Restart")))
{
case KMessageBox::Yes:
- TQTimer::singleShot(0, this, TQT_SLOT(slotRestartAI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotRestartAI()));
break;
case KMessageBox::No:
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotDeleteAI()));
break;
}
}
diff --git a/kbattleship/kbattleship/kbattleshipclient.cpp b/kbattleship/kbattleship/kbattleshipclient.cpp
index e7d61638..cad29b29 100644
--- a/kbattleship/kbattleship/kbattleshipclient.cpp
+++ b/kbattleship/kbattleship/kbattleshipclient.cpp
@@ -44,7 +44,7 @@ void KBattleshipClient::init()
}
m_readNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, this);
- TQObject::connect(m_readNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReadData()));
+ TQObject::connect(m_readNotifier, TQ_SIGNAL(activated(int)), TQ_SLOT(slotReadData()));
emit sigConnected();
}
diff --git a/kbattleship/kbattleship/kbattleshipserver.cpp b/kbattleship/kbattleship/kbattleshipserver.cpp
index b05b0f7e..36d3ff70 100644
--- a/kbattleship/kbattleship/kbattleshipserver.cpp
+++ b/kbattleship/kbattleship/kbattleshipserver.cpp
@@ -50,7 +50,7 @@ void KBattleshipServer::init()
m_service.setPort(m_port);
m_service.publishAsync();
m_connectNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, this);
- TQObject::connect(m_connectNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotNewConnection()));
+ TQObject::connect(m_connectNotifier, TQ_SIGNAL(activated(int)), TQ_SLOT(slotNewConnection()));
}
void KBattleshipServer::slotNewConnection()
@@ -62,7 +62,7 @@ void KBattleshipServer::slotNewConnection()
m_service.stop();
m_serverSocket = sock;
m_readNotifier = new TQSocketNotifier(sock->fd(), TQSocketNotifier::Read, this);
- TQObject::connect(m_readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadClient()));
+ TQObject::connect(m_readNotifier, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotReadClient()));
emit sigNewConnect();
}
else
diff --git a/kbattleship/kbattleship/kchatwidget.cpp b/kbattleship/kbattleship/kchatwidget.cpp
index c1925e5d..15449eaf 100644
--- a/kbattleship/kbattleship/kchatwidget.cpp
+++ b/kbattleship/kbattleship/kchatwidget.cpp
@@ -20,8 +20,8 @@
KChatWidget::KChatWidget(TQWidget *parent, const char *name) : chatDlg(parent, name)
{
- connect(sendBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotComputeMessage()));
- connect(commentEdit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotComputeMessage()));
+ connect(sendBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotComputeMessage()));
+ connect(commentEdit, TQ_SIGNAL(returnPressed()), this, TQ_SLOT(slotComputeMessage()));
chatView->setFocusProxy(commentEdit);
chatView->setMinimumSize(0, 50);
commentEdit->installEventFilter(this);
diff --git a/kbattleship/kbattleship/kclientdialog.cpp b/kbattleship/kbattleship/kclientdialog.cpp
index e5a65cf7..022dd60b 100644
--- a/kbattleship/kbattleship/kclientdialog.cpp
+++ b/kbattleship/kbattleship/kclientdialog.cpp
@@ -38,14 +38,14 @@ KClientDialog::KClientDialog(TQWidget *parent, const char *name)
KUser u;
m_mainWidget->nicknameEdit->setText(u.loginName());
- connect(m_mainWidget->serverEdit, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &)));
- connect(m_mainWidget->serverEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckEnableOk()));
+ connect(m_mainWidget->serverEdit, TQ_SIGNAL(returnPressed(const TQString &)), this, TQ_SLOT(slotReturnPressed(const TQString &)));
+ connect(m_mainWidget->serverEdit, TQ_SIGNAL(textChanged(const TQString &)), this, TQ_SLOT(slotCheckEnableOk()));
m_config->setGroup("History");
m_browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(BATTLESHIP_SERVICE));
- connect(m_browser,TQT_SIGNAL(finished()),TQT_SLOT(nextBatch()));
+ connect(m_browser,TQ_SIGNAL(finished()),TQ_SLOT(nextBatch()));
m_browser->startBrowse();
- connect(m_mainWidget->lanBox,TQT_SIGNAL(activated(int)),TQT_SLOT(gameSelected(int)));
+ connect(m_mainWidget->lanBox,TQ_SIGNAL(activated(int)),TQ_SLOT(gameSelected(int)));
m_mainWidget->serverEdit->completionObject()->setItems(m_config->readListEntry("CompletionList"));
m_mainWidget->serverEdit->setMaxCount(5);
diff --git a/kbattleship/kbattleship/konnectionhandling.cpp b/kbattleship/kbattleship/konnectionhandling.cpp
index 5d5c1026..e243a747 100644
--- a/kbattleship/kbattleship/konnectionhandling.cpp
+++ b/kbattleship/kbattleship/konnectionhandling.cpp
@@ -24,11 +24,11 @@ KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipServer *serv
m_kbserver = server;
m_kbclient = 0;
m_type = KonnectionHandling::SERVER;
- connect(server, TQT_SIGNAL(sigServerFailure()), this, TQT_SIGNAL(sigAbortNetworkGame()));
- connect(server, TQT_SIGNAL(sigNewConnect()), this, TQT_SLOT(slotNewClient()));
- connect(server, TQT_SIGNAL(sigEndConnect()), this, TQT_SLOT(slotLostClient()));
- connect(server, TQT_SIGNAL(sigNewMessage(KMessage *)), this, TQT_SLOT(slotNewMessage(KMessage *)));
- connect(server, TQT_SIGNAL(sigMessageSent(KMessage *)), this, TQT_SLOT(slotMessageSent(KMessage *)));
+ connect(server, TQ_SIGNAL(sigServerFailure()), this, TQ_SIGNAL(sigAbortNetworkGame()));
+ connect(server, TQ_SIGNAL(sigNewConnect()), this, TQ_SLOT(slotNewClient()));
+ connect(server, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostClient()));
+ connect(server, TQ_SIGNAL(sigNewMessage(KMessage *)), this, TQ_SLOT(slotNewMessage(KMessage *)));
+ connect(server, TQ_SIGNAL(sigMessageSent(KMessage *)), this, TQ_SLOT(slotMessageSent(KMessage *)));
}
KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipClient *client) : TQObject(parent)
@@ -36,10 +36,10 @@ KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipClient *clie
m_kbclient = client;
m_kbserver = 0;
m_type = KonnectionHandling::CLIENT;
- connect(client, TQT_SIGNAL(sigEndConnect()), this, TQT_SLOT(slotLostServer()));
- connect(client, TQT_SIGNAL(sigSocketFailure(int)), this, TQT_SLOT(slotSocketError(int)));
- connect(client, TQT_SIGNAL(sigNewMessage(KMessage *)), this, TQT_SLOT(slotNewMessage(KMessage *)));
- connect(client, TQT_SIGNAL(sigMessageSent(KMessage *)), this, TQT_SLOT(slotMessageSent(KMessage *)));
+ connect(client, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostServer()));
+ connect(client, TQ_SIGNAL(sigSocketFailure(int)), this, TQ_SLOT(slotSocketError(int)));
+ connect(client, TQ_SIGNAL(sigNewMessage(KMessage *)), this, TQ_SLOT(slotNewMessage(KMessage *)));
+ connect(client, TQ_SIGNAL(sigMessageSent(KMessage *)), this, TQ_SLOT(slotMessageSent(KMessage *)));
}
void KonnectionHandling::updateInternal(KBattleshipServer *server)
@@ -47,11 +47,11 @@ void KonnectionHandling::updateInternal(KBattleshipServer *server)
m_kbserver = server;
m_kbclient = 0;
m_type = KonnectionHandling::SERVER;
- connect(server, TQT_SIGNAL(sigServerFailure()), this, TQT_SIGNAL(sigAbortNetworkGame()));
- connect(server, TQT_SIGNAL(sigNewConnect()), this, TQT_SLOT(slotNewClient()));
- connect(server, TQT_SIGNAL(sigEndConnect()), this, TQT_SLOT(slotLostClient()));
- connect(server, TQT_SIGNAL(sigNewMessage(KMessage *)), this, TQT_SLOT(slotNewMessage(KMessage *)));
- connect(server, TQT_SIGNAL(sigMessageSent(KMessage *)), this, TQT_SLOT(slotMessageSent(KMessage *)));
+ connect(server, TQ_SIGNAL(sigServerFailure()), this, TQ_SIGNAL(sigAbortNetworkGame()));
+ connect(server, TQ_SIGNAL(sigNewConnect()), this, TQ_SLOT(slotNewClient()));
+ connect(server, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostClient()));
+ connect(server, TQ_SIGNAL(sigNewMessage(KMessage *)), this, TQ_SLOT(slotNewMessage(KMessage *)));
+ connect(server, TQ_SIGNAL(sigMessageSent(KMessage *)), this, TQ_SLOT(slotMessageSent(KMessage *)));
}
void KonnectionHandling::updateInternal(KBattleshipClient *client)
@@ -59,10 +59,10 @@ void KonnectionHandling::updateInternal(KBattleshipClient *client)
m_kbclient = client;
m_kbserver = 0;
m_type = KonnectionHandling::CLIENT;
- connect(client, TQT_SIGNAL(sigEndConnect()), this, TQT_SLOT(slotLostServer()));
- connect(client, TQT_SIGNAL(sigSocketFailure(int)), this, TQT_SLOT(slotSocketError(int)));
- connect(client, TQT_SIGNAL(sigNewMessage(KMessage *)), this, TQT_SLOT(slotNewMessage(KMessage *)));
- connect(client, TQT_SIGNAL(sigMessageSent(KMessage *)), this, TQT_SLOT(slotMessageSent(KMessage *)));
+ connect(client, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostServer()));
+ connect(client, TQ_SIGNAL(sigSocketFailure(int)), this, TQ_SLOT(slotSocketError(int)));
+ connect(client, TQ_SIGNAL(sigNewMessage(KMessage *)), this, TQ_SLOT(slotNewMessage(KMessage *)));
+ connect(client, TQ_SIGNAL(sigMessageSent(KMessage *)), this, TQ_SLOT(slotMessageSent(KMessage *)));
}
void KonnectionHandling::slotNewClient()