diff options
Diffstat (limited to 'libkdegames/kgame/kgame.h')
-rw-r--r-- | libkdegames/kgame/kgame.h | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/libkdegames/kgame/kgame.h b/libkdegames/kgame/kgame.h index 85a8356c..af278d5a 100644 --- a/libkdegames/kgame/kgame.h +++ b/libkdegames/kgame/kgame.h @@ -62,6 +62,7 @@ class KGamePrivate; class KDE_EXPORT KGame : public KGameNetwork { Q_OBJECT + TQ_OBJECT public: typedef TQPtrList<KPlayer> KGamePlayerList; @@ -100,7 +101,7 @@ public: * game in load/save and network operations. Change this between * games. */ - KGame(int cookie=42,TQObject* parent=0); + KGame(int cookie=42,TQObject* tqparent=0); /** * Destructs the game @@ -117,7 +118,7 @@ public: * The KGame e.g. sets the status to Pause when you have * less player than the minimum amount */ - enum GameStatus + enum GametqStatus { Init = 0, Run = 1, @@ -126,7 +127,7 @@ public: Abort = 4, SystemPause = 5, Intro = 6, - UserStatus = 7 + UsertqStatus = 7 }; // Properties @@ -178,7 +179,7 @@ public: * @param id Player id * @return player object */ - KPlayer *findPlayer(Q_UINT32 id) const; + KPlayer *findPlayer(TQ_UINT32 id) const; /** * Set a new @ref KGameSequence to control player management. By default @@ -282,7 +283,7 @@ public: * Called by KPlayer to send a player input to the * KMessageServer. **/ - virtual bool sendPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0); + virtual bool sendPlayerInput(TQDataStream &msg,KPlayer *player,TQ_UINT32 sender=0); /** * Called when a player input arrives from KMessageServer. @@ -294,7 +295,7 @@ public: * * For documentation see playerInput. **/ - virtual bool systemPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0); + virtual bool systemPlayerInput(TQDataStream &msg,KPlayer *player,TQ_UINT32 sender=0); /** * This virtual function is called if the KGame needs to create a new player. @@ -386,14 +387,14 @@ public: * * @return game status */ - int gameStatus() const; + int gametqStatus() const; /** * sets the game status * * @param status the new status */ - void setGameStatus(int status); + void setGametqStatus(int status); /** * docu: see KPlayer @@ -403,7 +404,7 @@ public: /** * This is called by KPlayer::sendProperty only! Internal function! **/ - bool sendPlayerProperty(int msgid, TQDataStream& s, Q_UINT32 playerId); + bool sendPlayerProperty(int msgid, TQDataStream& s, TQ_UINT32 playerId); /** * This function allows to find the pointer to a player @@ -432,13 +433,13 @@ public: * @param msg the message which will be send. See messages.txt for contents * @param msgid an id for this message * @param sender the id of the sender - * @param group the group of the receivers + * @param group the group of the tqreceivers * @return true if worked */ - bool sendGroupMessage(const TQByteArray& msg, int msgid, Q_UINT32 sender, const TQString& group); - bool sendGroupMessage(const TQDataStream &msg, int msgid, Q_UINT32 sender, const TQString& group); - bool sendGroupMessage(int msg, int msgid, Q_UINT32 sender, const TQString& group); - bool sendGroupMessage(const TQString& msg, int msgid, Q_UINT32 sender, const TQString& group); + bool sendGroupMessage(const TQByteArray& msg, int msgid, TQ_UINT32 sender, const TQString& group); + bool sendGroupMessage(const TQDataStream &msg, int msgid, TQ_UINT32 sender, const TQString& group); + bool sendGroupMessage(int msg, int msgid, TQ_UINT32 sender, const TQString& group); + bool sendGroupMessage(const TQString& msg, int msgid, TQ_UINT32 sender, const TQString& group); /** * This will either forward an incoming message to a specified player @@ -458,7 +459,7 @@ public: * @param sender * @param clientID the client from which we received the transmission - hardly used **/ - virtual void networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, Q_UINT32 clientID); + virtual void networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 clientID); /** * Returns a pointer to the KGame property handler @@ -487,7 +488,7 @@ protected slots: * Calls negotiateNetworkGame() * See KGameNetwork::signalClientConnected **/ - void slotClientConnected(Q_UINT32 clientId); + void slotClientConnected(TQ_UINT32 clientId); /** * This slot is called whenever the connection to a client is lost (ie the @@ -496,7 +497,7 @@ protected slots: * @param clientId The client the connection has been lost to * @param broken (ignore this - not used) **/ - void slotClientDisconnected(Q_UINT32 clientId,bool broken); + void slotClientDisconnected(TQ_UINT32 clientId,bool broken); /** * This slot is called whenever the connection to the server is lost (ie the @@ -593,14 +594,14 @@ signals: * own methods and has to syncronise them over the network. * Reaction to this is usually a call to a KGame function. */ - void signalNetworkData(int msgid,const TQByteArray& buffer, Q_UINT32 receiver, Q_UINT32 sender); + void signalNetworkData(int msgid,const TQByteArray& buffer, TQ_UINT32 receiver, TQ_UINT32 sender); /** * We got an network message. this can be used to notify us that something * changed. What changed can be seen in the message id. Whether this is * the best possible method to do this is unclear... */ - void signalMessageUpdate(int msgid,Q_UINT32 receiver,Q_UINT32 sender); + void signalMessageUpdate(int msgid,TQ_UINT32 receiver,TQ_UINT32 sender); /** * a player left the game because of a broken connection or so! @@ -649,7 +650,7 @@ signals: * @param clientid - The id of the new client * @param me - our game pointer */ - void signalClientJoinedGame(Q_UINT32 clientid,KGame *me); + void signalClientJoinedGame(TQ_UINT32 clientid,KGame *me); /** * This signal is emitted after a network partner left the @@ -688,7 +689,7 @@ protected: * \code * bool MyClass::playerInput(TQDataStream &msg,KPlayer *player) * { - * Q_INT32 move; + * TQ_INT32 move; * msg >> move; * kdDebug() << " Player " << player->id() << " moved to " << move << * endl; @@ -839,7 +840,7 @@ protected: * Only the ADMIN is allowed to call this. * @param clientID The ID of the message client which has connected **/ - virtual void negotiateNetworkGame(Q_UINT32 clientID); + virtual void negotiateNetworkGame(TQ_UINT32 clientID); /** * syncronise the random numbers with all network clients @@ -896,24 +897,24 @@ private: * ever need this. It it internally used to initialize a newly connected * client. **/ - //void addPlayer(KPlayer* newplayer, Q_UINT32 receiver); + //void addPlayer(KPlayer* newplayer, TQ_UINT32 receiver); /** * Just the same as the public one except receiver: * @param receiver 0 for broadcast, otherwise the receiver. Should only be * used in special circumstances and not outside KGame. **/ - bool removePlayer(KPlayer * player, Q_UINT32 receiver); + bool removePlayer(KPlayer * player, TQ_UINT32 receiver); /** * Helping function - game negotiation **/ - void setupGame(Q_UINT32 sender); + void setupGame(TQ_UINT32 sender); /** * Helping function - game negotiation **/ - void setupGameContinue(TQDataStream& msg, Q_UINT32 sender); + void setupGameContinue(TQDataStream& msg, TQ_UINT32 sender); /** * Removes a player from all lists, removes the @ref KGame pointer from the |