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
13 #include "constants.h"
21 quint8 criticalCapacity
;
23 QString criticalCommand
;
25 bool confirmWithTimeout
;
27 QRgb colors
[UI_COUNT_COLORS
];
32 bool readStringFromFile(char * buffer
, const char * fileName
);
33 int readIntSysFile(const char * fileName
);
34 int toStatusInt(const char * status
);
36 inline qint8
calcRelativeDef(int value
, int border
, qint8 defValue
= -1) {
37 return border
? (qint8
)(100.0 * value
/ border
) : defValue
;