Added getter & setter for BCValue
This commit is contained in:
40
bcvalue.h
40
bcvalue.h
@@ -67,6 +67,8 @@ class BCValue
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
friend class BCXmlLoader;
|
||||
|
||||
public:
|
||||
|
||||
// Aus dem Type ergibt sich
|
||||
@@ -97,11 +99,46 @@ public:
|
||||
BCValue( BCDevice::ID deviceID_, BC::ID registerID_ );
|
||||
|
||||
QString formatValue() const;
|
||||
double calcRatio() const;
|
||||
double calcMinMaxRatio() const;
|
||||
void dumpValue() const;
|
||||
bool isWord() const;
|
||||
bool isReadOnly() const;
|
||||
|
||||
Flags& getValueFlags() const noexcept { return valueFlags; }
|
||||
void setValueFlags(Flags newFlags) { valueFlags = newFlags; }
|
||||
|
||||
BCDevice::ID getDeviceID() const noexcept { return deviceID; }
|
||||
//void setDeviceID(BCDevice::ID newDeviceID) { deviceID = newDeviceID; }
|
||||
|
||||
BC::ID getRegisterID() const noexcept { return registerID; }
|
||||
void setRegisterID(BC::ID newRegisterID) { registerID = newRegisterID; }
|
||||
|
||||
ValueType getValueType() const noexcept { return valueType; }
|
||||
void setValueType(ValueType newValueType) { valueType = newValueType; }
|
||||
|
||||
int getIndexRow() const noexcept { return indexRow; }
|
||||
void setIndexRow(int newIndexRow) { indexRow = newIndexRow; }
|
||||
|
||||
QString getLabel() const { return label; }
|
||||
void setLabel(const QString &newLabel) { label = newLabel; }
|
||||
|
||||
uint32_t getRawValue() const noexcept { return rawValue; }
|
||||
void setRawValue(uint32_t newRawValue) const { rawValue = newRawValue; }
|
||||
|
||||
QString getUnitLabel() const { return unitLabel; }
|
||||
void setUnitLabel(const QString &newUnitLabel) { unitLabel = newUnitLabel; }
|
||||
|
||||
double getFactor() const noexcept { return factor; }
|
||||
void setFactor(double newFactor) { factor = newFactor; }
|
||||
|
||||
const OptDouble getOptMin() const { return optMin; }
|
||||
void setOptMin(const OptDouble &newOptMin) { optMin = newOptMin; }
|
||||
|
||||
const OptDouble getOptMax() const { return optMax; }
|
||||
void setOptMax(const OptDouble &newOptMax) { optMax = newOptMax; }
|
||||
|
||||
protected:
|
||||
|
||||
mutable Flags valueFlags{BCValue::Flag::NoFlag};
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID registerID{BC::ID::Invalid};
|
||||
@@ -113,6 +150,7 @@ public:
|
||||
double factor{1};
|
||||
OptDouble optMin;
|
||||
OptDouble optMax;
|
||||
|
||||
};
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(BCValue::Flags)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user