mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
sim base
add run at startup function
This commit is contained in:
@@ -50,6 +50,7 @@ UI_item* Simulator_base::get_UI_item(std::string id) const {
|
|||||||
void Simulator_base::run() {
|
void Simulator_base::run() {
|
||||||
// Start the timer
|
// Start the timer
|
||||||
p_timer.setInterval(m_interval);
|
p_timer.setInterval(m_interval);
|
||||||
|
run_at_startup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Simulator_base::stop() {
|
void Simulator_base::stop() {
|
||||||
|
|||||||
@@ -70,6 +70,13 @@ class Simulator_base {
|
|||||||
* Override this function in the derived class
|
* Override this function in the derived class
|
||||||
*/
|
*/
|
||||||
virtual void timer() {};
|
virtual void timer() {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Run at startup
|
||||||
|
* This function is called at startup
|
||||||
|
* Override this function in the derived class
|
||||||
|
*/
|
||||||
|
virtual void run_at_startup() {};
|
||||||
protected:
|
protected:
|
||||||
std::string p_name;
|
std::string p_name;
|
||||||
std::vector<UI_item*> p_UI_items;
|
std::vector<UI_item*> p_UI_items;
|
||||||
|
|||||||
Reference in New Issue
Block a user