mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
UI
change slider signal name
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||||
|
|||||||
@@ -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); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user