Sensors now work over broadcast pipe
Added Polynomal actor Added Item adding dialog Added Factor Actor
This commit is contained in:
parent
f6aaebafc6
commit
772d21a982
63 changed files with 1450 additions and 225 deletions
|
|
@ -5,8 +5,7 @@
|
|||
#include <QSettings>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "../actors/actor.h"
|
||||
#include "../sensors/sensor.h"
|
||||
class Actor;
|
||||
|
||||
class ItemData
|
||||
{
|
||||
|
|
@ -24,9 +23,9 @@ public:
|
|||
|
||||
uint32_t id() const;
|
||||
|
||||
QString getName() const;
|
||||
void setName(QString name);
|
||||
uint8_t getValue() const;
|
||||
virtual QString getName() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -35,12 +34,10 @@ class Item: public QObject, public ItemData
|
|||
Q_OBJECT
|
||||
private:
|
||||
std::vector< Actor* > actors_;
|
||||
bool actorsActive_ = true;
|
||||
|
||||
public:
|
||||
|
||||
static bool secondaryFlag;
|
||||
SensorStore* sensors_;
|
||||
|
||||
signals:
|
||||
|
||||
|
|
@ -52,19 +49,18 @@ public slots:
|
|||
|
||||
public:
|
||||
|
||||
Item(SensorStore* sensors = nullptr, uint32_t itemIdIn = QRandomGenerator::global()->generate(), QString name = "Item", uint8_t value = 0, QObject *parent = nullptr);
|
||||
Item(SensorStore* sensors, const ItemData& itemData, QObject *parent = nullptr);
|
||||
Item(uint32_t itemIdIn = QRandomGenerator::global()->generate(), QString name = "Item", uint8_t value = 0, QObject *parent = nullptr);
|
||||
Item(const ItemData& itemData, QObject *parent = nullptr);
|
||||
|
||||
virtual ~Item();
|
||||
|
||||
std::vector< Actor* >& getActors();
|
||||
bool hasActors();
|
||||
void addActor(Actor* actor);
|
||||
bool removeActor(Actor* actor);
|
||||
void removeAllActors();
|
||||
bool actorsActive() const;
|
||||
void setActorsActive(bool in);
|
||||
void informValue(uint8_t value);
|
||||
void setSensorStore(SensorStore* sensors){sensors_ = sensors;}
|
||||
SensorStore* getSensorStore(){return sensors_;}
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue