mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 10:03:55 -07:00
Game filter for games created by buddy (#5991)
This commit is contained in:
parent
6cb4e203f1
commit
61a6b32137
7 changed files with 45 additions and 2 deletions
|
|
@ -37,6 +37,9 @@ DlgFilterGames::DlgFilterGames(const QMap<int, QString> &_allGameTypes,
|
|||
hideIgnoredUserGames = new QCheckBox(tr("Hide 'ignored user' games"));
|
||||
hideIgnoredUserGames->setChecked(gamesProxyModel->getHideIgnoredUserGames());
|
||||
|
||||
hideNotBuddyCreatedGames = new QCheckBox(tr("Hide games not created by buddy"));
|
||||
hideNotBuddyCreatedGames->setChecked(gamesProxyModel->getHideNotBuddyCreatedGames());
|
||||
|
||||
maxGameAgeComboBox = new QComboBox();
|
||||
maxGameAgeComboBox->setEditable(false);
|
||||
maxGameAgeComboBox->addItems(gameAgeMap.values());
|
||||
|
|
@ -111,6 +114,7 @@ DlgFilterGames::DlgFilterGames(const QMap<int, QString> &_allGameTypes,
|
|||
restrictionsLayout->addWidget(hidePasswordProtectedGames, 2, 0);
|
||||
restrictionsLayout->addWidget(hideBuddiesOnlyGames, 3, 0);
|
||||
restrictionsLayout->addWidget(hideIgnoredUserGames, 4, 0);
|
||||
restrictionsLayout->addWidget(hideNotBuddyCreatedGames, 5, 0);
|
||||
|
||||
auto *restrictionsGroupBox = new QGroupBox(tr("Restrictions"));
|
||||
restrictionsGroupBox->setLayout(restrictionsLayout);
|
||||
|
|
@ -209,6 +213,11 @@ bool DlgFilterGames::getHideIgnoredUserGames() const
|
|||
return hideIgnoredUserGames->isChecked();
|
||||
}
|
||||
|
||||
bool DlgFilterGames::getHideNotBuddyCreatedGames() const
|
||||
{
|
||||
return hideNotBuddyCreatedGames->isChecked();
|
||||
}
|
||||
|
||||
QString DlgFilterGames::getGameNameFilter() const
|
||||
{
|
||||
return gameNameFilterEdit->text();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ private:
|
|||
QCheckBox *hideGamesThatStarted;
|
||||
QCheckBox *hidePasswordProtectedGames;
|
||||
QCheckBox *hideIgnoredUserGames;
|
||||
QCheckBox *hideNotBuddyCreatedGames;
|
||||
QLineEdit *gameNameFilterEdit;
|
||||
QLineEdit *creatorNameFilterEdit;
|
||||
QMap<int, QCheckBox *> gameTypeFilterCheckBoxes;
|
||||
|
|
@ -58,6 +59,7 @@ public:
|
|||
void setHideBuddiesOnlyGames(bool _hideBuddiesOnlyGames);
|
||||
bool getHideIgnoredUserGames() const;
|
||||
void setHideIgnoredUserGames(bool _hideIgnoredUserGames);
|
||||
bool getHideNotBuddyCreatedGames() const;
|
||||
QString getGameNameFilter() const;
|
||||
void setGameNameFilter(const QString &_gameNameFilter);
|
||||
QString getCreatorNameFilter() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue