From 838baf3f99ec5ab81b063eb5449a3381d860f377 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:58:26 +0000 Subject: TQt4 port kdegames This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdegames/kgame/kgamenetwork.h | 49 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'libkdegames/kgame/kgamenetwork.h') diff --git a/libkdegames/kgame/kgamenetwork.h b/libkdegames/kgame/kgamenetwork.h index 47276d06..1766ac90 100644 --- a/libkdegames/kgame/kgamenetwork.h +++ b/libkdegames/kgame/kgamenetwork.h @@ -43,15 +43,16 @@ class KGameNetworkPrivate; * @author Martin Heni * @version $Id$ */ -class KDE_EXPORT KGameNetwork : public QObject +class KDE_EXPORT KGameNetwork : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Create a KGameNetwork object */ - KGameNetwork(int cookie=42,TQObject* parent=0); + KGameNetwork(int cookie=42,TQObject* tqparent=0); virtual ~KGameNetwork(); /** @@ -96,7 +97,7 @@ public: * * @return int id **/ - Q_UINT32 gameId() const; + TQ_UINT32 gameId() const; /** * Inits a network game as network MASTER. Note that if the @@ -108,7 +109,7 @@ public: * @param port The port on which the service is offered * @return true if it worked **/ - bool offerConnections (Q_UINT16 port); + bool offerConnections (TQ_UINT16 port); /** * Announces game MASTER on network using DNS-SD. Clients then can discover it using @@ -120,7 +121,7 @@ public: * set hostname will be used. In case of name conflict -2, -3 and so on will be added to name. * @since 3.4 **/ - void setDiscoveryInfo(const TQString& type, const TQString& name=TQString::null); + void setDiscoveryInfo(const TQString& type, const TQString& name=TQString()); /** * Inits a network game as a network CLIENT @@ -130,7 +131,7 @@ public: * * @return true if connected **/ - bool connectToServer(const TQString& host, Q_UINT16 port); + bool connectToServer(const TQString& host, TQ_UINT16 port); /** * @since 3.2 @@ -138,7 +139,7 @@ public: * or the port we are connected to if connectToServer was called. * Otherwise 0. **/ - Q_UINT16 port() const; + TQ_UINT16 port() const; /** * @since 3.2 @@ -189,22 +190,22 @@ public: * @return true if worked */ // AB: TODO: doc on how "receiver" and "sender" should be created! - bool sendSystemMessage(const TQByteArray& buffer, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendSystemMessage(const TQByteArray& buffer, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * @overload **/ - bool sendSystemMessage(int data, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendSystemMessage(int data, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * @overload **/ - bool sendSystemMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendSystemMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * @overload **/ - bool sendSystemMessage(const TQString& msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendSystemMessage(const TQString& msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * Sends a network message @@ -217,7 +218,7 @@ public: * the correct value for you. You might want to use this if you send a * message from a specific player. **/ - void sendError(int error, const TQByteArray& message, Q_UINT32 receiver=0, Q_UINT32 sender=0); + void sendError(int error, const TQByteArray& message, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * Are we still offer offering server connections - only for game MASTER @@ -265,29 +266,29 @@ public: * @return true if worked **/ // AB: TODO: doc on how "receiver" and "sender" should be created! - bool sendMessage(const TQByteArray& buffer, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendMessage(const TQByteArray& buffer, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * This is an overloaded member function, provided for convenience. **/ - bool sendMessage(const TQDataStream &msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendMessage(const TQDataStream &msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * This is an overloaded member function, provided for convenience. **/ - bool sendMessage(const TQString& msg, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendMessage(const TQString& msg, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * This is an overloaded member function, provided for convenience. **/ - bool sendMessage(int data, int msgid, Q_UINT32 receiver=0, Q_UINT32 sender=0); + bool sendMessage(int data, int msgid, TQ_UINT32 receiver=0, TQ_UINT32 sender=0); /** * Called by ReceiveNetworkTransmission(). Will be overwritten by * KGame and handle the incoming message. **/ - virtual void networkTransmission(TQDataStream&, int, Q_UINT32, Q_UINT32, Q_UINT32 clientID) = 0; + virtual void networkTransmission(TQDataStream&, int, TQ_UINT32, TQ_UINT32, TQ_UINT32 clientID) = 0; /** @@ -304,7 +305,7 @@ public: * @param clientID the ID of the new ADMIN (note: this is the _client_ID * which has nothing to do with the player IDs. See KMessageServer) **/ - void electAdmin(Q_UINT32 clientID); + void electAdmin(TQ_UINT32 clientID); /** * Don't use this unless you really know what youre doing! You might @@ -321,13 +322,13 @@ public: * experience some strange behaviour if you use the message server directly! * * @return a pointer to the message server if this is the MASTER KGame - * object. Note that it might be possible that no KGame object contains + * object. Note that it might be possible that no KGame object tqcontains * the KMessageServer at all! It might even run stand alone! **/ KMessageServer* messageServer() const; /** - * You should call this before doing thigs like, e.g. qApp->processEvents(). + * You should call this before doing thigs like, e.g. tqApp->processEvents(). * Don't forget to call unlock once you are done! * * @see KMessageClient::lock @@ -362,7 +363,7 @@ signals: * * @param clientID the ID of the newly connected client **/ - void signalClientConnected(Q_UINT32 clientID); + void signalClientConnected(TQ_UINT32 clientID); /** * This signal is emitted whenever the KMessageServer sends us a message @@ -375,7 +376,7 @@ signals: * @param broken true if the connection was lost because of a network error, false * if the connection was closed by the message server admin. */ - void signalClientDisconnected(Q_UINT32 clientID, bool broken); + void signalClientDisconnected(TQ_UINT32 clientID, bool broken); /** * This client gets or loses the admin status. @@ -401,7 +402,7 @@ protected slots: * If it is valid, the pure virtual method networkTransmission() is called. * (This one is overwritten in KGame.) **/ - void receiveNetworkTransmission(const TQByteArray& a, Q_UINT32 clientID); + void receiveNetworkTransmission(const TQByteArray& a, TQ_UINT32 clientID); /** * This KGame object receives or loses the admin status. @@ -413,7 +414,7 @@ protected slots: * Called when the network connection is about to terminate. Is used * to store the network parameter like the game id */ - void aboutToLoseConnection(Q_UINT32 id); + void aboutToLoseConnection(TQ_UINT32 id); /** * Called when the network connection is terminated. Used to clean -- cgit v1.2.1