Diffstat (limited to 'core/applets/batteryapplet/batterystatus.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/batteryapplet/batterystatus.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/applets/batteryapplet/batterystatus.h b/core/applets/batteryapplet/batterystatus.h index a5ab804..bb95ece 100644 --- a/core/applets/batteryapplet/batterystatus.h +++ b/core/applets/batteryapplet/batterystatus.h | |||
@@ -20,24 +20,27 @@ | |||
20 | #ifndef BATTERY_STATUS_H | 20 | #ifndef BATTERY_STATUS_H |
21 | #define BATTERY_STATUS_H | 21 | #define BATTERY_STATUS_H |
22 | 22 | ||
23 | #include <qwidget.h> | 23 | #include <qframe.h> |
24 | 24 | ||
25 | class PowerStatus; | 25 | class PowerStatus; |
26 | 26 | ||
27 | class BatteryStatus : public QWidget | 27 | class BatteryStatus : public QFrame |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | public: | 30 | public: |
31 | BatteryStatus( const PowerStatus *s, QWidget *parent=0 ); | 31 | BatteryStatus( const PowerStatus *s, QWidget *parent=0, WFlags f = 0 ); |
32 | ~BatteryStatus(); | 32 | ~BatteryStatus(); |
33 | 33 | ||
34 | void updatePercent( int ); | 34 | void updatePercent( int ); |
35 | 35 | QSize sizeHint() const; | |
36 | protected: | 36 | protected: |
37 | void drawSegment( QPainter *p, const QRect &r, const QColor &topgrad, const QColor &botgrad, const QColor &highlight, int hightlight_height ); | 37 | void drawSegment( QPainter *p, const QRect &r, const QColor &topgrad, const QColor &botgrad, const QColor &highlight, int hightlight_height ); |
38 | void paintEvent( QPaintEvent *pe ); | 38 | void paintEvent( QPaintEvent *pe ); |
39 | bool BatteryStatus::getProcApmStatusIpaq(); | 39 | bool BatteryStatus::getProcApmStatusIpaq(); |
40 | |||
40 | private: | 41 | private: |
42 | QString statusText() const; | ||
43 | QString statusTextIpaq() const; | ||
41 | const PowerStatus *ps; | 44 | const PowerStatus *ps; |
42 | int percent; | 45 | int percent; |
43 | int ipaqPercent; | 46 | int ipaqPercent; |
@@ -52,6 +55,7 @@ private: | |||
52 | QString ipaqChem; | 55 | QString ipaqChem; |
53 | QString jackChem; | 56 | QString jackChem; |
54 | bool bat2; | 57 | bool bat2; |
58 | bool bat2inserted; | ||
55 | int screenWidth; | 59 | int screenWidth; |
56 | int screenHeight; | 60 | int screenHeight; |
57 | }; | 61 | }; |