Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
game_filter_configs.h
Go to the documentation of this file.
1
#ifndef COCKATRICE_GAME_FILTER_CONFIGS_H
2
#define COCKATRICE_GAME_FILTER_CONFIGS_H
3
4
#include <QList>
5
#include <QSet>
6
#include <QSharedPointer>
7
#include <QString>
8
#include <QStringList>
9
#include <QTime>
10
14
struct
GameFilterConfigs
15
{
16
static
constexpr
int
DEFAULT_MAX_PLAYERS_MIN
= 1;
17
static
constexpr
int
DEFAULT_MAX_PLAYERS_MAX
= 99;
18
19
bool
hideBuddiesOnlyGames
=
false
;
20
// Defaults to true to match GameFiltersSettings::isHideIgnoredUserGames(), so freshly loaded
21
// filters compare equal to a default-constructed config.
22
bool
hideIgnoredUserGames
=
true
;
23
bool
hideFullGames
=
false
;
24
bool
hideGamesThatStarted
=
false
;
25
bool
hidePasswordProtectedGames
=
false
;
26
bool
hideNotBuddyCreatedGames
=
false
;
27
bool
hideOpenDecklistGames
=
false
;
28
QString
gameNameFilter
=
""
;
29
QStringList
hostNameFilters
= {};
30
QSet<int>
gameTypeFilter
= {};
31
int
maxPlayersFilterMin
=
DEFAULT_MAX_PLAYERS_MIN
;
32
int
maxPlayersFilterMax
=
DEFAULT_MAX_PLAYERS_MAX
;
33
QTime
maxGameAge
= {};
34
bool
showOnlyIfSpectatorsCanWatch
=
false
;
35
bool
showSpectatorPasswordProtected
=
false
;
36
bool
showOnlyIfSpectatorsCanChat
=
false
;
37
bool
showOnlyIfSpectatorsCanSeeHands
=
false
;
38
39
bool
operator==
(
const
GameFilterConfigs
&)
const
=
default
;
40
46
bool
isDefault
()
const
;
47
};
48
49
#endif
// COCKATRICE_GAME_FILTER_CONFIGS_H
QSet
Definition
dlg_manage_sets.h:29
GameFilterConfigs
The possible game filter configs.
Definition
game_filter_configs.h:15
GameFilterConfigs::hideNotBuddyCreatedGames
bool hideNotBuddyCreatedGames
Definition
game_filter_configs.h:26
GameFilterConfigs::hostNameFilters
QStringList hostNameFilters
Definition
game_filter_configs.h:29
GameFilterConfigs::showOnlyIfSpectatorsCanChat
bool showOnlyIfSpectatorsCanChat
Definition
game_filter_configs.h:36
GameFilterConfigs::gameTypeFilter
QSet< int > gameTypeFilter
Definition
game_filter_configs.h:30
GameFilterConfigs::hideOpenDecklistGames
bool hideOpenDecklistGames
Definition
game_filter_configs.h:27
GameFilterConfigs::showSpectatorPasswordProtected
bool showSpectatorPasswordProtected
Definition
game_filter_configs.h:35
GameFilterConfigs::maxGameAge
QTime maxGameAge
Definition
game_filter_configs.h:33
GameFilterConfigs::DEFAULT_MAX_PLAYERS_MAX
static constexpr int DEFAULT_MAX_PLAYERS_MAX
Definition
game_filter_configs.h:17
GameFilterConfigs::gameNameFilter
QString gameNameFilter
Definition
game_filter_configs.h:28
GameFilterConfigs::isDefault
bool isDefault() const
Checks if this config has exactly the default values.
Definition
game_filter_configs.cpp:3
GameFilterConfigs::showOnlyIfSpectatorsCanWatch
bool showOnlyIfSpectatorsCanWatch
Definition
game_filter_configs.h:34
GameFilterConfigs::hideFullGames
bool hideFullGames
Definition
game_filter_configs.h:23
GameFilterConfigs::showOnlyIfSpectatorsCanSeeHands
bool showOnlyIfSpectatorsCanSeeHands
Definition
game_filter_configs.h:37
GameFilterConfigs::hideIgnoredUserGames
bool hideIgnoredUserGames
Definition
game_filter_configs.h:22
GameFilterConfigs::maxPlayersFilterMin
int maxPlayersFilterMin
Definition
game_filter_configs.h:31
GameFilterConfigs::operator==
bool operator==(const GameFilterConfigs &) const =default
GameFilterConfigs::DEFAULT_MAX_PLAYERS_MIN
static constexpr int DEFAULT_MAX_PLAYERS_MIN
Definition
game_filter_configs.h:16
GameFilterConfigs::hidePasswordProtectedGames
bool hidePasswordProtectedGames
Definition
game_filter_configs.h:25
GameFilterConfigs::hideBuddiesOnlyGames
bool hideBuddiesOnlyGames
Definition
game_filter_configs.h:19
GameFilterConfigs::maxPlayersFilterMax
int maxPlayersFilterMax
Definition
game_filter_configs.h:32
GameFilterConfigs::hideGamesThatStarted
bool hideGamesThatStarted
Definition
game_filter_configs.h:24
cockatrice
src
interface
widgets
server
game_filter_configs.h
Generated by
1.18.0