mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
Move to id is size_t
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "UI_button.hpp"
|
||||
|
||||
UI_button::UI_button(std::string id, std::string text, Color fg_color, Color bg_color, QObject *parrent)
|
||||
: UI_item(id, UI_BUTTON_TYPE, text, 12, fg_color, bg_color, parrent)
|
||||
UI_button::UI_button(std::string text, Color fg_color, Color bg_color, QObject *parrent)
|
||||
: UI_item(UI_BUTTON_TYPE, text, 12, fg_color, bg_color, parrent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ void UI_button::from_json(const json &j)
|
||||
UI_item::from_json(j);
|
||||
}
|
||||
|
||||
json UI_button::to_json() const
|
||||
json UI_button::to_json(size_t id) const
|
||||
{
|
||||
json j = UI_item::to_json();
|
||||
json j = UI_item::to_json(id);
|
||||
return j;
|
||||
}
|
||||
|
||||
void UI_button::click()
|
||||
{
|
||||
emit on_click(m_id);
|
||||
emit on_click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user