This commit is contained in:
2024-09-12 20:43:12 +02:00
parent 67bcf10b16
commit 756f69e9c7
30 changed files with 98 additions and 95 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
#include "simulator_base.hpp"
Simulator_base::Simulator_base(std::string name, std::chrono::milliseconds interval, QObject* parrent)
Simulator_base::Simulator_base(std::string name, std::chrono::milliseconds interval, QObject *parrent)
: QObject(parrent), m_name(name), m_timer(new QTimer(this)), m_interval(interval)
{
connect(m_timer, &QTimer::timeout, this, [this]{timer();});
connect(m_timer, &QTimer::timeout, this, [this] { timer(); });
}
std::string Simulator_base::name() const
@@ -33,7 +33,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();});
connect(item, &UI_item::value_changed, this, [this] { emit sim_changed(); });
m_UI_items_map[item->id()] = item;
m_UI_items.push_back(item);
}