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
+4 -3
View File
@@ -1,7 +1,7 @@
#include "simulator_base.hpp"
Simulator_base::Simulator_base(std::string name, std::chrono::milliseconds interval)
: m_name(name), m_timer([this] { timer(); }), m_interval(interval)
Simulator_base::Simulator_base(std::string name, std::chrono::milliseconds interval, QObject* parrent)
: QObject(parrent), m_name(name), m_timer([this] { timer(); }), m_interval(interval)
{
}
@@ -32,6 +32,7 @@ void Simulator_base::add_UI_item(UI_item *item)
{
throw std::runtime_error("UI item id " + item->id() + " is not unique");
}
connect(item, &UI_item::value_changed, this, [this]{emit sim_changed();});
m_UI_items_map[item->id()] = item;
m_UI_items.push_back(item);
}
@@ -78,4 +79,4 @@ void Simulator_base::reboot()
{
// Reboot the simulator
system("reboot");
}
}