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