Move to id is size_t

This commit is contained in:
2024-10-10 19:47:18 +02:00
parent d02b31ab25
commit 95a21250a6
27 changed files with 132 additions and 148 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
#include "UI_slider.hpp"
UI_slider::UI_slider(std::string id, std::string text, Color fg_color, Color bg_color, double min, double max,
UI_slider::UI_slider(std::string text, Color fg_color, Color bg_color, double min, double max,
double value, QObject *parrent)
: UI_item(id, UI_SLIDER_TYPE, text, 12, fg_color, bg_color, parrent), m_min(min), m_max(max), m_value(value)
: UI_item(UI_SLIDER_TYPE, text, 12, fg_color, bg_color, parrent), m_min(min), m_max(max), m_value(value)
{
}
@@ -20,7 +20,7 @@ void UI_slider::set_value(double value)
this->m_value = value;
emit value_changed();
emit on_change(m_id, m_value);
emit on_change(m_value);
}
double UI_slider::value() const
@@ -47,9 +47,9 @@ void UI_slider::from_json(const json &j)
this->m_value = j.at("value");
}
json UI_slider::to_json() const
json UI_slider::to_json(size_t id) const
{
json j = UI_item::to_json();
json j = UI_item::to_json(id);
j["min"] = this->m_min;
j["max"] = this->m_max;
j["value"] = this->m_value;