This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
app/headers/appsettings.h

29 lines
601 B
C
Raw Normal View History

#ifndef APPSETTINGS_H
#define APPSETTINGS_H
#include <QObject>
#include <QSettings>
#include <QStandardPaths>
class AppSettings : public QObject
{
Q_OBJECT
public:
explicit AppSettings(QObject *parent = nullptr);
~AppSettings();
Q_INVOKABLE QString loadSetting(const QString &key);
Q_INVOKABLE void writeSetting(const QString &key, const QVariant &variant);
2018-08-02 12:50:55 +02:00
Q_INVOKABLE void setDefaultSetting(const QString &key, const QVariant &defaultVariant);
QSettings *settingsManager;
signals:
public slots:
2018-08-02 12:50:55 +02:00
};
extern AppSettings * pGlobalAppSettings;
#endif // APPSETTINGS_H