2 // C++ Interface: common
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
14 #include "constants.h"
22 quint8 criticalCapacity
;
24 QString criticalCommand
;
26 bool confirmWithTimeout
;
28 QRgb colors
[UI_COUNT_COLORS
];
33 QRgb mainChargedColor;
40 QString
readStringSysFile(const char * fileName
);
41 bool readStringFromFile(char * buffer
, const char * fileName
);
42 int readIntSysFile(const char * fileName
);
43 int toStatusInt(QString status
);
44 int toStatusInt(const char * status
);
46 inline qint8
calcRelativeDef(int value
, int border
, qint8 defValue
= -1) {
47 return border
? (qint8
)(100.0 * value
/ border
) : defValue
;