1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 20:53:53 +00:00
openmw/apps/opencs/model/settings/usersettings.hpp

54 lines
1.2 KiB
C++
Raw Normal View History

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;
namespace CSMSettings {
2013-05-08 01:33:42 +00:00
struct UserSettings: public QObject
2013-05-08 01:33:42 +00:00
{
Q_OBJECT
2013-05-08 01:33:42 +00:00
public:
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 *> &sections);
void getSettings (QTextStream &stream, SectionMap &settings);
2013-06-08 22:34:27 +00:00
QString getSettingValue(QString section, QString setting);
2013-05-08 01:33:42 +00:00
private:
UserSettings *mUserSettingsInstance;
UserSettings();
~UserSettings();
UserSettings (UserSettings const &); //not implemented
void operator= (UserSettings const &); //not implemented
2013-05-08 01:33:42 +00:00
signals:
void signalUpdateEditorSetting (const QString &settingName, const QString &settingValue);
2013-05-08 01:33:42 +00:00
};
}
#endif // USERSETTINGS_HPP