2013-05-08 01:33:42 +00:00
|
|
|
#ifndef USERSETTINGS_HPP
|
|
|
|
#define USERSETTINGS_HPP
|
|
|
|
|
|
|
|
#include <QTextStream>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QString>
|
|
|
|
#include <QMap>
|
|
|
|
|
|
|
|
#include <boost/filesystem/path.hpp>
|
|
|
|
|
|
|
|
#include "support.hpp"
|
|
|
|
|
|
|
|
namespace Files { typedef std::vector<boost::filesystem::path> PathContainer;
|
|
|
|
struct ConfigurationManager;}
|
|
|
|
|
|
|
|
class QFile;
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
namespace CSMSettings {
|
2013-05-08 01:33:42 +00:00
|
|
|
|
2013-05-12 01:55:36 +00:00
|
|
|
struct UserSettings
|
2013-05-08 01:33:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-05-12 01:55:36 +00:00
|
|
|
|
|
|
|
static UserSettings &instance()
|
|
|
|
{
|
|
|
|
static UserSettings instance;
|
|
|
|
|
|
|
|
return instance;
|
|
|
|
}
|
2013-05-08 01:33:42 +00:00
|
|
|
|
|
|
|
QFile *openFile (const QString &);
|
|
|
|
bool writeFile(QFile *file, QMap<QString, SettingList *> §ions);
|
|
|
|
void getSettings (QTextStream &stream, SectionMap &settings);
|
|
|
|
|
|
|
|
private:
|
2013-05-12 01:55:36 +00:00
|
|
|
|
|
|
|
UserSettings *mUserSettingsInstance;
|
|
|
|
UserSettings();
|
|
|
|
~UserSettings();
|
|
|
|
|
|
|
|
UserSettings (UserSettings const &); //not implemented
|
|
|
|
void operator= (UserSettings const &); //not implemented
|
2013-05-08 01:33:42 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // USERSETTINGS_HPP
|