libkdegames/kggzmod
KGGZMod::Event Class Reference
#include <event.h>

Detailed Description
Events from the GGZ core client.When there is some important information from the GGZ core client to the game client, an event is submitted in Module::signalEvent. In most cases the event is originating from the GGZ server.
Depending on the type of the event, the more general Event object can be casted to specific objects of type LaunchEvent, ServerEvent, SelfEvent, SeatEvent, ChatEvent, StatsEvent and InfoEvent. However, this is not strictly needed, as all data is available from the public data hashtable, should a game wish to use this instead.
None of the events must be handled by the game client, especially when using the KGGZSeatsDialog class for player management. However, it is often convenient to catch the ServerEvent to get the file descriptor which refers to the connection to the game server.
Definition at line 55 of file event.h.
Public Types | |
| enum | Type { launch, server, self, seat, chat, stats, info, rankings } |
Public Member Functions | |
| Event (Type type) | |
| Type | type () const |
| Player * | player () const |
Public Attributes | |
| QMap< QString, QString > | data |
Protected Attributes | |
| Player * | m_player |
Friends | |
| class | ModulePrivate |
Member Enumeration Documentation
| enum KGGZMod::Event::Type |
The type of the event.
Depending on this type, the object might be casted to a more specific class.
- Enumerator:
-
launch Game was launched. server Connected to server. self Your seat was assigned. seat Someone's seat changed. chat A chat message was received. stats Statistics have been received for a player. info Information about a player has arrived. rankings Experimental: Rankings information for this game/room.
Constructor & Destructor Documentation
| Event::Event | ( | Type | type | ) |
Member Function Documentation
| Event::Type Event::type | ( | ) | const |
| Player * Event::player | ( | ) | const |
Returns the pointer to the player associated with the event.
If no player is associated, this returns null.
- Returns:
- player associated with an event
Reimplemented in KGGZMod::SeatEvent, KGGZMod::ChatEvent, KGGZMod::StatsEvent, and KGGZMod::InfoEvent.
Friends And Related Function Documentation
friend class ModulePrivate [friend] |
Member Data Documentation
Player* KGGZMod::Event::m_player [protected] |
The documentation for this class was generated from the following files:
KDE 4.0 API Reference