diff --git a/UI/UI_checkbox.cpp b/UI/UI_checkbox.cpp index 4bf06a4..f6b4e04 100644 --- a/UI/UI_checkbox.cpp +++ b/UI/UI_checkbox.cpp @@ -17,14 +17,14 @@ UI_checkbox::UI_checkbox(const json &j, QObject *parent) : UI_item(UI_CHECKBOX_T void UI_checkbox::click() { m_checked = !m_checked; - emit value_changed(); + emit ui_changed(); emit on_change(m_checked); } void UI_checkbox::set_state(bool state) { m_checked = state; - emit value_changed(); + emit ui_changed(); emit on_change(m_checked); } diff --git a/UI/UI_combobox.cpp b/UI/UI_combobox.cpp index d5ae25a..3fd2df7 100644 --- a/UI/UI_combobox.cpp +++ b/UI/UI_combobox.cpp @@ -20,7 +20,7 @@ void UI_combobox::set_selected(size_t selected) if (selected == m_selected) return; m_selected = selected; - emit value_changed(); + emit ui_changed(); emit changed(selected_text()); } diff --git a/UI/UI_dial.cpp b/UI/UI_dial.cpp index 19a8a28..df8276b 100644 --- a/UI/UI_dial.cpp +++ b/UI/UI_dial.cpp @@ -35,7 +35,7 @@ void UI_dial::set_value(double value) return; this->m_value = value; - emit value_changed(); + emit ui_changed(); } double UI_dial::value() const diff --git a/UI/UI_item.cpp b/UI/UI_item.cpp index 6eee9c1..d03c7cb 100644 --- a/UI/UI_item.cpp +++ b/UI/UI_item.cpp @@ -40,14 +40,14 @@ void UI_item::set_text(std::string text) if (this->m_text != text) { this->m_text = text; - emit value_changed(); + emit ui_changed(); } } void UI_item::append_text(std::string text) { m_text.append(text); - emit value_changed(); + emit ui_changed(); } std::string UI_item::text() const @@ -60,7 +60,7 @@ void UI_item::set_text_size(uint8_t text_size) if (this->m_text_size != text_size) { this->m_text_size = text_size; - emit value_changed(); + emit ui_changed(); } } @@ -74,7 +74,7 @@ void UI_item::set_fg_color(Color fg_color) if (this->m_fg_color != fg_color) { this->m_fg_color = fg_color; - emit value_changed(); + emit ui_changed(); } } @@ -88,7 +88,7 @@ void UI_item::set_bg_color(Color bg_color) if (this->m_bg_color != bg_color) { this->m_bg_color = bg_color; - emit value_changed(); + emit ui_changed(); } } @@ -102,7 +102,7 @@ void UI_item::set_enabled(bool enabled) if (this->enabled != enabled) { this->enabled = enabled; - emit value_changed(); + emit ui_changed(); } } @@ -116,7 +116,7 @@ void UI_item::set_visible(bool visible) if (this->visible != visible) { this->visible = visible; - emit value_changed(); + emit ui_changed(); } } diff --git a/UI/UI_item.hpp b/UI/UI_item.hpp index 753fab9..a38e5bd 100644 --- a/UI/UI_item.hpp +++ b/UI/UI_item.hpp @@ -55,7 +55,7 @@ class UI_item : public QObject virtual void can_clear(); signals: - void value_changed(); + void ui_changed(); protected: size_t m_id; diff --git a/UI/UI_plot.cpp b/UI/UI_plot.cpp index a4d112d..6d4c7b5 100644 --- a/UI/UI_plot.cpp +++ b/UI/UI_plot.cpp @@ -19,7 +19,7 @@ void UI_plot::set_x_label(std::string name) { m_x_label = name; - emit value_changed(); + emit ui_changed(); } std::string UI_plot::x_label() const @@ -31,7 +31,7 @@ void UI_plot::set_y_label(std::string name) { m_y_label = name; - emit value_changed(); + emit ui_changed(); } std::string UI_plot::y_label() const @@ -44,7 +44,7 @@ void UI_plot::add_value(double y) m_x_vals.push_back((double)m_x_vals.size()); m_y_vals.push_back(y); - emit value_changed(); + emit ui_changed(); } void UI_plot::add_value(double x, double y) @@ -52,7 +52,7 @@ void UI_plot::add_value(double x, double y) m_x_vals.push_back(x); m_y_vals.push_back(y); - emit value_changed(); + emit ui_changed(); } void UI_plot::clean_vals() @@ -60,7 +60,7 @@ void UI_plot::clean_vals() m_x_vals.clear(); m_y_vals.clear(); - emit value_changed(); + emit ui_changed(); } void UI_plot::from_json(const json &j) diff --git a/UI/UI_slider.cpp b/UI/UI_slider.cpp index 716cbec..39dc89c 100644 --- a/UI/UI_slider.cpp +++ b/UI/UI_slider.cpp @@ -36,7 +36,7 @@ void UI_slider::set_value(double value) return; this->m_value = value; - emit value_changed(); + emit ui_changed(); emit changed(m_value); } diff --git a/UI/UI_table.cpp b/UI/UI_table.cpp index fc72c6b..d12bdb9 100644 --- a/UI/UI_table.cpp +++ b/UI/UI_table.cpp @@ -22,7 +22,7 @@ void UI_table::set_row_count(size_t count) m_valid.resize(m_column_count * m_row_count); } - emit value_changed(); + emit ui_changed(); } size_t UI_table::row_count() const @@ -39,7 +39,7 @@ void UI_table::set_column_count(size_t count) m_valid.resize(m_column_count * m_row_count); } - emit value_changed(); + emit ui_changed(); } size_t UI_table::column_count() const @@ -61,7 +61,7 @@ void UI_table::set_row_label(size_t index, std::string label) m_row_labels[index] = label; - emit value_changed(); + emit ui_changed(); } std::string UI_table::row_label(size_t index) const @@ -83,7 +83,7 @@ void UI_table::set_column_label(size_t index, std::string label) m_column_labels[index] = label; - emit value_changed(); + emit ui_changed(); } std::string UI_table::column_label(size_t index) const @@ -115,7 +115,7 @@ void UI_table::insert_item(size_t row, size_t column, std::string text) m_table.at(index) = text; m_valid.at(index) = true; - emit value_changed(); + emit ui_changed(); } void UI_table::empty_item(size_t row, size_t column) @@ -125,7 +125,7 @@ void UI_table::empty_item(size_t row, size_t column) m_table[index] = ""; m_valid[index] = false; - emit value_changed(); + emit ui_changed(); } void UI_table::from_json(const json &j) diff --git a/UI/UI_textbox.cpp b/UI/UI_textbox.cpp index 85a9145..8d17b9a 100644 --- a/UI/UI_textbox.cpp +++ b/UI/UI_textbox.cpp @@ -15,14 +15,14 @@ void UI_textbox::set_text(std::string text) if (text == m_text) return; m_text = text; - emit value_changed(); + emit ui_changed(); emit on_change(m_text); } void UI_textbox::set_hint(std::string hint) { m_hint = hint; - emit value_changed(); + emit ui_changed(); } std::string UI_textbox::hint() const diff --git a/UI/UI_thermo.cpp b/UI/UI_thermo.cpp index 882c385..7735b81 100644 --- a/UI/UI_thermo.cpp +++ b/UI/UI_thermo.cpp @@ -36,7 +36,7 @@ void UI_thermo::set_value(double value) return; this->m_value = value; - emit value_changed(); + emit ui_changed(); } double UI_thermo::value() const @@ -57,13 +57,13 @@ double UI_thermo::max() const void UI_thermo::set_start_color(Color color) { this->m_color_map[0] = color; - emit value_changed(); + emit ui_changed(); } void UI_thermo::set_end_color(Color color) { this->m_color_map[1] = color; - emit value_changed(); + emit ui_changed(); } void UI_thermo::add_color_stop(double value, Color color) @@ -72,7 +72,7 @@ void UI_thermo::add_color_stop(double value, Color color) return; this->m_color_map[value] = color; - emit value_changed(); + emit ui_changed(); } void UI_thermo::add_color_stop_normalized(double value, Color color) @@ -82,7 +82,7 @@ void UI_thermo::add_color_stop_normalized(double value, Color color) double normalized = (value - m_min) / (m_max - m_min); this->m_color_map[normalized] = color; - emit value_changed(); + emit ui_changed(); } void UI_thermo::remove_color_stop(double value) @@ -91,7 +91,7 @@ void UI_thermo::remove_color_stop(double value) return; this->m_color_map.erase(value); - emit value_changed(); + emit ui_changed(); } void UI_thermo::remove_color_stop_normalized(double value) @@ -101,7 +101,7 @@ void UI_thermo::remove_color_stop_normalized(double value) double normalized = (value - m_min) / (m_max - m_min); this->m_color_map.erase(normalized); - emit value_changed(); + emit ui_changed(); } void UI_thermo::from_json(const json &j) diff --git a/UI/custom/UI_can.cpp b/UI/custom/UI_can.cpp index 2e4cff7..8c0950b 100644 --- a/UI/custom/UI_can.cpp +++ b/UI/custom/UI_can.cpp @@ -27,7 +27,7 @@ void UI_can::add_send_message(QCanBusFrame msg) CanFrame frame(msg.frameId(), (uint8_t)msg.payload().size(), ByteArrayToStdArray>(msg.payload())); m_can_send_messages.push_back(frame); - emit value_changed(); + emit ui_changed(); } void UI_can::add_received_message(QCanBusFrame msg) @@ -35,19 +35,19 @@ void UI_can::add_received_message(QCanBusFrame msg) CanFrame frame(msg.frameId(), (uint8_t)msg.payload().size(), ByteArrayToStdArray>(msg.payload())); m_can_received_messages.push_back(frame); - emit value_changed(); + emit ui_changed(); } void UI_can::clear_send_buffer() { m_can_send_messages.clear(); - emit value_changed(); + emit ui_changed(); } void UI_can::clear_receive_buffer() { m_can_received_messages.clear(); - emit value_changed(); + emit ui_changed(); } void UI_can::can_clear() diff --git a/server/simulator_base.cpp b/server/simulator_base.cpp index 1f1c79c..0b56372 100644 --- a/server/simulator_base.cpp +++ b/server/simulator_base.cpp @@ -18,7 +18,7 @@ std::string Simulator_base::name() const void Simulator_base::push_ui_item(UI_item *item) { // Add a UI item to the simulator - connect(item, &UI_item::value_changed, this, [this] { emit sim_changed(); }); + connect(item, &UI_item::ui_changed, this, [this] { emit sim_changed(); }); m_UI_items.push_back(item); }