Add run at stop
This commit is contained in:
2026-02-01 18:41:36 +01:00
parent 53a7af5d25
commit d154100702
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -53,6 +53,7 @@ void Simulator_base::run()
void Simulator_base::stop() void Simulator_base::stop()
{ {
// Stop the simulator // Stop the simulator
run_at_stop();
m_timer->stop(); m_timer->stop();
} }
+7
View File
@@ -85,6 +85,13 @@ class Simulator_base : public QObject
*/ */
virtual void run_at_startup() {}; virtual void run_at_startup() {};
/**
* @brief Run at stop
* This function is called when a simulator is stoped
* Override this function in the derived class
*/
virtual void run_at_stop() {};
void shutdown(); void shutdown();
void reboot(); void reboot();
signals: signals: