mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
filter buddies only
This commit is contained in:
parent
e038534a51
commit
089edc53d0
7 changed files with 56 additions and 3 deletions
|
|
@ -15,6 +15,17 @@ QString GameFiltersSettings::hashGameType(const QString &gameType) const
|
|||
return QCryptographicHash::hash(gameType.toUtf8(), QCryptographicHash::Md5).toHex();
|
||||
}
|
||||
|
||||
void GameFiltersSettings::setShowBuddiesOnlyGames(bool show)
|
||||
{
|
||||
setValue(show, "show_buddies_only_games", "filter_games");
|
||||
}
|
||||
|
||||
bool GameFiltersSettings::isShowBuddiesOnlyGames()
|
||||
{
|
||||
QVariant previous = getValue("show_buddies_only_games", "filter_games");
|
||||
return previous == QVariant() ? true : previous.toBool();
|
||||
}
|
||||
|
||||
void GameFiltersSettings::setUnavailableGamesVisible(bool enabled)
|
||||
{
|
||||
setValue(enabled, "unavailable_games_visible","filter_games");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ class GameFiltersSettings : public SettingsManager
|
|||
{
|
||||
Q_OBJECT
|
||||
friend class SettingsCache;
|
||||
public:
|
||||
public:
|
||||
bool isShowBuddiesOnlyGames();
|
||||
bool isUnavailableGamesVisible();
|
||||
bool isShowPasswordProtectedGames();
|
||||
QString getGameNameFilter();
|
||||
|
|
@ -15,6 +16,7 @@ public:
|
|||
int getMaxPlayers();
|
||||
bool isGameTypeEnabled(QString gametype);
|
||||
|
||||
void setShowBuddiesOnlyGames(bool show);
|
||||
void setUnavailableGamesVisible(bool enabled);
|
||||
void setShowPasswordProtectedGames(bool show);
|
||||
void setGameNameFilter(QString gameName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue