mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
Move to Qt
Everything seems to be working Only timer is not moved over
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "timer.hpp"
|
||||
|
||||
class Simulator_base
|
||||
class Simulator_base : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Simulator_base object
|
||||
@@ -14,7 +14,7 @@ class Simulator_base
|
||||
* @param name The name of the simulator
|
||||
* @param interval The interval of the timer (default is 100ms)
|
||||
*/
|
||||
Simulator_base(std::string name, std::chrono::milliseconds interval = std::chrono::milliseconds(100));
|
||||
Simulator_base(std::string name, std::chrono::milliseconds interval = std::chrono::milliseconds(100), QObject* parrent = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Returns the name of the simulator
|
||||
@@ -82,6 +82,8 @@ class Simulator_base
|
||||
|
||||
void shutdown();
|
||||
void reboot();
|
||||
signals:
|
||||
void sim_changed();
|
||||
|
||||
protected:
|
||||
std::string m_name;
|
||||
@@ -89,4 +91,4 @@ class Simulator_base
|
||||
std::map<std::string, UI_item *> m_UI_items_map;
|
||||
Timer m_timer;
|
||||
std::chrono::milliseconds m_interval;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user