-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQtGuiSettings.h
37 lines (26 loc) · 962 Bytes
/
QtGuiSettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef QTGUISETTINGS_H
#define QTGUISETTINGS_H
#define SETTINGS settings
#include <QVariant>
#include <QString>
#include <QSettings>
#define QSSETCONF(X,Y) autoSetValue(this, X, Y)
#define QSGETCONF(X,Y) autoGetValue(this, X, Y)
class QtGuiSettings : public QSettings {
Q_OBJECT
public:
QtGuiSettings(QObject *parent);
//QtGuiSettings(const QString &fileName, QSettings::Format format, QObject *parent = nullptr);
//~QtGuiSettings();
public slots:
QVariant getValue(const QString &group, const QString &key, const QVariant &defaultValue);
QVariant getValue(const QString &group, const QString &key);
void setValue(const QString &group, const QString &key, const QVariant &value);
void removeValue(const QString &group, const QString &key);
void removeGroup(const QString &group);
private:
//static QtGuiSettings *instance;
//QSettings settings;
};
extern QtGuiSettings *settings;
#endif // QTGUISETTINGS_H