WaterLevelSensor/configinterface.h

28 lines
668 B
C
Raw Permalink Normal View History

2026-08-04 21:31:40 +05:30
#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