diff options
Diffstat (limited to 'libkdegames/kgame/kgameio.cpp')
-rw-r--r-- | libkdegames/kgame/kgameio.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/libkdegames/kgame/kgameio.cpp b/libkdegames/kgame/kgameio.cpp index 7183d5d3..a408c0cd 100644 --- a/libkdegames/kgame/kgameio.cpp +++ b/libkdegames/kgame/kgameio.cpp @@ -82,7 +82,7 @@ void KGameIO::notifyTurn(bool b) if (sendit) { TQDataStream ostream(buffer,IO_ReadOnly); - Q_UINT32 sender = player()->id(); // force correct sender + TQ_UINT32 sender = player()->id(); // force correct sender kdDebug(11001) << "Prepare turn sendInput" << endl; sendInput(ostream, true, sender); } @@ -97,7 +97,7 @@ KGame* KGameIO::game() const return player()->game(); } -bool KGameIO::sendInput(TQDataStream& s, bool transmit, Q_UINT32 sender) +bool KGameIO::sendInput(TQDataStream& s, bool transmit, TQ_UINT32 sender) { if (!player()) { @@ -117,21 +117,21 @@ void KGameIO::Debug() // ----------------------- Key IO --------------------------- -KGameKeyIO::KGameKeyIO(TQWidget *parent) +KGameKeyIO::KGameKeyIO(TQWidget *tqparent) : KGameIO() { - if (parent) + if (tqparent) { kdDebug(11001) << "Key Event filter installed" << endl; - parent->installEventFilter(this); + tqparent->installEventFilter(this); } } KGameKeyIO::~KGameKeyIO() { - if (parent()) + if (tqparent()) { - parent()->removeEventFilter(this); + tqparent()->removeEventFilter(this); } } @@ -167,22 +167,22 @@ bool KGameKeyIO::eventFilter( TQObject *o, TQEvent *e ) // ----------------------- Mouse IO --------------------------- -KGameMouseIO::KGameMouseIO(TQWidget *parent,bool trackmouse) +KGameMouseIO::KGameMouseIO(TQWidget *tqparent,bool trackmouse) : KGameIO() { - if (parent) + if (tqparent) { kdDebug(11001) << "Mouse Event filter installed tracking=" << trackmouse << endl; - parent->installEventFilter(this); - parent->setMouseTracking(trackmouse); + tqparent->installEventFilter(this); + tqparent->setMouseTracking(trackmouse); } } KGameMouseIO::~KGameMouseIO() { - if (parent()) + if (tqparent()) { - parent()->removeEventFilter(this); + tqparent()->removeEventFilter(this); } } @@ -193,9 +193,9 @@ int KGameMouseIO::rtti() const void KGameMouseIO::setMouseTracking(bool b) { - if (parent()) + if (tqparent()) { - ((TQWidget*)parent())->setMouseTracking(b); + ((TQWidget*)tqparent())->setMouseTracking(b); } } @@ -266,10 +266,10 @@ KGameProcessIO::KGameProcessIO(const TQString& name) //kdDebug(11001) << "================= KMEssage SetSErver ==================== " << endl; //d->mMessageClient->setServer(d->mMessageServer); kdDebug(11001) << "================= KMEssage: Connect ==================== " << endl; - //connect(d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)), - // this, TQT_SLOT(clientMessage(const TQByteArray&, Q_UINT32))); - //connect(d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, Q_UINT32, const TQValueList <Q_UINT32> &)), - // this, TQT_SLOT(clientMessage(const TQByteArray&, Q_UINT32, const TQValueList <Q_UINT32> &))); + //connect(d->mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, TQ_UINT32)), + // this, TQT_SLOT(clientMessage(const TQByteArray&, TQ_UINT32))); + //connect(d->mMessageClient, TQT_SIGNAL(forwardReceived(const TQByteArray&, TQ_UINT32, const TQValueList <TQ_UINT32> &)), + // this, TQT_SLOT(clientMessage(const TQByteArray&, TQ_UINT32, const TQValueList <TQ_UINT32> &))); connect(d->mProcessIO, TQT_SIGNAL(received(const TQByteArray&)), this, TQT_SLOT(receivedMessage(const TQByteArray&))); //kdDebug(11001) << "Our client is id="<<d->mMessageClient->id() << endl; @@ -302,7 +302,7 @@ void KGameProcessIO::initIO(KPlayer *p) // Send 'hello' to process TQByteArray buffer; TQDataStream stream(buffer, IO_WriteOnly); - Q_INT16 id = p->userId(); + TQ_INT16 id = p->userId(); stream << id; bool sendit=true; @@ -311,7 +311,7 @@ void KGameProcessIO::initIO(KPlayer *p) emit signalIOAdded(this,stream,p,&sendit); if (sendit ) { - Q_UINT32 sender = p->id(); + TQ_UINT32 sender = p->id(); kdDebug(11001) << "Sending IOAdded to process player !!!!!!!!!!!!!! " << endl; sendSystemMessage(stream, KGameMessage::IdIOAdded, 0, sender); } @@ -328,27 +328,27 @@ void KGameProcessIO::notifyTurn(bool b) bool sendit=true; TQByteArray buffer; TQDataStream stream(buffer,IO_WriteOnly); - stream << (Q_INT8)b; + stream << (TQ_INT8)b; emit signalPrepareTurn(stream,b,this,&sendit); if (sendit) { - Q_UINT32 sender=player()->id(); + TQ_UINT32 sender=player()->id(); kdDebug(11001) << "Sending Turn to process player !!!!!!!!!!!!!! " << endl; sendSystemMessage(stream, KGameMessage::IdTurn, 0, sender); } } -void KGameProcessIO::sendSystemMessage(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender) +void KGameProcessIO::sendSystemMessage(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender) { sendAllMessages(stream, msgid, receiver, sender, false); } -void KGameProcessIO::sendMessage(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender) +void KGameProcessIO::sendMessage(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender) { sendAllMessages(stream, msgid, receiver, sender, true); } -void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, Q_UINT32 receiver, Q_UINT32 sender, bool usermsg) +void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, bool usermsg) { kdDebug(11001) << "==============> KGameProcessIO::sendMessage (usermsg="<<usermsg<<")" << endl; // if (!player()) return ; @@ -377,13 +377,13 @@ void KGameProcessIO::sendAllMessages(TQDataStream &stream,int msgid, Q_UINT32 re } } -//void KGameProcessIO::clientMessage(const TQByteArray& receiveBuffer, Q_UINT32 clientID, const TQValueList <Q_UINT32> &recv) +//void KGameProcessIO::clientMessage(const TQByteArray& receiveBuffer, TQ_UINT32 clientID, const TQValueList <TQ_UINT32> &recv) void KGameProcessIO::receivedMessage(const TQByteArray& receiveBuffer) { TQDataStream stream(receiveBuffer,IO_ReadOnly); int msgid; - Q_UINT32 sender; - Q_UINT32 receiver; + TQ_UINT32 sender; + TQ_UINT32 receiver; KGameMessage::extractHeader(stream,sender,receiver,msgid); kdDebug(11001) << "************* Got process message sender =" << sender |