#ifndef USERSETTINGS_HPP #define USERSETTINGS_HPP #include #include #include #include #include #include "settingmanager.hpp" #ifndef Q_MOC_RUN #include #endif namespace Files { typedef std::vector PathContainer; struct ConfigurationManager;} class QFile; namespace CSMSettings { class UserSettings: public SettingManager { Q_OBJECT static UserSettings *mUserSettingsInstance; QString mUserFilePath; Files::ConfigurationManager mCfgMgr; QString mReadOnlyMessage; QString mReadWriteMessage; public: /// Singleton implementation static UserSettings& instance(); UserSettings(); ~UserSettings(); UserSettings (UserSettings const &); //not implemented void operator= (UserSettings const &); //not implemented /// Writes settings to the last loaded settings file bool writeSettings(); /// Retrieves the settings file at all three levels (global, local and user). void loadSettings (const QString &fileName); /// Writes settings to the user's config file path void saveSettings (const QMap &settingMap); QString settingValue (const QString §ion, const QString &name); private: void buildSettingModelDefaults(); signals: void userSettingUpdated(const QString &, const QStringList &); }; } #endif // USERSETTINGS_HPP