Added ValueModel, first run.

This commit is contained in:
2025-12-16 22:42:35 +01:00
parent afb5828a65
commit 4c5e42fcfd
8 changed files with 110 additions and 76 deletions

View File

@@ -34,15 +34,15 @@
#include <QString>
#include <QList>
#include <QVariant>
#include <bc.h>
using optDouble = std::optional<double>;
struct BCValueParams
{
BCDevice::ID DeviceID{BCDevice::ID::Invalid};
BC::ID ID{BC::ID::Invalid};
QString IDString;
QString ID;
QString Default;
QString Current;
QString Enabled;
@@ -74,12 +74,17 @@ public:
uint8_t getLongValue();
QString label;
BCDevice::ID deviceID{BCDevice::ID::Invalid};
BC::ID targetID{BC::ID::Invalid};
double value{-1};
optDouble min;
optDouble max;
optDouble factor;
QVariant defaultValue;
QVariant value;
static BCValue* makeValue( const BCValueParams& params );
static BCValue* makeValue( BCDevice::ID deviceID, const BCValueParams& params );
};