change slider signal name
This commit is contained in:
2026-02-14 14:30:57 +01:00
parent b0c1eca1d1
commit d03bc91fb3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ void UI_slider::set_value(double value)
this->m_value = value; this->m_value = value;
emit value_changed(); emit value_changed();
emit on_change(m_value); emit changed(m_value);
} }
double UI_slider::value() const double UI_slider::value() const
+1 -1
View File
@@ -24,7 +24,7 @@ class UI_slider : public UI_item
void from_json(const json &j) override; void from_json(const json &j) override;
json to_json(size_t id) const override; json to_json(size_t id) const override;
signals: signals:
void on_change(double value); void changed(double value);
private: private:
double m_min; double m_min;
+1 -1
View File
@@ -25,7 +25,7 @@ Test_Sim::Test_Sim(CAN_Wrapper *can_wrapper, QObject *parent)
this->push_ui_item(&this->m_checkbox); this->push_ui_item(&this->m_checkbox);
QObject::connect(&m_button, &UI_button::clicked, this, [=, this] { button_clicked(&m_button); }); QObject::connect(&m_button, &UI_button::clicked, this, [=, this] { button_clicked(&m_button); });
QObject::connect(&m_slider, &UI_slider::on_change, this, QObject::connect(&m_slider, &UI_slider::changed, this,
[=, this](double value) { slider_changed(&m_slider, value); }); [=, this](double value) { slider_changed(&m_slider, value); });
} }