add setting to settingsCache

This commit is contained in:
RickyRister 2025-06-12 22:42:15 -07:00
parent e388b83fa7
commit 995e5d94aa
4 changed files with 21 additions and 0 deletions

View file

@ -237,6 +237,7 @@ SettingsCache::SettingsCache()
redirectCacheTtl = settings->value("personal/redirectCacheTtl", NETWORK_REDIRECT_CACHE_TTL_DEFAULT).toInt(); redirectCacheTtl = settings->value("personal/redirectCacheTtl", NETWORK_REDIRECT_CACHE_TTL_DEFAULT).toInt();
picDownload = settings->value("personal/picturedownload", true).toBool(); picDownload = settings->value("personal/picturedownload", true).toBool();
showStatusBar = settings->value("personal/showStatusBar", true).toBool();
mainWindowGeometry = settings->value("interface/main_window_geometry").toByteArray(); mainWindowGeometry = settings->value("interface/main_window_geometry").toByteArray();
tokenDialogGeometry = settings->value("interface/token_dialog_geometry").toByteArray(); tokenDialogGeometry = settings->value("interface/token_dialog_geometry").toByteArray();
@ -589,6 +590,13 @@ void SettingsCache::setPicDownload(QT_STATE_CHANGED_T _picDownload)
emit picDownloadChanged(); emit picDownloadChanged();
} }
void SettingsCache::setShowStatusBar(bool value)
{
showStatusBar = value;
settings->setValue("personal/showStatusBar", showStatusBar);
emit showStatusBarChanged(value);
}
void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled)
{ {
notificationsEnabled = static_cast<bool>(_notificationsEnabled); notificationsEnabled = static_cast<bool>(_notificationsEnabled);

View file

@ -55,6 +55,7 @@ signals:
void cardDatabasePathChanged(); void cardDatabasePathChanged();
void themeChanged(); void themeChanged();
void picDownloadChanged(); void picDownloadChanged();
void showStatusBarChanged(bool state);
void displayCardNamesChanged(); void displayCardNamesChanged();
void overrideAllCardArtWithPersonalPreferenceChanged(bool _overrideAllCardArtWithPersonalPreference); void overrideAllCardArtWithPersonalPreferenceChanged(bool _overrideAllCardArtWithPersonalPreference);
void bumpSetsWithCardsInDeckToTopChanged(); void bumpSetsWithCardsInDeckToTopChanged();
@ -222,6 +223,7 @@ private:
QList<ReleaseChannel *> releaseChannels; QList<ReleaseChannel *> releaseChannels;
bool isPortableBuild; bool isPortableBuild;
bool roundCardCorners; bool roundCardCorners;
bool showStatusBar;
public: public:
SettingsCache(); SettingsCache();
@ -333,6 +335,10 @@ public:
{ {
return picDownload; return picDownload;
} }
bool getShowStatusBar() const
{
return showStatusBar;
}
bool getNotificationsEnabled() const bool getNotificationsEnabled() const
{ {
return notificationsEnabled; return notificationsEnabled;
@ -828,6 +834,7 @@ public slots:
void setChatMentionColor(const QString &_chatMentionColor); void setChatMentionColor(const QString &_chatMentionColor);
void setChatHighlightColor(const QString &_chatHighlightColor); void setChatHighlightColor(const QString &_chatHighlightColor);
void setPicDownload(QT_STATE_CHANGED_T _picDownload); void setPicDownload(QT_STATE_CHANGED_T _picDownload);
void setShowStatusBar(bool value);
void setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled); void setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled);
void setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T _spectatorNotificationsEnabled); void setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T _spectatorNotificationsEnabled);
void setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T _buddyConnectNotificationsEnabled); void setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T _buddyConnectNotificationsEnabled);

View file

@ -160,6 +160,9 @@ void SettingsCache::setTabLogOpen(bool /*value*/)
void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
{ {
} }
void SettingsCache::setShowStatusBar(bool /* value */)
{
}
void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */)
{ {
} }

View file

@ -164,6 +164,9 @@ void SettingsCache::setTabLogOpen(bool /*value*/)
void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
{ {
} }
void SettingsCache::setShowStatusBar(bool /* value */)
{
}
void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */)
{ {
} }