#ifndef PERSISTENTDATA_H #define PERSISTENTDATA_H #include #include #include #include #include class PersistentData : public QObject { Q_OBJECT public: explicit PersistentData(const QString &datafileName, QObject *parent = nullptr); void setDCFirmwareVersion(const QString & fw_version); QString getDCFirmwareVersion(); QVariant getParameter(const QString & key); QVariant getParameter(const QString & key) const; void setParameter(const QString & key, QVariant value); void clearParameter(const QString & key); bool hasParameter(const QString & key) const; uint getUintParameter(const QString & key) const; QList uniqueKeys() const; public slots: void serializeToFile(); signals: private: QHash hash; QString dc_fw_version; QString filename; void save(); void read(); bool isChangedFlag; }; #endif // PERSISTENTDATA_H