summaryrefslogtreecommitdiffstats
path: root/kbackgammon/engines/nextgen/kbgng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbackgammon/engines/nextgen/kbgng.cpp')
-rw-r--r--kbackgammon/engines/nextgen/kbgng.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kbackgammon/engines/nextgen/kbgng.cpp b/kbackgammon/engines/nextgen/kbgng.cpp
index 302cbb58..f2f04066 100644
--- a/kbackgammon/engines/nextgen/kbgng.cpp
+++ b/kbackgammon/engines/nextgen/kbgng.cpp
@@ -51,8 +51,8 @@
/*
* Constructor
*/
-KBgEngineNg::KBgEngineNg(TQWidget *parent, TQString *name, TQPopupMenu *pmenu)
- : KBgEngine(parent, name, pmenu)
+KBgEngineNg::KBgEngineNg(TQWidget *tqparent, TQString *name, TQPopupMenu *pmenu)
+ : KBgEngine(tqparent, name, pmenu)
{
// get a new game
initGame();
@@ -124,7 +124,7 @@ void KBgEngineNg::setGame()
// initialize a new game
bool ret = false;
TQString label, port_s, host_s;
- Q_UINT16 port;
+ TQ_UINT16 port;
switch (_currGame = _gameSelect->currentItem()) {
@@ -140,7 +140,7 @@ void KBgEngineNg::setGame()
"65535.");
port_s.setNum(_port);
do {
- port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)parent());
+ port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)tqparent());
if (!ret)
return;
port = port_s.toUShort(&ret);
@@ -150,7 +150,7 @@ void KBgEngineNg::setGame()
emit infoText(i18n("Now waiting for incoming connections on port %1.").
arg(_port = port));
else
- emit infoText(i18n("Failed to offer connections on port %1.").arg(port));
+ emit infoText(i18n("Failed to offer connections on port %1.").tqarg(port));
_game->addPlayer(createPlayer(0, _name[0]));
break;
@@ -159,16 +159,16 @@ void KBgEngineNg::setGame()
label = i18n("Type the name of the server you want to connect to:");
host_s = _host;
do {
- host_s = KLineEditDlg::getText(label, host_s, &ret, (TQWidget *)parent());
+ host_s = KLineEditDlg::getText(label, host_s, &ret, (TQWidget *)tqparent());
if (!ret)
return;
} while (host_s.isEmpty());
label = i18n("Type the port number on %1 you want to connect to.\nThe "
- "number should be between 1024 and 65535.").arg(host_s);
+ "number should be between 1024 and 65535.").tqarg(host_s);
port_s.setNum(_port);
do {
- port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)parent());
+ port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)tqparent());
if (!ret)
return;
port = port_s.toUShort(&ret);
@@ -183,10 +183,10 @@ void KBgEngineNg::setGame()
_game->addPlayer(createPlayer(0, _name[0]));
if (_game->connectToServer(host_s, port))
- emit infoText(i18n("Now connected to %1:%2.").arg(_host = host_s).
+ emit infoText(i18n("Now connected to %1:%2.").tqarg(_host = host_s).
arg(_port = port));
else
- emit infoText(i18n("Failed to connect to %1:%2.").arg(_host = host_s).
+ emit infoText(i18n("Failed to connect to %1:%2.").tqarg(_host = host_s).
arg(_port = port));
// <HERE>
@@ -202,13 +202,13 @@ void KBgEngineNg::setGame()
// we are still having problems with player creation...
- // FIXME - which status _game->setGameStatus(KGame::End);
+ // FIXME - which status _game->setGametqStatus(KGame::End);
}
void KBgEngineNg::slotPlayerJoinedGame(KPlayer *p)
{
- emit infoText(i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id()));
- cerr << i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id()).latin1() << endl;
+ emit infoText(i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id()));
+ cerr << i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id()).latin1() << endl;
}
void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame *g)
@@ -216,16 +216,16 @@ void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame
Q_UNUSED(rtti)
Q_UNUSED(g)
Q_UNUSED(io)
- emit infoText(i18n("creating player. virtual=%1").arg(v));
+ emit infoText(i18n("creating player. virtual=%1").tqarg(v));
p = createPlayer(1);
}
-void KBgEngineNg::slotClientConnected(Q_UINT32)
+void KBgEngineNg::slotClientConnected(TQ_UINT32)
{
cerr << "client has joint the game..." << endl;
}
-void KBgEngineNg::slotClientDisconnected(Q_UINT32, bool)
+void KBgEngineNg::slotClientDisconnected(TQ_UINT32, bool)
{
cerr << "KBgEngineNg::slotClientDisconnected" << endl;
}
@@ -507,7 +507,7 @@ void KBgEngineNg::slotPropertyChanged(KGamePropertyBase *p, KPlayer *me)
case KGamePropertyBase::IdName:
emit infoText(i18n("Player %1 has changed the name to %2.")
- .arg(_name[player]).arg(me->name()));
+ .tqarg(_name[player]).tqarg(me->name()));
_name[player] = me->name();
break;
@@ -542,14 +542,14 @@ void KBgEngineNg::changeName()
TQString name;
for (int i = 0; i < 2; i++) {
- name = TQString::null;
+ name = TQString();
while (!_player[i]->isVirtual() && name.isEmpty()) {
if (i == 0)
name = KLineEditDlg::getText(i18n("Type the name of the first player:"),
- _name[i], &ok, (TQWidget *)parent());
+ _name[i], &ok, (TQWidget *)tqparent());
else
name = KLineEditDlg::getText(i18n("Type the name of the second player:"),
- _name[i], &ok, (TQWidget *)parent());
+ _name[i], &ok, (TQWidget *)tqparent());
if (!ok) return;
_player[i]->setName(name);
}
@@ -559,7 +559,7 @@ void KBgEngineNg::changeName()
/*
* Receive data sent via KBgGame::sendMessage(...)
*/
-void KBgEngineNg::slotNetworkData(int msgid, const TQByteArray &msg, Q_UINT32 r, Q_UINT32 s)
+void KBgEngineNg::slotNetworkData(int msgid, const TQByteArray &msg, TQ_UINT32 r, TQ_UINT32 s)
{
Q_UNUSED(r);
Q_UNUSED(s);
@@ -567,8 +567,8 @@ void KBgEngineNg::slotNetworkData(int msgid, const TQByteArray &msg, Q_UINT32 r,
case KBgGame::Cmd:
emit infoText(msg);
- emit infoText(i18n("Players are %1 and %2").arg(_player[0]->name())
- .arg(_player[1]->name()));
+ emit infoText(i18n("Players are %1 and %2").tqarg(_player[0]->name())
+ .tqarg(_player[1]->name()));
break;
default:
@@ -608,15 +608,15 @@ void KBgEngineNg::initGame()
connect(_game, TQT_SIGNAL(signalCreatePlayer(KPlayer *&, int, int, bool, KGame *)),
this, TQT_SLOT(slotCreatePlayer(KPlayer *&, int, int, bool, KGame *)));
- connect(_game, TQT_SIGNAL(signalClientConnected(Q_UINT32)),
- this, TQT_SLOT(slotClientConnected(Q_UINT32)));
- connect(_game, TQT_SIGNAL(signalClientDisconnected(Q_UINT32, bool)),
- this, TQT_SLOT(slotClientDisconnected(Q_UINT32, bool)));
+ connect(_game, TQT_SIGNAL(signalClientConnected(TQ_UINT32)),
+ this, TQT_SLOT(slotClientConnected(TQ_UINT32)));
+ connect(_game, TQT_SIGNAL(signalClientDisconnected(TQ_UINT32, bool)),
+ this, TQT_SLOT(slotClientDisconnected(TQ_UINT32, bool)));
connect(_game, TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase *, KGame *)),
this, TQT_SLOT(slotPropertyChanged(KGamePropertyBase *, KGame *)));
- connect(_game, TQT_SIGNAL(signalNetworkData(int,const TQByteArray &, Q_UINT32, Q_UINT32)),
- this, TQT_SLOT(slotNetworkData(int,const TQByteArray &, Q_UINT32, Q_UINT32)));
+ connect(_game, TQT_SIGNAL(signalNetworkData(int,const TQByteArray &, TQ_UINT32, TQ_UINT32)),
+ this, TQT_SLOT(slotNetworkData(int,const TQByteArray &, TQ_UINT32, TQ_UINT32)));
}
// EOF