mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
* [Settings] Shuffle some settings around Took 21 minutes Took 1 hour 25 minutes * [Settings] Camel case everything * Revert debug schema change * Add new classes * Fix card counters writing to global * Fix CI tests * Fix Windows CI * interface() is a protected keyword for MSVC Took 5 minutes Took 5 seconds * [Settings] Keep menu settings on the appearance settings page Leave the 'Menu settings' group box on the appearance settings page for now; relocating it to the user interface settings page will be done in a separate PR. Took 6 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
216 lines
6.6 KiB
C++
216 lines
6.6 KiB
C++
#include "cards_display_settings.h"
|
|
|
|
CardsDisplaySettings::CardsDisplaySettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "cards_display.ini", "cards", QString(), parent)
|
|
{
|
|
}
|
|
|
|
bool CardsDisplaySettings::getDisplayCardNames() const
|
|
{
|
|
return getValue("displayCardNames", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getRoundCardCorners() const
|
|
{
|
|
return getValue("roundCardCorners", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getOverrideAllCardArtWithPersonalPreference() const
|
|
{
|
|
return getValue("overrideAllCardArtWithPersonalPreference", QString(), QString(), false).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getBumpSetsWithCardsInDeckToTop() const
|
|
{
|
|
return getValue("bumpSetsWithCardsInDeckToTop", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
int CardsDisplaySettings::getPrintingSelectorSortOrder() const
|
|
{
|
|
return getValue("sortOrder", "cards", "printingSelector", 1).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getPrintingSelectorCardSize() const
|
|
{
|
|
return getValue("printingSelector", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getIncludeRebalancedCards() const
|
|
{
|
|
return getValue("includerebalancedcards", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getPrintingSelectorNavigationButtonsVisible() const
|
|
{
|
|
return getValue("navigationButtonsVisible", "cards", "printingSelector", true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getTapAnimation() const
|
|
{
|
|
return getValue("tapAnimation", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getAutoRotateSidewaysLayoutCards() const
|
|
{
|
|
return getValue("autoRotateSidewaysLayoutCards", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
bool CardsDisplaySettings::getScaleCards() const
|
|
{
|
|
return getValue("scaleCards", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
int CardsDisplaySettings::getStackCardOverlapPercent() const
|
|
{
|
|
return getValue("verticalCardOverlapPercent", QString(), QString(), 33).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getCardInfoViewMode() const
|
|
{
|
|
return getValue("cardInfoViewMode", QString(), QString(), 0).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getVisualDeckStorageCardSize() const
|
|
{
|
|
return getValue("visualDeckStorage", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getVisualDatabaseDisplayCardSize() const
|
|
{
|
|
return getValue("visualDatabaseDisplay", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getVisualDeckEditorCardSize() const
|
|
{
|
|
return getValue("visualDeckEditor", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getEDHRecCardSize() const
|
|
{
|
|
return getValue("edhrec", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getArchidektPreviewSize() const
|
|
{
|
|
return getValue("archidektPreview", "cards", "cardSize", 100).toInt();
|
|
}
|
|
|
|
int CardsDisplaySettings::getSampleHandSize() const
|
|
{
|
|
return getValue("sampleHandSize", "cards", "cardSize", 7).toInt();
|
|
}
|
|
|
|
void CardsDisplaySettings::setDisplayCardNames(bool _displayCardNames)
|
|
{
|
|
setValue(_displayCardNames, "displayCardNames");
|
|
emit displayCardNamesChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setRoundCardCorners(bool _roundCardCorners)
|
|
{
|
|
if (_roundCardCorners == getRoundCardCorners()) {
|
|
return;
|
|
}
|
|
setValue(_roundCardCorners, "roundCardCorners");
|
|
emit roundCardCornersChanged(_roundCardCorners);
|
|
}
|
|
|
|
void CardsDisplaySettings::setOverrideAllCardArtWithPersonalPreference(bool _overrideAllCardArt)
|
|
{
|
|
setValue(_overrideAllCardArt, "overrideAllCardArtWithPersonalPreference");
|
|
emit overrideAllCardArtWithPersonalPreferenceChanged(_overrideAllCardArt);
|
|
}
|
|
|
|
void CardsDisplaySettings::setBumpSetsWithCardsInDeckToTop(bool _bumpSetsWithCardsInDeckToTop)
|
|
{
|
|
setValue(_bumpSetsWithCardsInDeckToTop, "bumpSetsWithCardsInDeckToTop");
|
|
emit bumpSetsWithCardsInDeckToTopChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setPrintingSelectorSortOrder(int _printingSelectorSortOrder)
|
|
{
|
|
setValue(_printingSelectorSortOrder, "sortOrder", "cards", "printingSelector");
|
|
emit printingSelectorSortOrderChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setPrintingSelectorCardSize(int _printingSelectorCardSize)
|
|
{
|
|
setValue(_printingSelectorCardSize, "printingSelector", "cards", "cardSize");
|
|
emit printingSelectorCardSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setIncludeRebalancedCards(bool _includeRebalancedCards)
|
|
{
|
|
if (_includeRebalancedCards == getIncludeRebalancedCards()) {
|
|
return;
|
|
}
|
|
setValue(_includeRebalancedCards, "includerebalancedcards");
|
|
emit includeRebalancedCardsChanged(_includeRebalancedCards);
|
|
}
|
|
|
|
void CardsDisplaySettings::setPrintingSelectorNavigationButtonsVisible(bool _navigationButtonsVisible)
|
|
{
|
|
setValue(_navigationButtonsVisible, "navigationButtonsVisible", "cards", "printingSelector");
|
|
emit printingSelectorNavigationButtonsVisibleChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setTapAnimation(bool _tapAnimation)
|
|
{
|
|
setValue(_tapAnimation, "tapAnimation");
|
|
}
|
|
|
|
void CardsDisplaySettings::setAutoRotateSidewaysLayoutCards(bool _autoRotateSidewaysLayoutCards)
|
|
{
|
|
setValue(_autoRotateSidewaysLayoutCards, "autoRotateSidewaysLayoutCards");
|
|
}
|
|
|
|
void CardsDisplaySettings::setCardScaling(bool _scaleCards)
|
|
{
|
|
setValue(_scaleCards, "scaleCards");
|
|
}
|
|
|
|
void CardsDisplaySettings::setStackCardOverlapPercent(int _verticalCardOverlapPercent)
|
|
{
|
|
setValue(_verticalCardOverlapPercent, "verticalCardOverlapPercent");
|
|
}
|
|
|
|
void CardsDisplaySettings::setCardInfoViewMode(int _viewMode)
|
|
{
|
|
setValue(_viewMode, "cardInfoViewMode");
|
|
}
|
|
|
|
void CardsDisplaySettings::setVisualDeckStorageCardSize(int _cardSize)
|
|
{
|
|
setValue(_cardSize, "visualDeckStorage", "cards", "cardSize");
|
|
emit visualDeckStorageCardSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setVisualDatabaseDisplayCardSize(int _cardSize)
|
|
{
|
|
setValue(_cardSize, "visualDatabaseDisplay", "cards", "cardSize");
|
|
emit visualDatabaseDisplayCardSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setVisualDeckEditorCardSize(int _cardSize)
|
|
{
|
|
setValue(_cardSize, "visualDeckEditor", "cards", "cardSize");
|
|
emit visualDeckEditorCardSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setEDHRecCardSize(int _edhrecCardSize)
|
|
{
|
|
setValue(_edhrecCardSize, "edhrec", "cards", "cardSize");
|
|
emit edhRecCardSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setArchidektPreviewCardSize(int _archidektPreviewCardSize)
|
|
{
|
|
setValue(_archidektPreviewCardSize, "archidektPreview", "cards", "cardSize");
|
|
emit archidektPreviewSizeChanged();
|
|
}
|
|
|
|
void CardsDisplaySettings::setSampleHandSize(int _sampleHandSize)
|
|
{
|
|
setValue(_sampleHandSize, "sampleHandSize", "cards", "cardSize");
|
|
emit sampleHandSizeChanged(_sampleHandSize);
|
|
}
|