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
|
|
@ -10,7 +10,7 @@ MainWindow::MainWindow(MainObject * const mainObject, QWidget *parent) :
|
|||
ui(new Ui::MainWindow),
|
||||
colorChooser(this),
|
||||
_micro(&mainObject->micro),
|
||||
_powerItem(&mainObject->powerItem)
|
||||
_powerItem(mainObject->powerItem)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
@ -21,7 +21,11 @@ MainWindow::MainWindow(MainObject * const mainObject, QWidget *parent) :
|
|||
|
||||
//Relays
|
||||
if(mainObject->master)connect(ui->pushButton_refesh, &QPushButton::clicked, _micro, &Microcontroller::requestState);
|
||||
else connect(ui->pushButton_refesh, &QPushButton::clicked, &mainObject->broadCast, &BroadCast::requestJson);
|
||||
else
|
||||
{
|
||||
connect(ui->pushButton_refesh, &QPushButton::clicked, &mainObject->broadCast, &BroadCast::requestJson);
|
||||
connect(ui->pushButton_refesh, &QPushButton::clicked, &mainObject->broadCast, &BroadCast::requestSensors);
|
||||
}
|
||||
connect(&mainObject->items, &ItemStore::itemAdded, ui->relayList, &ItemScrollBox::addItem);
|
||||
connect(&mainObject->items, &ItemStore::itemDeleted, ui->relayList, &ItemScrollBox::removeItem);
|
||||
|
||||
|
|
@ -51,7 +55,7 @@ MainWindow::~MainWindow()
|
|||
|
||||
void MainWindow::showPowerItemDialog()
|
||||
{
|
||||
ItemSettingsDialog diag(_powerItem, this);
|
||||
ItemSettingsDialog diag(std::shared_ptr<Item>(_powerItem), this);
|
||||
diag.show();
|
||||
diag.exec();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue