mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
simbase
Add run at stop
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user