mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
server
update websocket updated to use protobuf not quite finished with the Websocket message parser
This commit is contained in:
@@ -5,10 +5,10 @@ EXPORT_SIM(Test_Sim);
|
||||
Test_Sim::Test_Sim(Communication *com, QObject *parent)
|
||||
: Simulator_base("Test Sim", com, std::chrono::milliseconds(1000), parent),
|
||||
m_button("Off", Color::White, Color::Red),
|
||||
m_combobox(Color::White, Color::Black, {"Option 1", "Option 2", "Option 3"}, 0),
|
||||
m_combobox({"Option 1", "Option 2", "Option 3"}, 0),
|
||||
m_label("Label", Color::White, Color::Black), m_checkbox("Option 1", Color::Default, Color::Default),
|
||||
m_slider("Slider", Color::White, Color::Black, 0, 100, 0), m_dial("Dial", Color::White, Color::Black, 0, 100, 0),
|
||||
m_thermo("Thermo", "%", Color::White, Color::Black, 0, 100, 0), m_led("Led", Color::White, Color::Red),
|
||||
m_slider("Slider", 0, 100, 0), m_dial("Dial", 0, 100, 0),
|
||||
m_thermo("Thermo", "%", 0, 100, 0), m_led("Led", Color::White, Color::Red),
|
||||
m_table(4, 4, {"Row 1", "Row 2", "Row 3", "Row 4"}, {"Column 1", "Column 2", "Column 3", "Column 4"}),
|
||||
m_spinbox(0, 255, 0), m_double_spinbox(0, 255, 0), m_hex_spinbox(0, 255, 0),
|
||||
m_tab_widget({"Tab 1", "Tab 2", "Tab 3"}, 0), m_stacked_widget(3, 0), m_status_bar()
|
||||
@@ -39,7 +39,7 @@ Test_Sim::Test_Sim(Communication *com, QObject *parent)
|
||||
|
||||
for (size_t i = 0; i < m_table.capacity(); i++)
|
||||
{
|
||||
m_table.insert_item(i / 4, i % 4, QString("%0 %1").arg(i / 4).arg(i % 4).toStdString());
|
||||
m_table.insert_item(i / 4, i % 4, QString("%0 %1").arg(i / 4).arg(i % 4));
|
||||
}
|
||||
|
||||
QObject::connect(&m_button, &UI_button::clicked, this, [=, this] { button_clicked(&m_button); });
|
||||
@@ -87,14 +87,14 @@ void Test_Sim::slider_changed(UI_slider *id, double value)
|
||||
if (id == &m_slider)
|
||||
{
|
||||
LOG_INFO(QString("Test slider changed to %0").arg(value));
|
||||
m_label.set_text(std::to_string(value));
|
||||
m_label.set_text(QString::number(value));
|
||||
m_dial.set_value(value);
|
||||
m_thermo.set_value(value);
|
||||
m_plot.add_value(value);
|
||||
m_spinbox.set_value(value);
|
||||
m_double_spinbox.set_value(value);
|
||||
m_hex_spinbox.set_value(value);
|
||||
m_status_bar.show_message("Test slider changed to " + std::to_string(value));
|
||||
m_status_bar.show_message("Test slider changed to " + QString::number(value));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user