WaterLevelSensor/configinterface.h

30 lines
719 B
C
Raw 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();
2026-09-23 17:36:00 +05:30
void configDeleted();
2026-08-04 21:31:40 +05:30
public slots:
2026-09-23 17:36:00 +05:30
void deleteConfig();
2026-08-04 21:31:40 +05:30
void saveConfig(QJsonObject config);
private:
QString m_fileName;
};
#endif // CONFIGINTERFACE_H