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
@@ -4,9 +4,9 @@ UI_combobox::UI_combobox(QObject *parrent) : UI_x_boxes(UI_COMBOBOX_TYPE, parren
{
}
UI_combobox::UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color,
UI_combobox::UI_combobox(std::string text, Color fg_color, Color bg_color,
std::vector<std::string> options, size_t selected, QObject *parrent)
: UI_x_boxes(id, UI_COMBOBOX_TYPE, text, fg_color, bg_color, options, parrent), m_selected(selected)
: UI_x_boxes(UI_COMBOBOX_TYPE, text, fg_color, bg_color, options, parrent), m_selected(selected)
{
}
@@ -21,7 +21,7 @@ void UI_combobox::set_selected(size_t selected)
return;
m_selected = selected;
emit value_changed();
emit on_change(m_id, selected_text());
emit on_change(selected_text());
}
void UI_combobox::set_selected(std::string selected)
@@ -60,9 +60,9 @@ void UI_combobox::from_json(const json &j)
}
}
json UI_combobox::to_json() const
json UI_combobox::to_json(size_t id) const
{
json j = UI_x_boxes::to_json();
json j = UI_x_boxes::to_json(id);
j["selected"] = m_options[m_selected];
return j;
}