Files
remote-ui/src/UI/UI_button.cpp
T
2024-09-12 20:43:12 +02:00

28 lines
531 B
C++

#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(const json &j, QObject *parrent) : UI_item(UI_BUTTON_TYPE, parrent)
{
from_json(j);
}
void UI_button::from_json(const json &j)
{
UI_item::from_json(j);
}
json UI_button::to_json() const
{
json j = UI_item::to_json();
return j;
}
void UI_button::click()
{
emit on_click(m_id);
}