30 lines
564 B
C++
30 lines
564 B
C++
#ifndef APPSETTINGS_H
|
|
#define APPSETTINGS_H
|
|
|
|
#include <QFile>
|
|
#include <QObject>
|
|
#include <QtDebug>
|
|
#include <QSettings>
|
|
#include <QJsonArray>
|
|
#include <QJsonDocument>
|
|
#include <QStandardPaths>
|
|
|
|
class AppSettings : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AppSettings(QObject *parent = nullptr);
|
|
~AppSettings();
|
|
|
|
private:
|
|
QSettings *settingsManager;
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
Q_INVOKABLE QString read(QString key);
|
|
Q_INVOKABLE void write(QString key, QVariant variant);
|
|
};
|
|
extern AppSettings * pGlobalAppSettings;
|
|
|
|
#endif // APPSETTINGS_H
|