connected to gui
This commit is contained in:
parent
42e884aced
commit
8a6e916876
7 changed files with 165 additions and 3 deletions
27
simulator_SIC_XE/gui/qt/MachineController.h
Normal file
27
simulator_SIC_XE/gui/qt/MachineController.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue