Filter registered-only games as unavailable when user isn't regged

This commit is contained in:
Daenyth 2011-12-04 12:16:19 -05:00
parent eebc615c1c
commit edd429d874
6 changed files with 17 additions and 10 deletions

View file

@ -5,6 +5,7 @@
#include <QSortFilterProxyModel>
#include <QList>
#include "gametypemap.h"
#include "protocol_datastructures.h"
class ServerInfo_Game;
@ -29,9 +30,10 @@ public:
class GamesProxyModel : public QSortFilterProxyModel {
Q_OBJECT
private:
ServerInfo_User *ownUser;
bool unjoinableGamesVisible;
public:
GamesProxyModel(QObject *parent = 0);
GamesProxyModel(QObject *parent = 0, ServerInfo_User *_ownUser = 0);
void setUnjoinableGamesVisible(bool _unjoinableGamesVisible);
protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;