mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
82 lines
2.2 KiB
C++
82 lines
2.2 KiB
C++
#include "appearance_settings.h"
|
|
|
|
AppearanceSettings::AppearanceSettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "appearance.ini", "appearance", QString(), parent)
|
|
{
|
|
}
|
|
|
|
QString AppearanceSettings::getThemeName() const
|
|
{
|
|
return getValue("themeName", QString(), QString()).toString();
|
|
}
|
|
|
|
void AppearanceSettings::setThemeName(const QString &_themeName)
|
|
{
|
|
setValue(_themeName, "themeName");
|
|
emit themeNameChanged();
|
|
}
|
|
|
|
bool AppearanceSettings::getStyleUserList() const
|
|
{
|
|
return getValue("styleUserList", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
void AppearanceSettings::setStyleUserList(bool _styleUserList)
|
|
{
|
|
setValue(_styleUserList, "styleUserList");
|
|
emit styleUserListChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getMaxFontSize() const
|
|
{
|
|
return getValue("maxFontSize", QString(), QString(), 12).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setMaxFontSize(int _max)
|
|
{
|
|
setValue(_max, "maxFontSize");
|
|
}
|
|
|
|
QString AppearanceSettings::getHomeTabBackgroundSource() const
|
|
{
|
|
return getValue("homeTabBackgroundSource", QString(), QString(), "themed").toString();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabBackgroundSource(const QString &_backgroundSource)
|
|
{
|
|
setValue(_backgroundSource, "homeTabBackgroundSource");
|
|
emit homeTabBackgroundSourceChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getHomeTabBackgroundShuffleFrequency() const
|
|
{
|
|
return getValue("homeTabBackgroundShuffleFrequency", QString(), QString(), 0).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabBackgroundShuffleFrequency(int _frequency)
|
|
{
|
|
setValue(_frequency, "homeTabBackgroundShuffleFrequency");
|
|
emit homeTabBackgroundShuffleFrequencyChanged();
|
|
}
|
|
|
|
bool AppearanceSettings::getHomeTabDisplayCardName() const
|
|
{
|
|
return getValue("homeTabDisplayCardName", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabDisplayCardName(bool _displayCardName)
|
|
{
|
|
setValue(_displayCardName, "homeTabDisplayCardName");
|
|
emit homeTabDisplayCardNameChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getHomeTabButtonColorSourceIndex() const
|
|
{
|
|
return getValue("homeTabButtonColorSource", "", "", 0).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabButtonColorSourceIndex(int index)
|
|
{
|
|
setValue(index, "homeTabButtonColorSource");
|
|
emit homeTabButtonColorChanged();
|
|
}
|