critical handler cleanup and fix
[qbat.git] / common.h
blob30c0d00ab78ef6ee45790e6b480dea772b7ea8ea
1 //
2 // C++ Interface: common
3 //
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
5 //
6 // Copyright: See COPYING file that comes with this distribution
7 //
8 #ifndef QBAT_COMMON_H
9 #define QBAT_COMMON_H
11 #include <string>
12 #include <QColor>
13 #include "constants.h"
15 namespace qbat {
16 struct Settings {
17 quint16 pollingRate;
18 bool mergeBatterys;
19 bool handleCritical;
20 quint8 criticalCapacity;
21 bool executeCommand;
22 QString criticalCommand;
23 bool confirmCommand;
24 bool confirmWithTimeout;
25 quint16 timeoutValue;
26 QRgb colors[UI_COUNT_COLORS];
27 bool showBalloon;
28 /* QRgb textColor;
29 QRgb mainEmptyColor;
30 QRgb mainChargedColor;
31 QRgb poleColor;
32 QRgb textFullColor;
33 QRgb mainFullColor;
34 QRgb poleFullColor;*/
37 std::string readStringSysFile(const char * fileName);
38 int readIntSysFile(const char * fileName);
39 int toStatusInt(std::string status);
42 #endif