Added system item support, support for RGBControlers with multiple item backends, and item settings widgets
This commit is contained in:
parent
a761eb4317
commit
5fb9ca7cc0
56 changed files with 635 additions and 210 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <QRandomGenerator>
|
||||
#include <QSettings>
|
||||
#include <QJsonObject>
|
||||
#include <memory>
|
||||
|
||||
class Actor;
|
||||
|
||||
|
|
@ -33,7 +34,9 @@ class Item: public QObject, public ItemData
|
|||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
std::vector< Actor* > actors_;
|
||||
std::vector< std::shared_ptr<Actor> > actors_;
|
||||
|
||||
bool override_ = false;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -43,6 +46,9 @@ signals:
|
|||
|
||||
void valueChanged(uint8_t value);
|
||||
|
||||
private slots:
|
||||
virtual void actorSetValue(uint8_t value);
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setValue(uint8_t value);
|
||||
|
|
@ -54,12 +60,14 @@ public:
|
|||
|
||||
virtual ~Item();
|
||||
|
||||
std::vector< Actor* >& getActors();
|
||||
std::vector< std::shared_ptr<Actor> >& getActors();
|
||||
bool hasActors();
|
||||
void addActor(Actor* actor);
|
||||
bool removeActor(Actor* actor);
|
||||
void addActor(std::shared_ptr<Actor> actor);
|
||||
bool removeActor(std::shared_ptr<Actor> actor);
|
||||
void removeAllActors();
|
||||
void setActorsActive(bool in);
|
||||
void setOverride(const bool in);
|
||||
bool getOverride();
|
||||
void informValue(uint8_t value);
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue