2012-01-11 21:58:25 +01:00
|
|
|
#ifndef SETTINGS_H
|
|
|
|
#define SETTINGS_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QSettings>
|
|
|
|
|
2012-01-21 20:27:45 +01:00
|
|
|
class Settings
|
2012-01-11 21:58:25 +01:00
|
|
|
{
|
|
|
|
public:
|
2012-01-21 20:27:45 +01:00
|
|
|
explicit Settings();
|
2012-01-11 21:58:25 +01:00
|
|
|
~Settings();
|
|
|
|
|
|
|
|
static void createSettings(const QString &fileName);
|
|
|
|
static void syncSettings();
|
|
|
|
|
|
|
|
void setValue(const QString &key, const QVariant &defaultValue = QVariant());
|
|
|
|
QVariant value(const QString &key, const QVariant &defaultValue = QVariant());
|
|
|
|
|
|
|
|
void beginGroup(const QString &prefix);
|
|
|
|
void endGroup();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
private:
|
|
|
|
static QSettings* m_settings;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGS_H
|