Root/src/battery.h

1#ifndef __BATTERY_H__
2#define __BATTERY_H__
3
4#include <string>
5
6class Surface;
7class SurfaceCollection;
8
9
10/**
11 * Keeps track of the battery status.
12 */
13class Battery {
14public:
15    Battery(SurfaceCollection &sc);
16
17    /**
18     * Gets the icon that reflects the current battery status.
19     */
20    const Surface &getIcon();
21
22private:
23    void update();
24
25    SurfaceCollection &sc;
26    std::string iconPath;
27    unsigned int lastUpdate;
28};
29
30#endif /* __BATTERY_H__ */
31

Archive Download this file



interactive