mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
finished getGamesOfUser function
This commit is contained in:
parent
d5de76ec4a
commit
abd5425796
24 changed files with 1221 additions and 1051 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <QAbstractTableModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QList>
|
||||
#include "gametypemap.h"
|
||||
|
||||
class ServerInfo_Game;
|
||||
|
||||
|
|
@ -11,12 +12,13 @@ class GamesModel : public QAbstractTableModel {
|
|||
Q_OBJECT
|
||||
private:
|
||||
QList<ServerInfo_Game *> gameList;
|
||||
QMap<int, QString> gameTypes;
|
||||
QMap<int, QString> rooms;
|
||||
QMap<int, GameTypeMap> gameTypes;
|
||||
public:
|
||||
GamesModel(const QMap<int, QString> &_gameTypes, QObject *parent = 0);
|
||||
GamesModel(const QMap<int, QString> &_rooms, const QMap<int, GameTypeMap> &_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 7; }
|
||||
int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 8; }
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue