switched from qsettings to json added editng of actors

This commit is contained in:
Carl Klemm 2019-06-06 21:19:12 +02:00
parent b04fbfb5bc
commit df27b622a0
141 changed files with 4402 additions and 5068 deletions

24
src/items/rgbitem.cpp Normal file
View 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);
}