mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 07:03:54 -07:00
Filter registered-only games as unavailable when user isn't regged
This commit is contained in:
parent
eebc615c1c
commit
edd429d874
6 changed files with 17 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue