mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
update settings
This commit is contained in:
parent
8462b6e906
commit
5c889524dc
4 changed files with 129 additions and 0 deletions
|
|
@ -212,6 +212,14 @@ SettingsCache::SettingsCache()
|
|||
|
||||
themeName = settings->value("theme/name").toString();
|
||||
|
||||
tabVisualDeckStorageOpen = settings->value("tabs/visualDeckStorage", true).toBool();
|
||||
tabServerOpen = settings->value("tabs/server", true).toBool();
|
||||
tabAccountOpen = settings->value("tabs/account", true).toBool();
|
||||
tabDeckStorageOpen = settings->value("tabs/deckStorage", true).toBool();
|
||||
tabReplaysOpen = settings->value("tabs/replays", true).toBool();
|
||||
tabAdminOpen = settings->value("tabs/admin", true).toBool();
|
||||
tabLogOpen = settings->value("tabs/log", true).toBool();
|
||||
|
||||
// we only want to reset the cache once, then its up to the user
|
||||
bool updateCache = settings->value("revert/pixmapCacheSize", false).toBool();
|
||||
if (!updateCache) {
|
||||
|
|
@ -486,6 +494,48 @@ void SettingsCache::setThemeName(const QString &_themeName)
|
|||
emit themeChanged();
|
||||
}
|
||||
|
||||
void SettingsCache::setTabVisualDeckStorageOpen(bool value)
|
||||
{
|
||||
tabVisualDeckStorageOpen = value;
|
||||
settings->setValue("tabs/visualDeckStorage", tabVisualDeckStorageOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabServerOpen(bool value)
|
||||
{
|
||||
tabServerOpen = value;
|
||||
settings->setValue("tabs/server", tabServerOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabAccountOpen(bool value)
|
||||
{
|
||||
tabAccountOpen = value;
|
||||
settings->setValue("tabs/account", tabAccountOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabDeckStorageOpen(bool value)
|
||||
{
|
||||
tabDeckStorageOpen = value;
|
||||
settings->setValue("tabs/deckStorage", tabDeckStorageOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabReplaysOpen(bool value)
|
||||
{
|
||||
tabReplaysOpen = value;
|
||||
settings->setValue("tabs/replays", tabReplaysOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabAdminOpen(bool value)
|
||||
{
|
||||
tabAdminOpen = value;
|
||||
settings->setValue("tabs/admin", tabAdminOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setTabLogOpen(bool value)
|
||||
{
|
||||
tabLogOpen = value;
|
||||
settings->setValue("tabs/log", tabLogOpen);
|
||||
}
|
||||
|
||||
void SettingsCache::setPicDownload(QT_STATE_CHANGED_T _picDownload)
|
||||
{
|
||||
picDownload = static_cast<bool>(_picDownload);
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ private:
|
|||
QString lang;
|
||||
QString deckPath, replaysPath, picsPath, redirectCachePath, customPicsPath, cardDatabasePath,
|
||||
customCardDatabasePath, themesPath, spoilerDatabasePath, tokenDatabasePath, themeName;
|
||||
bool tabVisualDeckStorageOpen, tabServerOpen, tabAccountOpen, tabDeckStorageOpen, tabReplaysOpen, tabAdminOpen,
|
||||
tabLogOpen;
|
||||
bool checkUpdatesOnStartup;
|
||||
bool notifyAboutUpdates;
|
||||
bool notifyAboutNewVersion;
|
||||
|
|
@ -254,6 +256,34 @@ public:
|
|||
{
|
||||
return themeName;
|
||||
}
|
||||
bool getTabVisualDeckStorageOpen() const
|
||||
{
|
||||
return tabVisualDeckStorageOpen;
|
||||
}
|
||||
bool getTabServerOpen() const
|
||||
{
|
||||
return tabServerOpen;
|
||||
}
|
||||
bool getTabAccountOpen() const
|
||||
{
|
||||
return tabAccountOpen;
|
||||
}
|
||||
bool getTabDeckStorageOpen() const
|
||||
{
|
||||
return tabDeckStorageOpen;
|
||||
}
|
||||
bool getTabReplaysOpen() const
|
||||
{
|
||||
return tabReplaysOpen;
|
||||
}
|
||||
bool getTabAdminOpen() const
|
||||
{
|
||||
return tabAdminOpen;
|
||||
}
|
||||
bool getTabLogOpen() const
|
||||
{
|
||||
return tabLogOpen;
|
||||
}
|
||||
QString getChatMentionColor() const
|
||||
{
|
||||
return chatMentionColor;
|
||||
|
|
@ -681,6 +711,13 @@ public slots:
|
|||
void setSpoilerDatabasePath(const QString &_spoilerDatabasePath);
|
||||
void setTokenDatabasePath(const QString &_tokenDatabasePath);
|
||||
void setThemeName(const QString &_themeName);
|
||||
void setTabVisualDeckStorageOpen(bool value);
|
||||
void setTabServerOpen(bool value);
|
||||
void setTabAccountOpen(bool value);
|
||||
void setTabDeckStorageOpen(bool value);
|
||||
void setTabReplaysOpen(bool value);
|
||||
void setTabAdminOpen(bool value);
|
||||
void setTabLogOpen(bool value);
|
||||
void setChatMentionColor(const QString &_chatMentionColor);
|
||||
void setChatHighlightColor(const QString &_chatHighlightColor);
|
||||
void setPicDownload(QT_STATE_CHANGED_T _picDownload);
|
||||
|
|
|
|||
|
|
@ -124,6 +124,27 @@ void SettingsCache::setTokenDatabasePath(const QString & /* _tokenDatabasePath *
|
|||
void SettingsCache::setThemeName(const QString & /* _themeName */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabVisualDeckStorageOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabServerOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabAccountOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabDeckStorageOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabReplaysOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabAdminOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabLogOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,27 @@ void SettingsCache::setTokenDatabasePath(const QString & /* _tokenDatabasePath *
|
|||
void SettingsCache::setThemeName(const QString & /* _themeName */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabVisualDeckStorageOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabServerOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabAccountOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabDeckStorageOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabReplaysOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabAdminOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabLogOpen(bool /*value*/)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue