Player Class Reference

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)
 
 Player (const Player &other)
 
bool isBot () const
 
bool isSpectating () const
 
bool isTeamlessBot () const
 
const QString & name () const
 
QString nameColorTagsStripped () const
 
QString nameFormatted () const
 
Playeroperator= (const Player &other)
 
bool operator== (const Player &other) const
 
unsigned short ping () const
 
short score () const
 
PlayerTeam teamNum () const
 

Detailed Description

Data structure that holds information about players in a server.

Definition at line 37 of file player.h.

Member Function Documentation

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.

Definition at line 93 of file player.cpp.

QString Player::nameFormatted ( ) const

Formats string into HTML format.

Definition at line 112 of file player.cpp.


The documentation for this class was generated from the following files: