Added ValueModel, first run.
This commit is contained in:
15
bcvalue.h
15
bcvalue.h
@@ -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 );
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user