summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSettingsProvider.h')
-rw-r--r--Swift/QtUI/QtSettingsProvider.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/Swift/QtUI/QtSettingsProvider.h b/Swift/QtUI/QtSettingsProvider.h
index 8eeb854..ececa6e 100644
--- a/Swift/QtUI/QtSettingsProvider.h
+++ b/Swift/QtUI/QtSettingsProvider.h
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2012 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtSettingsProvider_H
-#define SWIFT_QtSettingsProvider_H
+#pragma once
-#include "Swift/Controllers/Settings/SettingsProvider.h"
+#include <Swift/Controllers/Settings/SettingsProvider.h>
#include <QSettings>
@@ -17,16 +16,18 @@ class QtSettingsProvider : public SettingsProvider {
public:
QtSettingsProvider();
virtual ~QtSettingsProvider();
- virtual std::string getStringSetting(const std::string &settingPath);
- virtual void storeString(const std::string &settingPath, const std::string &settingValue);
- virtual bool getBoolSetting(const std::string &settingPath, bool defaultValue);
- virtual void storeBool(const std::string &settingPath, bool settingValue);
- virtual int getIntSetting(const std::string &settingPath, int defaultValue);
- virtual void storeInt(const std::string &settingPath, int settingValue);
+ virtual std::string getSetting(const Setting<std::string>& setting);
+ virtual void storeSetting(const Setting<std::string>& setting, const std::string& value);
+ virtual bool getSetting(const Setting<bool>& setting);
+ virtual void storeSetting(const Setting<bool>& setting, const bool& value);
+ virtual int getSetting(const Setting<int>& setting);
+ virtual void storeSetting(const Setting<int>& setting, const int& value);
virtual std::vector<std::string> getAvailableProfiles();
virtual void createProfile(const std::string& profile);
virtual void removeProfile(const std::string& profile);
QSettings* getQSettings();
+ protected:
+ virtual bool getIsSettingFinal(const std::string& settingPath);
private:
void updatePermissions();
@@ -36,7 +37,7 @@ class QtSettingsProvider : public SettingsProvider {
};
}
-#endif
+