How to display image/widget in the current active screen upon receiving an event from backend?
Hi,
Let's say we have 10 screens and we need to make a image/widget visible when an event is received from backend.
Can it be done this way?
In model.cpp
whenever the event is receieved
static_cast<FrontendApplication*>(touchgfx::Application::getInstance())->handleTickEvent();
and in Screen1View.cpp
void Screen1View::setupScreen()
{
Screen1ViewBase::setupScreen();
displayIcon();
}
void Screen1View::displayIcon()
{
uint8_t status = Screen1ViewBase::presenter->GetStatus(); //Read the status received along with the event
if(status == 0x00)
{
IconImage.setVisible(true);
IconImage.invalidate();
}
}
void Screen1View::handleTickEvent()
{
displayIcon();
}
My question is - Does it create overhead in handleTickEvent of each screen to repeatedly read the status from model?