Numworks Epsilon
1.4.1
Graphing Calculator Operating System
battery_timer.cpp
Go to the documentation of this file.
1
#include "
battery_timer.h
"
2
#include "
apps_container.h
"
3
4
BatteryTimer::BatteryTimer
(
AppsContainer
* container) :
5
Timer
(1),
6
m_container(container)
7
{
8
}
9
10
bool
BatteryTimer::fire() {
11
bool
needRedrawing = m_container->
updateBatteryState
();
12
if
(
Ion::Battery::level
() ==
Ion::Battery::Charge::EMPTY
) {
13
m_container->
shutdownDueToLowBattery
();
14
}
15
return
needRedrawing;
16
}
Ion::Battery::level
Charge level()
Definition:
battery.cpp:20
Timer
Definition:
timer.h:15
AppsContainer::shutdownDueToLowBattery
void shutdownDueToLowBattery()
Definition:
apps_container.cpp:195
battery_timer.h
apps_container.h
AppsContainer
Definition:
apps_container.h:27
Ion::Battery::Charge::EMPTY
AppsContainer::updateBatteryState
bool updateBatteryState()
Definition:
apps_container.cpp:177
BatteryTimer::BatteryTimer
BatteryTimer(AppsContainer *container)
Definition:
battery_timer.cpp:4
epsilon
apps
battery_timer.cpp
Generated by
1.8.14