Http Version - Initial Commit
This commit is contained in:
commit
026ea97284
1 changed files with 978 additions and 0 deletions
28
configinterface.h
Normal file
28
configinterface.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef CONFIGINTERFACE_H
|
||||
#define CONFIGINTERFACE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
|
||||
class ConfigInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged FINAL)
|
||||
public:
|
||||
explicit ConfigInterface(QObject *parent = nullptr);
|
||||
QString fileName() const;
|
||||
void setFileName(const QString &newFileName);
|
||||
signals:
|
||||
void config(QJsonObject config);
|
||||
void fileNameChanged();
|
||||
public slots:
|
||||
void saveConfig(QJsonObject config);
|
||||
private:
|
||||
QString m_fileName;
|
||||
};
|
||||
|
||||
#endif // CONFIGINTERFACE_H
|
||||
Loading…
Reference in a new issue