Blame view

build6/epsilon-master/apps/battery_timer.cpp 376 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  #include "battery_timer.h"
  #include "apps_container.h"
  
  BatteryTimer::BatteryTimer(AppsContainer * container) :
    Timer(1),
    m_container(container)
  {
  }
  
  bool BatteryTimer::fire() {
    bool needRedrawing = m_container->updateBatteryState();
    if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
      m_container->shutdownDueToLowBattery();
    }
    return needRedrawing;
  }