diff options
Diffstat (limited to 'Swift/QtUI/QtSettingsProvider.cpp')
-rw-r--r-- | Swift/QtUI/QtSettingsProvider.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSettingsProvider.cpp b/Swift/QtUI/QtSettingsProvider.cpp new file mode 100644 index 0000000..42540c1 --- /dev/null +++ b/Swift/QtUI/QtSettingsProvider.cpp @@ -0,0 +1,23 @@ +#include "QtSettingsProvider.h" +#include "QtSwiftUtil.h" + +namespace Swift { + +QtSettingsProvider::QtSettingsProvider() { +} + +QtSettingsProvider::~QtSettingsProvider() { + +} + +String QtSettingsProvider::getStringSetting(const String &settingPath) { + QVariant setting = settings_.value(P2QSTRING(settingPath)); + return setting.isNull() ? "" : Q2PSTRING(setting.toString()); +} + +void QtSettingsProvider::storeString(const String &settingPath, const String &settingValue) { + settings_.setValue(P2QSTRING(settingPath), P2QSTRING(settingValue)); +} + +} + |