Root/src/battery.h

Source at commit 00d3c3b57008bddf8770c51271db9d766acaf854 created 7 years 5 months ago.
By Maarten ter Huurne, Gave Layer class a protected constructor
1#ifndef __BATTERY_H__
2#define __BATTERY_H__
3
4#include <string>
5
6class OffscreenSurface;
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 OffscreenSurface *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