mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
test sim
add checkbox in client add change of state in server
This commit is contained in:
@@ -15,6 +15,7 @@ Test_Sim::Test_Sim(Web_socket_wrapper *web_socket, QWidget *parent)
|
|||||||
push_ui_item(ui->dial);
|
push_ui_item(ui->dial);
|
||||||
push_ui_item(ui->thermo);
|
push_ui_item(ui->thermo);
|
||||||
push_ui_item(ui->led);
|
push_ui_item(ui->led);
|
||||||
|
push_ui_item(ui->checkBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test_Sim::~Test_Sim()
|
Test_Sim::~Test_Sim()
|
||||||
|
|||||||
@@ -94,6 +94,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ void Test_Sim::button_clicked(UI_button *id)
|
|||||||
this->m_button.set_text(state ? "On" : "Off");
|
this->m_button.set_text(state ? "On" : "Off");
|
||||||
|
|
||||||
this->m_led.set_bg_color(state ? Color::Green : Color::Red);
|
this->m_led.set_bg_color(state ? Color::Green : Color::Red);
|
||||||
|
this->m_checkbox.set_state(state);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user