mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 23:53:54 -07:00
implemented game types
This commit is contained in:
parent
7116382a96
commit
04742f6fb9
23 changed files with 249 additions and 127 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue