mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-06-28 12:27:37 +03:00
There are a few exclusive operations for each type. Also we no longer need the freeWhenDone flag since the class now determines whether the surface should be freed or not.
31 lines
456 B
C++
31 lines
456 B
C++
#ifndef __BATTERY_H__
|
|
#define __BATTERY_H__
|
|
|
|
#include <string>
|
|
|
|
class OffscreenSurface;
|
|
class SurfaceCollection;
|
|
|
|
|
|
/**
|
|
* Keeps track of the battery status.
|
|
*/
|
|
class Battery {
|
|
public:
|
|
Battery(SurfaceCollection& sc);
|
|
|
|
/**
|
|
* Gets the icon that reflects the current battery status.
|
|
*/
|
|
OffscreenSurface const& getIcon();
|
|
|
|
private:
|
|
void update();
|
|
|
|
SurfaceCollection& sc;
|
|
std::string iconPath;
|
|
unsigned int lastUpdate;
|
|
};
|
|
|
|
#endif /* __BATTERY_H__ */
|