2013-08-09 19:01:51 +03:00
|
|
|
#ifndef __BATTERY_H__
|
|
|
|
#define __BATTERY_H__
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2014-08-10 14:25:54 +03:00
|
|
|
class OffscreenSurface;
|
2013-08-09 19:01:51 +03:00
|
|
|
class SurfaceCollection;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Keeps track of the battery status.
|
|
|
|
*/
|
|
|
|
class Battery {
|
|
|
|
public:
|
2014-08-10 14:25:54 +03:00
|
|
|
Battery(SurfaceCollection& sc);
|
2013-08-09 19:01:51 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the icon that reflects the current battery status.
|
|
|
|
*/
|
2014-08-10 14:25:54 +03:00
|
|
|
OffscreenSurface const& getIcon();
|
2013-08-09 19:01:51 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
void update();
|
|
|
|
|
2014-08-10 14:25:54 +03:00
|
|
|
SurfaceCollection& sc;
|
2013-08-09 19:01:51 +03:00
|
|
|
std::string iconPath;
|
|
|
|
unsigned int lastUpdate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __BATTERY_H__ */
|