Data structure that holds information about players in a server. More...
#include <player.h>
Public Types | |
enum | PlayerTeam { TEAM_BLUE, TEAM_RED, TEAM_GREEN, TEAM_GOLD, TEAM_NONE = 0xFF } |
Public Member Functions | |
Player (const QString &name, unsigned short score, unsigned short ping, PlayerTeam team=TEAM_NONE, bool spectator=false, bool bot=false) | |
const QString & | name () const |
short | score () const |
unsigned short | ping () const |
bool | isSpectating () const |
bool | isBot () const |
bool | isTeamlessBot () const |
PlayerTeam | teamNum () const |
bool | operator== (const Player &other) const |
QString | nameFormatted () const |
QString | nameColorTagsStripped () const |
Protected Attributes | |
QString | playerName |
short | currentScore |
unsigned short | currentPing |
bool | spectator |
bool | bot |
PlayerTeam | team |
Data structure that holds information about players in a server.
QString Player::nameColorTagsStripped | ( | ) | const |
Seeks for characters that are not from the <32; 126> range, removes them and the characters that appear after them, then returns new string.
QString Player::nameFormatted | ( | ) | const |
Formats string into HTML format.