diff options
Diffstat (limited to 'libkdegames/kgame/kgame.h')
-rw-r--r-- | libkdegames/kgame/kgame.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/libkdegames/kgame/kgame.h b/libkdegames/kgame/kgame.h index 37d8d974..85a8356c 100644 --- a/libkdegames/kgame/kgame.h +++ b/libkdegames/kgame/kgame.h @@ -23,9 +23,9 @@ #ifndef __KGAME_H_ #define __KGAME_H_ -#include <qstring.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include "kgamenetwork.h" #include <kdemacros.h> @@ -64,7 +64,7 @@ class KDE_EXPORT KGame : public KGameNetwork Q_OBJECT public: - typedef QPtrList<KPlayer> KGamePlayerList; + typedef TQPtrList<KPlayer> KGamePlayerList; /** * The policy of the property. This can be PolicyClean (setVale uses @@ -100,7 +100,7 @@ public: * game in load/save and network operations. Change this between * games. */ - KGame(int cookie=42,QObject* parent=0); + KGame(int cookie=42,TQObject* parent=0); /** * Destructs the game @@ -282,19 +282,19 @@ public: * Called by KPlayer to send a player input to the * KMessageServer. **/ - virtual bool sendPlayerInput(QDataStream &msg,KPlayer *player,Q_UINT32 sender=0); + virtual bool sendPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0); /** * Called when a player input arrives from KMessageServer. * - * Calls prepareNext (using QTimer::singleShot) if gameOver() + * Calls prepareNext (using TQTimer::singleShot) if gameOver() * returns 0. This function should normally not be used outside KGame. * It could be made non-virtual,protected in a later version. At the * moment it is a virtual function to give you more control over KGame. * * For documentation see playerInput. **/ - virtual bool systemPlayerInput(QDataStream &msg,KPlayer *player,Q_UINT32 sender=0); + virtual bool systemPlayerInput(TQDataStream &msg,KPlayer *player,Q_UINT32 sender=0); /** * This virtual function is called if the KGame needs to create a new player. @@ -337,7 +337,7 @@ public: * * @return true? */ - virtual bool load(QDataStream &stream,bool reset=true); + virtual bool load(TQDataStream &stream,bool reset=true); /** * Same as above function but with different parameters @@ -347,7 +347,7 @@ public: * * @return true? **/ - virtual bool load(QString filename,bool reset=true); + virtual bool load(TQString filename,bool reset=true); /** * Save a game to a file OR to network. Otherwise the same as @@ -358,7 +358,7 @@ public: * * @return true? */ - virtual bool save(QDataStream &stream,bool saveplayers=true); + virtual bool save(TQDataStream &stream,bool saveplayers=true); /** * Same as above function but with different parameters @@ -368,7 +368,7 @@ public: * * @return true? **/ - virtual bool save(QString filename,bool saveplayers=true); + virtual bool save(TQString filename,bool saveplayers=true); /** * Resets the game, i.e. puts it into a state where everything @@ -403,7 +403,7 @@ public: /** * This is called by KPlayer::sendProperty only! Internal function! **/ - bool sendPlayerProperty(int msgid, QDataStream& s, Q_UINT32 playerId); + bool sendPlayerProperty(int msgid, TQDataStream& s, Q_UINT32 playerId); /** * This function allows to find the pointer to a player @@ -435,10 +435,10 @@ public: * @param group the group of the receivers * @return true if worked */ - bool sendGroupMessage(const QByteArray& msg, int msgid, Q_UINT32 sender, const QString& group); - bool sendGroupMessage(const QDataStream &msg, int msgid, Q_UINT32 sender, const QString& group); - bool sendGroupMessage(int msg, int msgid, Q_UINT32 sender, const QString& group); - bool sendGroupMessage(const QString& msg, int msgid, Q_UINT32 sender, const QString& group); + 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); /** * This will either forward an incoming message to a specified player @@ -458,7 +458,7 @@ public: * @param sender * @param clientID the client from which we received the transmission - hardly used **/ - virtual void networkTransmission(QDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, Q_UINT32 clientID); + virtual void networkTransmission(TQDataStream &stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, Q_UINT32 clientID); /** * Returns a pointer to the KGame property handler @@ -469,7 +469,7 @@ protected slots: /** * Called by KGamePropertyHandler only! Internal function! **/ - void sendProperty(int msgid, QDataStream& stream, bool* sent); + void sendProperty(int msgid, TQDataStream& stream, bool* sent); /** * Called by KGamePropertyHandler only! Internal function! @@ -539,7 +539,7 @@ signals: * * @param stream the load stream */ - void signalLoadPrePlayers(QDataStream &stream); + void signalLoadPrePlayers(TQDataStream &stream); /** * The game will be loaded from the given stream. Load from here @@ -548,7 +548,7 @@ signals: * * @param stream the load stream */ - void signalLoad(QDataStream &stream); + void signalLoad(TQDataStream &stream); /** * The game will be saved to the given stream. Fill this with data @@ -563,7 +563,7 @@ signals: * * @param stream the save stream **/ - void signalSavePrePlayers(QDataStream &stream); + void signalSavePrePlayers(TQDataStream &stream); /** * The game will be saved to the given stream. Fill this with data @@ -572,7 +572,7 @@ signals: * * @param stream the save stream */ - void signalSave(QDataStream &stream); + void signalSave(TQDataStream &stream); /** * Is emmited if a game with a different version cookie is loaded. @@ -585,7 +585,7 @@ signals: * @param cookie - the saved cookie. It differs from KGame::cookie() * @param result - set this to true if you managed to load the game */ - void signalLoadError(QDataStream &stream,bool network,int cookie, bool &result); + void signalLoadError(TQDataStream &stream,bool network,int cookie, bool &result); /** * We got an user defined update message. This is usually done @@ -593,7 +593,7 @@ 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 QByteArray& buffer, Q_UINT32 receiver, Q_UINT32 sender); + void signalNetworkData(int msgid,const TQByteArray& buffer, Q_UINT32 receiver, Q_UINT32 sender); /** * We got an network message. this can be used to notify us that something @@ -686,7 +686,7 @@ protected: * and then manually call @ref playerInputFinished to resume it. * Example: * \code - * bool MyClass::playerInput(QDataStream &msg,KPlayer *player) + * bool MyClass::playerInput(TQDataStream &msg,KPlayer *player) * { * Q_INT32 move; * msg >> move; @@ -700,7 +700,7 @@ protected: * @param player the player who did the move * @return true - input ready, false: input manual */ - virtual bool playerInput(QDataStream &msg,KPlayer *player)=0; + virtual bool playerInput(TQDataStream &msg,KPlayer *player)=0; /** @@ -752,7 +752,7 @@ protected: **/ virtual void newPlayersJoin(KGamePlayerList *oldplayer, KGamePlayerList *newplayer, - QValueList<int> &inactivate) { + TQValueList<int> &inactivate) { Q_UNUSED( oldplayer ); Q_UNUSED( newplayer ); Q_UNUSED( inactivate ); @@ -766,7 +766,7 @@ protected: * @param list the optional list is the player list to be saved, default is playerList() * **/ - void savePlayers(QDataStream &stream,KGamePlayerList *list=0); + void savePlayers(TQDataStream &stream,KGamePlayerList *list=0); /** * Prepare a player for being added. Put all data about a player into the @@ -778,7 +778,7 @@ protected: * @param stream is the stream to add the player * @param player The player to add **/ - void savePlayer(QDataStream& stream,KPlayer* player); + void savePlayer(TQDataStream& stream,KPlayer* player); /** * Load the player list from a stream. Used for network game and load/save. @@ -788,7 +788,7 @@ protected: * @param isvirtual will set the virtual flag true/false * **/ - KPlayer *loadPlayer(QDataStream& stream,bool isvirtual=false); + KPlayer *loadPlayer(TQDataStream& stream,bool isvirtual=false); /** @@ -872,7 +872,7 @@ protected: * * @return true? */ - virtual bool loadgame(QDataStream &stream, bool network, bool reset); + virtual bool loadgame(TQDataStream &stream, bool network, bool reset); /** * Save a game, to file OR network. Internal. @@ -883,7 +883,7 @@ protected: * * @return true? */ - virtual bool savegame(QDataStream &stream, bool network,bool saveplayers); + virtual bool savegame(TQDataStream &stream, bool network,bool saveplayers); private: //AB: this is to hide the "receiver" parameter from the user. It shouldn't be @@ -913,7 +913,7 @@ private: /** * Helping function - game negotiation **/ - void setupGameContinue(QDataStream& msg, Q_UINT32 sender); + void setupGameContinue(TQDataStream& msg, Q_UINT32 sender); /** * Removes a player from all lists, removes the @ref KGame pointer from the |