Files
MuditaOS/module-gui/gui/widgets/TopBar/SIM.cpp
Radoslaw Wicik a8573a404c Apply new style
2020-03-17 10:03:16 +01:00

35 lines
716 B
C++

#include "SIM.hpp"
namespace gui
{
using namespace Store;
SIM::SIM(Item *parent, uint32_t x, uint32_t y) : Image(parent, x, y, 0, 0)
{
set(simunknown);
}
void SIM::show(Store::GSM::SIM state)
{
if (state == current) {
return;
}
switch (state) {
case GSM::SIM::SIM1:
set(sim1);
break;
case GSM::SIM::SIM2:
set(sim2);
break;
case GSM::SIM::SIM_FAIL:
set(simfailed);
break;
case GSM::SIM::NONE:
[[fallthrough]];
case GSM::SIM::SIM_UNKNOWN:
set(simunknown);
break;
}
}
}; // namespace gui