implemented game types

This commit is contained in:
Max-Wilhelm Bruker 2011-01-27 19:13:22 +01:00
parent 7116382a96
commit 04742f6fb9
23 changed files with 249 additions and 127 deletions

View file

@ -9,8 +9,11 @@ class ServerInfo_Game;
class GamesModel : public QAbstractTableModel {
Q_OBJECT
private:
QList<ServerInfo_Game *> gameList;
QMap<int, QString> gameTypes;
public:
GamesModel(QObject *parent = 0) : QAbstractTableModel(parent) { }
GamesModel(const QMap<int, QString> &_gameTypes, QObject *parent = 0);
~GamesModel();
int rowCount(const QModelIndex &parent = QModelIndex()) const { return parent.isValid() ? 0 : gameList.size(); }
int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 5; }
@ -19,8 +22,6 @@ public:
ServerInfo_Game *getGame(int row);
void updateGameList(ServerInfo_Game *game);
private:
QList<ServerInfo_Game *> gameList;
};
class GamesProxyModel : public QSortFilterProxyModel {