XX CMake Package
Loading...
Searching...
No Matches
XXSettings.h
Go to the documentation of this file.
1#ifndef XXSettingsH
2#define XXSettingsH
3
4#include "XXCoreExportDef.h"
5
6#include <QJsonArray>
7#include <QJsonObject>
8
9namespace XX
10{
13
15 {
16 public:
19
20 public:
21 static QString compileFileName();
22
23 void setValue(const QString& key, const QVariant& value);
24 QVariant value(const QString& key, const QVariant& defaultValue = QVariant()) const;
25 void clearValue(const QString& key);
26
27 void setJsonValue(const QString& key, const QJsonValue& value);
28 QJsonValue jsonValue(const QString& key) const;
29
30 private:
31 struct PathKey
32 {
33 QStringList path;
34 QString key;
35 };
36
37 private:
38 PathKey compilePathKey(const QString& key) const;
39
40 QJsonValue getPathValue(const PathKey& pathKey) const;
41 void setPathValue(const PathKey& pathKey, const QJsonValue& value);
42 void clearPath(const PathKey& pathKey);
43
44 private:
45 static QString fileName;
46 static int instanceCount;
47 static QJsonObject data;
48 static bool modified;
49
50 static const QString ByteArrayMarker;
51 };
52} // namespace XX
53
54#endif // NOT XXSettingsH
#define XXCORE_DECLSPEC
Definition XXCoreExportDef.h:11
void clearValue(const QString &key)
void setJsonValue(const QString &key, const QJsonValue &value)
QJsonValue jsonValue(const QString &key) const
static QString compileFileName()
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void setValue(const QString &key, const QVariant &value)
Definition XXPopulatedAbstract.h:11