Added BCValue creation, part I.

This commit is contained in:
2025-12-16 18:33:44 +01:00
parent 36ca1cf3f6
commit b0d347ef79
5 changed files with 169 additions and 38 deletions

View File

@@ -31,7 +31,12 @@
#ifndef BCVALUEMANAGER_H
#define BCVALUEMANAGER_H
#include <bcvalue.h>
#include <QMap>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QMetaEnum>
#include <bcvaluemodel.h>
class BCValueManager : public QObject
{
@@ -41,16 +46,21 @@ public:
BCValueManager();
~BCValueManager() = default;
BCValue* makeValue();
virtual ~BCValueManager();
void loadXml();
void saveXml();
protected:
void readDevice();
void makeValue(BCValueList& parsedValues);
QXmlStreamReader _xml;
QMap<QString,BCValueModel*> _valueModels;
BCDevice::ID _currentDeviceID{BCDevice::ID::Invalid};
QMetaEnum _bcDeviceEnum{QMetaEnum::fromType<BCDevice::ID>()};
QMetaEnum _bcValueEnum{QMetaEnum::fromType<BC::ID>()};
};
#endif // BCVALUEMANAGER_H