mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[Settings] Shuffle some settings around (#7084)
* [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>
This commit is contained in:
parent
bf6b2a90bc
commit
adf574e038
79 changed files with 1899 additions and 1123 deletions
|
|
@ -10,61 +10,6 @@ QString PersonalSettings::getLang() const
|
|||
return getValue("lang", QString(), QString(), QString()).toString();
|
||||
}
|
||||
|
||||
QString PersonalSettings::getClientID()
|
||||
{
|
||||
return getValue("clientid", QString(), QString(), "notset").toString();
|
||||
}
|
||||
|
||||
QString PersonalSettings::getClientVersion()
|
||||
{
|
||||
return getValue("clientversion", QString(), QString(), "notset").toString();
|
||||
}
|
||||
|
||||
int PersonalSettings::getKeepAlive() const
|
||||
{
|
||||
return getValue("keepalive", QString(), QString(), 3).toInt();
|
||||
}
|
||||
|
||||
int PersonalSettings::getTimeOut() const
|
||||
{
|
||||
return getValue("timeout", QString(), QString(), 5).toInt();
|
||||
}
|
||||
|
||||
bool PersonalSettings::getPicDownload() const
|
||||
{
|
||||
return getValue("picturedownload", QString(), QString(), true).toBool();
|
||||
}
|
||||
|
||||
bool PersonalSettings::getShowStatusBar() const
|
||||
{
|
||||
return getValue("showStatusBar", QString(), QString(), false).toBool();
|
||||
}
|
||||
|
||||
int PersonalSettings::getMaxFontSize() const
|
||||
{
|
||||
return getValue("maxfontsize", "game", QString(), 12).toInt();
|
||||
}
|
||||
|
||||
QString PersonalSettings::getHighlightWords() const
|
||||
{
|
||||
return getValue("highlightWords", QString(), QString(), "").toString();
|
||||
}
|
||||
|
||||
QString PersonalSettings::getHomeTabBackgroundSource() const
|
||||
{
|
||||
return getValue("background", "home", QString(), "themed").toString();
|
||||
}
|
||||
|
||||
int PersonalSettings::getHomeTabBackgroundShuffleFrequency() const
|
||||
{
|
||||
return getValue("shuffleTimer", "home/background", QString(), 0).toInt();
|
||||
}
|
||||
|
||||
bool PersonalSettings::getHomeTabDisplayCardName() const
|
||||
{
|
||||
return getValue("displayCardName", "home/background", QString(), true).toBool();
|
||||
}
|
||||
|
||||
bool PersonalSettings::getShowTipsOnStartup() const
|
||||
{
|
||||
return getValue("showTips", "tipOfDay", QString(), true).toBool();
|
||||
|
|
@ -80,78 +25,12 @@ QList<int> PersonalSettings::getSeenTips() const
|
|||
return tips;
|
||||
}
|
||||
|
||||
bool PersonalSettings::getDownloadSpoilersStatus() const
|
||||
{
|
||||
return getValue("downloadspoilers", QString(), QString(), false).toBool();
|
||||
}
|
||||
|
||||
void PersonalSettings::setLang(const QString &_lang)
|
||||
{
|
||||
setValue(_lang, "lang");
|
||||
emit langChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setClientID(const QString &_clientID)
|
||||
{
|
||||
setValue(_clientID, "clientid");
|
||||
}
|
||||
|
||||
void PersonalSettings::setClientVersion(const QString &_clientVersion)
|
||||
{
|
||||
setValue(_clientVersion, "clientversion");
|
||||
}
|
||||
|
||||
void PersonalSettings::setPicDownload(bool _picDownload)
|
||||
{
|
||||
setValue(_picDownload, "picturedownload");
|
||||
emit picDownloadChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setShowStatusBar(bool value)
|
||||
{
|
||||
setValue(value, "showStatusBar");
|
||||
emit showStatusBarChanged(value);
|
||||
}
|
||||
|
||||
void PersonalSettings::setMaxFontSize(int _max)
|
||||
{
|
||||
setValue(_max, "maxfontsize", "game");
|
||||
}
|
||||
|
||||
QString PersonalSettings::getThemeName() const
|
||||
{
|
||||
return getValue("themeName", QString(), QString()).toString();
|
||||
}
|
||||
|
||||
void PersonalSettings::setThemeName(const QString &_themeName)
|
||||
{
|
||||
setValue(_themeName, "themeName");
|
||||
emit themeNameChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setHighlightWords(const QString &_highlightWords)
|
||||
{
|
||||
setValue(_highlightWords, "highlightWords");
|
||||
}
|
||||
|
||||
void PersonalSettings::setHomeTabBackgroundSource(const QString &_backgroundSource)
|
||||
{
|
||||
setValue(_backgroundSource, "background", "home");
|
||||
emit homeTabBackgroundSourceChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setHomeTabBackgroundShuffleFrequency(int _frequency)
|
||||
{
|
||||
setValue(_frequency, "shuffleTimer", "home/background");
|
||||
emit homeTabBackgroundShuffleFrequencyChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setHomeTabDisplayCardName(bool _displayCardName)
|
||||
{
|
||||
setValue(_displayCardName, "displayCardName", "home/background");
|
||||
emit homeTabDisplayCardNameChanged();
|
||||
}
|
||||
|
||||
void PersonalSettings::setShowTipsOnStartup(bool _showTipsOnStartup)
|
||||
{
|
||||
setValue(_showTipsOnStartup, "showTips", "tipOfDay");
|
||||
|
|
@ -165,9 +44,3 @@ void PersonalSettings::setSeenTips(const QList<int> &_seenTips)
|
|||
}
|
||||
setValue(QVariant::fromValue(storedTipList), "seenTips", "tipOfDay");
|
||||
}
|
||||
|
||||
void PersonalSettings::setDownloadSpoilerStatus(bool _spoilerStatus)
|
||||
{
|
||||
setValue(_spoilerStatus, "downloadspoilers");
|
||||
emit downloadSpoilerStatusChanged();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue