Try BCValue as smartptr

This commit is contained in:
2026-01-02 01:43:49 +01:00
parent 43f72d1be6
commit fc5ab611bd
11 changed files with 60 additions and 69 deletions

View File

@@ -78,20 +78,16 @@ class BCValue
public:
enum class OpID : uint8_t
{
ReadValue,
WriteValue,
};
enum class State : uint8_t
{
NoState = 0x0,
ReadOnly = 0x1,
Locked = 0x2,
Failed = 0x4,
InSync = 0x8,
OK = 0x10
NoState = 0x00,
ReadMe = 0x01,
WriteMe = 0x02,
ReadOnly = 0x04,
Locked = 0x08,
Failed = 0x10,
InSync = 0x20,
OK = 0x40
};
Q_DECLARE_FLAGS(States, State )
@@ -109,13 +105,18 @@ public:
mutable QString visibleValue;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(BCValue::States)
Q_DECLARE_METATYPE(const BCValue*)
Q_DECLARE_METATYPE(const BCValue&)
//Q_DECLARE_METATYPE(const BCValue&)
using BCValuePtr = std::shared_ptr<BCValue>;
//using BCValueList = QList<BCValue>;
using BCValueList = QList<BCValuePtr>;
/*
class BCValueList : public QList<BCValue>
{
@@ -160,6 +161,7 @@ public:
}
};
*/
Q_DECLARE_METATYPE(BCValueList)