diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-06-23 19:35:48 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-23 19:49:57 -0700 |
commit | 206df227f8cf7026af7f67a49d717ba67a51d944 (patch) | |
tree | 0bd08af223a474fa178abb9e119c3c2fe66b32b1 /mobile-widgets/qmlmanager.cpp | |
parent | 26b206af1ffdc2c73c5f2bd5f82e6559710b480b (diff) | |
download | subsurface-206df227f8cf7026af7f67a49d717ba67a51d944.tar.gz |
QML UI: remember the theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9c78b2eb0..4e7310407 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1250,6 +1250,21 @@ void QMLManager::setTimeThreshold(int time) emit timeThresholdChanged(); } +void QMLManager::setTheme(QString theme) +{ + QSettings s; + s.beginGroup("Theme"); + s.setValue("currentTheme", theme); + emit themeChanged(); +} + +QString QMLManager::theme() const +{ + QSettings s; + s.beginGroup("Theme"); + return s.value("currentTheme", "Blue").toString(); +} + bool QMLManager::loadFromCloud() const { return m_loadFromCloud; |