23 #ifndef __PLAYERS_DIAGRAM_H_ 24 #define __PLAYERS_DIAGRAM_H_ 26 #include "serverapi/player.h" 44 displayName = name.toLower();
45 displayName[0] = displayName[0].toUpper();
48 : name(std::move(name)), displayName(std::move(displayName)) {}
57 static QList<PlayersDiagramStyle> availableSlotStyles();
63 static void loadImages(
const QString &style);
64 static bool isNumericStyle(
const QString &style);
70 QPixmap pixmap()
const 82 static QImage openImage, openSpecImage, botImage, playerImage, spectatorImage;
92 QImage colorizePlayer(QImage image,
const QColor &color);
95 void drawTeam(PlayerType playerType,
int team,
int howMany);
96 void drawPictures(
const QImage &image,
int howMany);
98 void obtainPlayerNumbers();
100 int numBotsOnTeam[MAX_TEAMS];
101 int numBotsWithoutTeam;
102 int numFreeJoinSlots;
103 int numFreeSpectatorSlots;
104 int numHumansWithoutTeam;
105 int numHumansOnTeam[MAX_TEAMS];
109 static const QString DEFAULT_STYLE;
110 static QString currentlyLoadedStyle;
118 static QImage loadImage(
const QString &style,
const QString &name);
119 static QStringList stylePaths();
A representation of a server for a given game.