switched from qsettings to json added editng of actors
This commit is contained in:
parent
b04fbfb5bc
commit
df27b622a0
141 changed files with 4402 additions and 5068 deletions
24
src/items/rgbitem.cpp
Normal file
24
src/items/rgbitem.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "rgbitem.h"
|
||||
|
||||
RgbItem::RgbItem(SensorStore* sensors, Microcontroller* micro, uint32_t itemIdIn, QString name, uint8_t value, QObject* parent): Item(sensors, itemIdIn, name, value, parent), micro_(micro)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RgbItem::setValue(uint8_t value)
|
||||
{
|
||||
Item::setValue(value);
|
||||
value ? micro_->rgbOn() : micro_->rgbOff();
|
||||
}
|
||||
|
||||
void RgbItem::store(QJsonObject &json)
|
||||
{
|
||||
json["Type"] = "Rgb";
|
||||
Item::store(json);
|
||||
}
|
||||
|
||||
void RgbItem::store(QString subsecton, QSettings* settings)
|
||||
{
|
||||
settings->setValue(subsecton + "Type", "Rgb");
|
||||
Item::store(subsecton, settings);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue