spo/simulator_SIC_XE/gui/qt/MachineController.h
2025-11-12 19:05:16 +01:00

27 lines
481 B
C++

#ifndef MACHINECONTROLLER_H
#define MACHINECONTROLLER_H
#include <QObject>
#include <atomic>
#include <thread>
class MachineController : public QObject {
Q_OBJECT
public:
explicit MachineController(QObject *parent = nullptr);
~MachineController() override;
void start();
void stop();
void step();
signals:
void tick();
private:
void runLoop();
std::atomic<bool> m_running{false};
std::thread m_thread;
};
#endif // MACHINECONTROLLER_H