Add option to disable bumping sets to the front of the list if the deck contains cards from the set.

This commit is contained in:
Lukas Brübach 2024-11-27 23:54:19 +01:00 committed by ZeldaZach
parent 3195a5ab68
commit 34bec790c7
No known key found for this signature in database
5 changed files with 39 additions and 10 deletions

View file

@ -244,6 +244,7 @@ SettingsCache::SettingsCache()
displayCardNames = settings->value("cards/displaycardnames", true).toBool();
overrideAllCardArtWithPersonalPreference =
settings->value("cards/overrideallcardartwithpersonalpreference", false).toBool();
bumpSetsWithCardsInDeckToTop = settings->value("cards/bumpsetswithcardsindecktotop", true).toBool();
horizontalHand = settings->value("hand/horizontal", true).toBool();
invertVerticalCoordinate = settings->value("table/invert_vertical", false).toBool();
minPlayersForMultiColumnLayout = settings->value("interface/min_players_multicolumn", 4).toInt();
@ -536,6 +537,13 @@ void SettingsCache::setOverrideAllCardArtWithPersonalPreference(QT_STATE_CHANGED
emit overrideAllCardArtWithPersonalPreferenceChanged();
}
void SettingsCache::setBumpSetsWithCardsInDeckToTop(QT_STATE_CHANGED_T _bumpSetsWithCardsInDeckToTop)
{
bumpSetsWithCardsInDeckToTop = static_cast<bool>(_bumpSetsWithCardsInDeckToTop);
settings->setValue("cards/bumpsetswithcardsindecktotop", bumpSetsWithCardsInDeckToTop);
emit bumpSetsWithCardsInDeckToTopChanged();
}
void SettingsCache::setHorizontalHand(QT_STATE_CHANGED_T _horizontalHand)
{
horizontalHand = static_cast<bool>(_horizontalHand);

View file

@ -49,6 +49,7 @@ signals:
void picDownloadChanged();
void displayCardNamesChanged();
void overrideAllCardArtWithPersonalPreferenceChanged();
void bumpSetsWithCardsInDeckToTopChanged();
void horizontalHandChanged();
void handJustificationChanged();
void invertVerticalCoordinateChanged();
@ -101,6 +102,7 @@ private:
bool showShortcuts;
bool displayCardNames;
bool overrideAllCardArtWithPersonalPreference;
bool bumpSetsWithCardsInDeckToTop;
bool horizontalHand;
bool invertVerticalCoordinate;
int minPlayersForMultiColumnLayout;
@ -305,6 +307,10 @@ public:
{
return overrideAllCardArtWithPersonalPreference;
}
bool getBumpSetsWithCardsInDeckToTop() const
{
return bumpSetsWithCardsInDeckToTop;
}
bool getHorizontalHand() const
{
return horizontalHand;
@ -585,6 +591,7 @@ public slots:
void setShowShortcuts(QT_STATE_CHANGED_T _showShortcuts);
void setDisplayCardNames(QT_STATE_CHANGED_T _displayCardNames);
void setOverrideAllCardArtWithPersonalPreference(QT_STATE_CHANGED_T _overrideAllCardArt);
void setBumpSetsWithCardsInDeckToTop(QT_STATE_CHANGED_T _bumpSetsWithCardsInDeckToTop);
void setHorizontalHand(QT_STATE_CHANGED_T _horizontalHand);
void setInvertVerticalCoordinate(QT_STATE_CHANGED_T _invertVerticalCoordinate);
void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout);