diff options
Diffstat (limited to 'Swift/QtUI/QtSettingsProvider.cpp')
-rw-r--r-- | Swift/QtUI/QtSettingsProvider.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSettingsProvider.cpp b/Swift/QtUI/QtSettingsProvider.cpp index 42540c1..cf02d83 100644 --- a/Swift/QtUI/QtSettingsProvider.cpp +++ b/Swift/QtUI/QtSettingsProvider.cpp @@ -19,5 +19,14 @@ void QtSettingsProvider::storeString(const String &settingPath, const String &se settings_.setValue(P2QSTRING(settingPath), P2QSTRING(settingValue)); } +bool QtSettingsProvider::getBoolSetting(const String &settingPath, bool defaultValue) { + QVariant setting = settings_.value(P2QSTRING(settingPath)); + return setting.isNull() ? defaultValue : setting.toBool(); +} + +void QtSettingsProvider::storeBool(const String &settingPath, bool settingValue) { + settings_.setValue(P2QSTRING(settingPath), settingValue); +} + } |