summaryrefslogtreecommitdiffstats
path: root/libkdegames/kgame/kplayer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /libkdegames/kgame/kplayer.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdegames/kgame/kplayer.cpp')
-rw-r--r--libkdegames/kgame/kplayer.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/libkdegames/kgame/kplayer.cpp b/libkdegames/kgame/kplayer.cpp
index 0f8ea184..fdde20d9 100644
--- a/libkdegames/kgame/kplayer.cpp
+++ b/libkdegames/kgame/kplayer.cpp
@@ -31,7 +31,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <stdio.h>
#include <assert.h>
@@ -59,12 +59,12 @@ public:
KGamePropertyQString mGroup;
};
-KPlayer::KPlayer() : QObject(0,0)
+KPlayer::KPlayer() : TQObject(0,0)
{
init();
}
-KPlayer::KPlayer(KGame* game) : QObject(0, 0)
+KPlayer::KPlayer(KGame* game) : TQObject(0, 0)
{
init();
game->addPlayer(this);
@@ -78,8 +78,8 @@ void KPlayer::init()
d = new KPlayerPrivate;
d->mProperties.registerHandler(KGameMessage::IdPlayerProperty,
- this,SLOT(sendProperty(int, QDataStream&, bool*)),
- SLOT(emitSignal(KGamePropertyBase *)));
+ this,TQT_SLOT(sendProperty(int, TQDataStream&, bool*)),
+ TQT_SLOT(emitSignal(KGamePropertyBase *)));
d->mVirtual=false;
mActive=true;
mGame=0;
@@ -125,7 +125,7 @@ KPlayer::~KPlayer()
// kdDebug(11001) << k_funcinfo << " done" << endl;
}
-bool KPlayer::forwardMessage(QDataStream &msg,int msgid,Q_UINT32 receiver,Q_UINT32 sender)
+bool KPlayer::forwardMessage(TQDataStream &msg,int msgid,Q_UINT32 receiver,Q_UINT32 sender)
{
if (!isActive())
{
@@ -139,7 +139,7 @@ bool KPlayer::forwardMessage(QDataStream &msg,int msgid,Q_UINT32 receiver,Q_UINT
return game()->sendSystemMessage(msg,msgid,receiver,sender);
}
-bool KPlayer::forwardInput(QDataStream &msg,bool transmit,Q_UINT32 sender)
+bool KPlayer::forwardInput(TQDataStream &msg,bool transmit,Q_UINT32 sender)
{
if (!isActive())
{
@@ -180,16 +180,16 @@ void KPlayer::setId(Q_UINT32 newid)
}
-void KPlayer::setGroup(const QString& group)
+void KPlayer::setGroup(const TQString& group)
{ d->mGroup = group; }
-const QString& KPlayer::group() const
+const TQString& KPlayer::group() const
{ return d->mGroup.value(); }
-void KPlayer::setName(const QString& name)
+void KPlayer::setName(const TQString& name)
{ d->mName = name; }
-const QString& KPlayer::name() const
+const TQString& KPlayer::name() const
{ return d->mName.value(); }
Q_UINT32 KPlayer::id() const
@@ -258,7 +258,7 @@ bool KPlayer::removeGameIO(KGameIO *targetinput,bool deleteit)
KGameIO * KPlayer::findRttiIO(int rtti) const
{
- QPtrListIterator<KGameIO> it(mInputList);
+ TQPtrListIterator<KGameIO> it(mInputList);
while (it.current())
{
if (it.current()->rtti() == rtti)
@@ -273,7 +273,7 @@ KGameIO * KPlayer::findRttiIO(int rtti) const
int KPlayer::calcIOValue()
{
int value=0;
- QPtrListIterator<KGameIO> it(mInputList);
+ TQPtrListIterator<KGameIO> it(mInputList);
while (it.current())
{
value|=it.current()->rtti();
@@ -311,7 +311,7 @@ bool KPlayer::setTurn(bool b, bool exclusive)
return true;
}
-bool KPlayer::load(QDataStream &stream)
+bool KPlayer::load(TQDataStream &stream)
{
Q_INT32 id,priority;
stream >> id >> priority;
@@ -337,7 +337,7 @@ bool KPlayer::load(QDataStream &stream)
return true;
}
-bool KPlayer::save(QDataStream &stream)
+bool KPlayer::save(TQDataStream &stream)
{
stream << (Q_INT32)id() << (Q_INT32)networkPriority();
@@ -350,7 +350,7 @@ bool KPlayer::save(QDataStream &stream)
}
-void KPlayer::networkTransmission(QDataStream &stream,int msgid,Q_UINT32 sender)
+void KPlayer::networkTransmission(TQDataStream &stream,int msgid,Q_UINT32 sender)
{
//kdDebug(11001) << k_funcinfo ": msgid=" << msgid << " sender=" << sender << " we are=" << id() << endl;
// PlayerProperties processed
@@ -378,7 +378,7 @@ void KPlayer::networkTransmission(QDataStream &stream,int msgid,Q_UINT32 sender)
break;
default:
emit signalNetworkData(msgid - KGameMessage::IdUser,
- ((QBuffer*)stream.device())->readAll(),sender,this);
+ ((TQBuffer*)stream.device())->readAll(),sender,this);
kdDebug(11001) << k_funcinfo << ": "
<< "User data msgid " << msgid << endl;
break;
@@ -396,7 +396,7 @@ bool KPlayer::addProperty(KGamePropertyBase* data)
return d->mProperties.addProperty(data);
}
-void KPlayer::sendProperty(int msgid, QDataStream& stream, bool* sent)
+void KPlayer::sendProperty(int msgid, TQDataStream& stream, bool* sent)
{
if (game())
{
@@ -414,7 +414,7 @@ void KPlayer::emitSignal(KGamePropertyBase *me)
if (me->id()==KGamePropertyBase::IdTurn)
{
//kdDebug(11001) << k_funcinfo << ": for KGamePropertyBase::IdTurn " << endl;
- QPtrListIterator<KGameIO> it(mInputList);
+ TQPtrListIterator<KGameIO> it(mInputList);
while (it.current())
{
it.current()->notifyTurn(mMyTurn.value());