#include <kwin4player.h>
Collaboration diagram for KWin4Player:

Public Member Functions | |
| KWin4Player () | |
| Construct a player object,. | |
| int | rtti () const |
| Runtime identification for the player type (KGame). | |
| void | setStatus (Score *s) |
| Assign the score object which allows to display player properties in the GUI. | |
| Score * | status () |
| Retrieve the score object from the player. | |
| void | readConfig (KConfigGroup &config) |
| Read the player data (status, score) from the configuration file. | |
| void | writeConfig (KConfigGroup &config) |
| Write the player data (status, score) to the configuration file. | |
| void | incWin () |
| Increase the number of wins for this player. | |
| void | incRemis () |
| Increase the number of draws for this player. | |
| void | incLost () |
| Increase the number of losses for this player. | |
| void | incBrk () |
| Increase the number of aborted games for this player. | |
| int | win () |
| Retrieve the number of wins. | |
| int | lost () |
| Retrieve the number of losses. | |
| int | brk () |
| Retrieve the number of aborted games. | |
| int | remis () |
| Retriev the number of drawn games. | |
| void | resetStats (bool all=true) |
| Clear the score of the player. | |
Protected Slots | |
| void | slotPlayerPropertyChanged (KGamePropertyBase *prop, KPlayer *player) |
| KGame method which is called when any KGamePropery changes for this player. | |
A player holds all important player data, in particular the long time status and score information. Additionally, via the KGame framework it supports various methods of input like mouse, keyboard, AI or even network.
Definition at line 35 of file kwin4player.h.
|
|
Construct a player object,.
Definition at line 28 of file kwin4player.cpp. References resetStats(), and slotPlayerPropertyChanged(). Here is the call graph for this function: ![]() |
|
|
Retrieve the number of aborted games.
Definition at line 97 of file kwin4player.h. Referenced by KWin4Doc::getStatistic(). |
|
|
Increase the number of aborted games for this player.
Definition at line 130 of file kwin4player.cpp. Referenced by KWin4Doc::endGame(). |
|
|
Increase the number of losses for this player.
Definition at line 114 of file kwin4player.cpp. Referenced by KWin4Doc::endGame(). |
|
|
Increase the number of draws for this player.
Definition at line 122 of file kwin4player.cpp. Referenced by KWin4Doc::endGame(). |
|
|
Increase the number of wins for this player.
Definition at line 106 of file kwin4player.cpp. Referenced by KWin4Doc::endGame(). |
|
|
Retrieve the number of losses.
Definition at line 93 of file kwin4player.h. Referenced by KWin4Doc::getStatistic(). |
|
|
Read the player data (status, score) from the configuration file.
Definition at line 86 of file kwin4player.cpp. Referenced by KWin4Doc::readConfig(). |
|
|
Retriev the number of drawn games.
Definition at line 101 of file kwin4player.h. Referenced by KWin4Doc::getStatistic(). |
|
|
Clear the score of the player.
Definition at line 140 of file kwin4player.cpp. Referenced by KWin4Player(), and KWin4Doc::resetStatistic(). |
|
|
Runtime identification for the player type (KGame). Only one player _type_ for kwin4.
Definition at line 48 of file kwin4player.h. |
|
|
Assign the score object which allows to display player properties in the GUI.
Definition at line 54 of file kwin4player.h. |
|
||||||||||||
|
KGame method which is called when any KGamePropery changes for this player.
Definition at line 58 of file kwin4player.cpp. References Score::setPlayerName(). Referenced by KWin4Player(). |
|
|
Retrieve the score object from the player.
Definition at line 59 of file kwin4player.h. Referenced by KWin4Doc::setPlayedBy(). |
|
|
Retrieve the number of wins.
Definition at line 89 of file kwin4player.h. Referenced by KWin4Doc::getStatistic(). |
|
|
Write the player data (status, score) to the configuration file.
Definition at line 96 of file kwin4player.cpp. Referenced by KWin4Doc::writeConfig(). |
1.4.6