diff options
Diffstat (limited to 'libkdegames/kgame/kmessageclient.h')
-rw-r--r-- | libkdegames/kgame/kmessageclient.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/libkdegames/kgame/kmessageclient.h b/libkdegames/kgame/kmessageclient.h index 71ab7a1e..f81d7a69 100644 --- a/libkdegames/kgame/kmessageclient.h +++ b/libkdegames/kgame/kmessageclient.h @@ -47,9 +47,10 @@ class KMessageClientPrivate; In that case the messages must be of the format specified in KMessageServer. @author Burkhard Lehner <Burkhard.Lehner@gmx.de> */ -class KMessageClient : public QObject +class KMessageClient : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -58,7 +59,7 @@ public: Creates an unconnected KMessageClient object. Use setServer() later to connect to a KMessageServer object. */ - KMessageClient (TQObject *parent = 0, const char *name = 0); + KMessageClient (TQObject *tqparent = 0, const char *name = 0); /** Destructor. @@ -73,7 +74,7 @@ public: NOTE: As long as the object is not yet connected to the server, and as long as the server hasn't sent the client ID, this method returns 0. */ - Q_UINT32 id () const; + TQ_UINT32 id () const; /** @return Whether or not this client is the server admin. @@ -90,12 +91,12 @@ public: /** @return The ID of the admin client on the message server. */ - Q_UINT32 adminId() const; + TQ_UINT32 adminId() const; /** @return The list of the IDs of all the message clients connected to the message server. */ - const TQValueList <Q_UINT32> &clientList() const; + const TQValueList <TQ_UINT32> &clientList() const; /** Connects the client to (another) server. @@ -108,7 +109,7 @@ public: be resolved to an IP or just an IP @param port The port to connect to */ - void setServer (const TQString &host, Q_UINT16 port); + void setServer (const TQString &host, TQ_UINT16 port); /** Connects the client to (another) server. @@ -168,7 +169,7 @@ public: connected to. See also KMessageIO::peerPort and TQSocket::peerPort. @since 3.2 */ - Q_UINT16 peerPort () const; + TQ_UINT16 peerPort () const; /** @since 3.2 @@ -218,11 +219,11 @@ public: @param clients A list of clients the message should be sent to */ //AB: processForward doesn't exist!! is processIncomingMessage meant? - void sendForward (const TQByteArray &msg, const TQValueList <Q_UINT32> &clients); + void sendForward (const TQByteArray &msg, const TQValueList <TQ_UINT32> &clients); /** Sends a message to a single client. This is a convenieance method. It calls - sendForward (const TQByteArray &msg, const TQValueList <Q_UINT32> &clients) + sendForward (const TQByteArray &msg, const TQValueList <TQ_UINT32> &clients) with a list containing only one client ID. To send a message to the admin of the KMessageServer, you can use 0 as clientID, @@ -230,7 +231,7 @@ public: @param msg The message to be sent to the client @param client The id of the client the message shall be sent to */ - void sendForward (const TQByteArray &msg, Q_UINT32 client); + void sendForward (const TQByteArray &msg, TQ_UINT32 client); /** Once this function is called no message will be received anymore. @@ -263,7 +264,7 @@ signals: to ignore broadcast messages that were sent by yourself: \code - void myObject::myBroadcastSlot (const TQByteArray &msg, Q_UINT32 senderID) + void myObject::myBroadcastSlot (const TQByteArray &msg, TQ_UINT32 senderID) { if (senderID == ((KMessageClient *)sender())->id()) return; @@ -273,7 +274,7 @@ signals: @param msg The message that has been sent to us @param senderID The ID of the client which sent the message */ - void broadcastReceived (const TQByteArray &msg, Q_UINT32 senderID); + void broadcastReceived (const TQByteArray &msg, TQ_UINT32 senderID); /** This signal is emitted when the client receives a forward message from the @@ -283,27 +284,27 @@ signals: senderID contains the ID of the client that sent the broadcast message. You can use this e.g. to send a reply message to only that client. - receivers contains the list of the clients that got the message. (If this list + tqreceivers contains the list of the clients that got the message. (If this list only contains one number, this will be your client ID, and it was exclusivly sent to you.) If you don't want to distinguish between broadcast and forward messages and treat them the same, you can connect forwardReceived signal to the - broadcastReceived signal. (Yes, that's possible! You can connect a Qt signal to - a Qt signal, and the second one can have less parameters.) + broadcastReceived signal. (Yes, that's possible! You can connect a TQt signal to + a TQt signal, and the second one can have less parameters.) \code KMessageClient *client = new KMessageClient (); - connect (client, TQT_SIGNAL (forwardReceived (const TQByteArray &, Q_UINT32, const TQValueList <Q_UINT32>&)), - client, TQT_SIGNAL (broadcastReceived (const TQByteArray &, Q_UINT32))); + connect (client, TQT_SIGNAL (forwardReceived (const TQByteArray &, TQ_UINT32, const TQValueList <TQ_UINT32>&)), + client, TQT_SIGNAL (broadcastReceived (const TQByteArray &, TQ_UINT32))); \endcode Then connect the broadcast signal to your slot that analyzes the message. @param msg The message that has been sent to us @param senderID The ID of the client which sent the message - @param receivers All clients which receive this message + @param tqreceivers All clients which receive this message */ - void forwardReceived (const TQByteArray &msg, Q_UINT32 senderID, const TQValueList <Q_UINT32> &receivers); + void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &tqreceivers); /** This signal is emitted when the connection to the KMessageServer is broken. @@ -320,7 +321,7 @@ signals: This signal is emitted right before the client disconnects. It can be used to this store the id of the client which is about to be lost. */ - void aboutToDisconnect(Q_UINT32 id); + void aboutToDisconnect(TQ_UINT32 id); /** This signal is emitted when this client becomes the admin client or when it loses @@ -336,7 +337,7 @@ signals: This should usually only be done in one client, e.g. the admin client. @param clientID The ID of the client that has newly connectd. */ - void eventClientConnected (Q_UINT32 clientID); + void eventClientConnected (TQ_UINT32 clientID); /** This signal is emitted when the server has lost the @@ -345,7 +346,7 @@ signals: @param clientID The ID of the client that has disconnected @param broken true if it was disconnected because of a network error */ - void eventClientDisconnected (Q_UINT32 clientID, bool broken); + void eventClientDisconnected (TQ_UINT32 clientID, bool broken); /** This signal is emitted on every message that came from the server. You can connect to this |