KGameDebugDialog Class Reference
List of all members.Detailed Description
Definition at line 34 of file kgamedebugdialog.h.
Public Slots | |
void | slotUnsetKGame () |
void | slotUpdateGameData () |
void | slotUpdatePlayerData () |
void | slotUpdatePlayerList () |
void | slotClearMessages () |
Signals | |
void | signalRequestIdName (int messageid, bool userid, QString &name) |
Public Member Functions | |
KGameDebugDialog (KGame *g, QWidget *parent, bool modal=false) | |
~KGameDebugDialog () | |
void | setKGame (const KGame *g) |
Protected Slots | |
void | slotUpdatePlayerData (QListBoxItem *item) |
void | slotShowId () |
void | slotHideId () |
void | slotMessageUpdate (int msgid, Q_UINT32 receiver, Q_UINT32 sender) |
Protected Member Functions | |
void | clearPages () |
void | clearPlayerData () |
void | clearGameData () |
void | addPlayer (KPlayer *p) |
void | removePlayer (QListBoxItem *item) |
bool | showId (int msgid) |
Member Function Documentation
void KGameDebugDialog::setKGame | ( | const KGame * | g | ) |
Automatically connects the KGame object to all error dependant slots.
Create a KGameErrorDialog object, call this function and forget everything.
- Parameters:
-
g The KGame which will emit the erorrs (or not ;-) )
Definition at line 428 of file kgamedebugdialog.cpp.
void KGameDebugDialog::slotUnsetKGame | ( | ) | [slot] |
Unsets a KGame which has been set using setKGame before.
This is called automatically when the KGame object is destroyed and you normally don't have to call this yourself.
Note that setKGame also unsets an already existing KGame object if exising.
Definition at line 448 of file kgamedebugdialog.cpp.
void KGameDebugDialog::slotUpdateGameData | ( | ) | [slot] |
void KGameDebugDialog::slotUpdatePlayerData | ( | ) | [slot] |
Update the properties of the currently selected player.
Definition at line 285 of file kgamedebugdialog.cpp.
void KGameDebugDialog::slotUpdatePlayerList | ( | ) | [slot] |
Updates the list of players and calls clearPlayerData.
Note that after this call NO player is selected anymore.
Definition at line 293 of file kgamedebugdialog.cpp.
void KGameDebugDialog::signalRequestIdName | ( | int | messageid, | |
bool | userid, | |||
QString & | name | |||
) | [signal] |
This signal is emitted when the "debug messages" page couldn't find the name of a message id.
This is usually the case for user-defined messages. KGameDebugDialog asks you to give the msgid a name.
- Parameters:
-
messageid The ID of the message. As given to KGame::sendMessage userid User defined msgIds are internally increased by KGameMessage::IdUser. You don't have to care about this but if this signal is emitted with userid=false (shouldn't happen) then the name of an internal message as defined in KGameMessage::GameMessageIds couldn't be found. name The name of the msgid. You have to fill this!
void KGameDebugDialog::clearPlayerData | ( | ) | [protected] |
Clear the data of the player view.
Note that the player list is NOT cleared.
Definition at line 251 of file kgamedebugdialog.cpp.
void KGameDebugDialog::clearGameData | ( | ) | [protected] |
void KGameDebugDialog::addPlayer | ( | KPlayer * | p | ) | [protected] |
void KGameDebugDialog::removePlayer | ( | QListBoxItem * | item | ) | [protected] |
bool KGameDebugDialog::showId | ( | int | msgid | ) | [protected] |
- Returns:
- Whether messages with this msgid shall be displayed or not
Definition at line 536 of file kgamedebugdialog.cpp.
void KGameDebugDialog::slotUpdatePlayerData | ( | QListBoxItem * | item | ) | [protected, slot] |
Update the data of the player specified in item.
- Parameters:
-
item The QListBoxItem of the player to be updated. Note that the text of this item MUST be the ID of the player
Definition at line 359 of file kgamedebugdialog.cpp.
void KGameDebugDialog::slotMessageUpdate | ( | int | msgid, | |
Q_UINT32 | receiver, | |||
Q_UINT32 | sender | |||
) | [protected, slot] |
A message has been received - see KGame::signalMessageUpdate.
Definition at line 484 of file kgamedebugdialog.cpp.
The documentation for this class was generated from the following files: