Move to Qt

Everything seems to be working
Only timer is not moved over
This commit is contained in:
2024-09-12 16:59:54 +02:00
parent fc181726b9
commit 9eef1fc3ff
39 changed files with 399 additions and 501 deletions
+9 -5
View File
@@ -1,11 +1,11 @@
#include "UI_led.hpp"
UI_led::UI_led(std::string id, std::string text, Color fg_color, Color bg_color, Color led_color)
: UI_item(id, UI_LED_TYPE, text, 12, fg_color, bg_color), m_led_color(led_color)
UI_led::UI_led(std::string id, std::string text, Color fg_color, Color bg_color, Color led_color, QObject* parrent)
: UI_item(id, UI_LED_TYPE, text, 12, fg_color, bg_color, parrent), m_led_color(led_color)
{
}
UI_led::UI_led(const json &j) : UI_item(UI_LED_TYPE)
UI_led::UI_led(const json &j, QObject* parrent) : UI_item(UI_LED_TYPE, parrent)
{
from_json(j);
}
@@ -17,7 +17,11 @@ Color UI_led::led_color() const
void UI_led::set_led_color(Color led_color)
{
m_led_color = led_color;
if (m_led_color != led_color)
{
m_led_color = led_color;
emit value_changed();
}
}
void UI_led::from_json(const json &j)
@@ -33,4 +37,4 @@ json UI_led::to_json() const
json j = UI_item::to_json();
j["led_color"] = m_led_color.to_hex();
return j;
}
}