#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; class QSettings; namespace CSMSettings { class UserSettings: public SettingManager { Q_OBJECT static UserSettings *mUserSettingsInstance; Files::ConfigurationManager mCfgMgr; QString mReadOnlyMessage; QString mReadWriteMessage; QSettings *mSettings; public: /// Singleton implementation static UserSettings& instance(); UserSettings(); ~UserSettings(); UserSettings (UserSettings const &); //not implemented void operator= (UserSettings const &); //not implemented /// 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 &settingKey); private: void buildSettingModelDefaults(); void displayFileErrorMessage(const QString &userpath, const QString &globalpath, const QString &localpath) const; }; } #endif // USERSETTINGS_HPP