1 #ifndef GAMEFILTERSSETTINGS_H
2 #define GAMEFILTERSSETTINGS_H
3 
4 #include "settingsmanager.h"
5 
6 class GameFiltersSettings : public SettingsManager
7 {
8     Q_OBJECT
9     friend class SettingsCache;
10 
11 public:
12     bool isShowBuddiesOnlyGames();
13     bool isShowFullGames();
14     bool isShowGamesThatStarted();
15     bool isShowPasswordProtectedGames();
16     bool isHideIgnoredUserGames();
17     QString getGameNameFilter();
18     QString getCreatorNameFilter();
19     int getMinPlayers();
20     int getMaxPlayers();
21     QTime getMaxGameAge();
22     bool isGameTypeEnabled(QString gametype);
23     bool isShowOnlyIfSpectatorsCanWatch();
24     bool isShowSpectatorPasswordProtected();
25     bool isShowOnlyIfSpectatorsCanChat();
26     bool isShowOnlyIfSpectatorsCanSeeHands();
27 
28     void setShowBuddiesOnlyGames(bool show);
29     void setHideIgnoredUserGames(bool hide);
30     void setShowFullGames(bool show);
31     void setShowGamesThatStarted(bool show);
32     void setShowPasswordProtectedGames(bool show);
33     void setGameNameFilter(QString gameName);
34     void setCreatorNameFilter(QString creatorName);
35     void setMinPlayers(int min);
36     void setMaxPlayers(int max);
37     void setMaxGameAge(const QTime &maxGameAge);
38     void setGameTypeEnabled(QString gametype, bool enabled);
39     void setGameHashedTypeEnabled(QString gametypeHASHED, bool enabled);
40     void setShowOnlyIfSpectatorsCanWatch(bool show);
41     void setShowSpectatorPasswordProtected(bool show);
42     void setShowOnlyIfSpectatorsCanChat(bool show);
43     void setShowOnlyIfSpectatorsCanSeeHands(bool show);
44 signals:
45 
46 public slots:
47 
48 private:
49     explicit GameFiltersSettings(QString settingPath, QObject *parent = nullptr);
50     GameFiltersSettings(const GameFiltersSettings & /*other*/);
51 
52     QString hashGameType(const QString &gameType) const;
53 };
54 
55 #endif // GAMEFILTERSSETTINGS_H
56