Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Player Class Reference

Data structure that holds information about players in a server. More...

#include <player.h>

List of all members.

Public Types

enum  PlayerTeam {

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

Static Public Member Functions

static QString colorizeString (const QString &str, int def=4)

Protected Attributes

QString playerName
short currentScore
unsigned short currentPing
bool spectator
bool bot
PlayerTeam team

Static Protected Attributes

static const char colorChart [22][7]

Detailed Description

Data structure that holds information about players in a server.

Member Function Documentation

QString Player::colorizeString ( const QString &  str,
int  def = 4 
) [static]

Colorizes the given string. Most useful for displaying colored names.

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.

Member Data Documentation

const char Player::colorChart [static, protected]
Initial value:

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator