author | zecke <zecke> | 2004-03-14 17:37:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 17:37:48 (UTC) |
commit | d69b11f67e3118f86d068c38c422984d754e13cc (patch) (unidiff) | |
tree | 9733e26ab49003bead06d820d70a14babd0c09f0 /core/applets/batteryapplet/battery.cpp | |
parent | 64820b76cc9d1c06a6967cd34114f3b95896aaeb (diff) | |
download | opie-d69b11f67e3118f86d068c38c422984d754e13cc.zip opie-d69b11f67e3118f86d068c38c422984d754e13cc.tar.gz opie-d69b11f67e3118f86d068c38c422984d754e13cc.tar.bz2 |
Updatet the applets
Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index b2cef55..18e368e 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp | |||
@@ -13,33 +13,36 @@ | |||
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "battery.h" | 20 | #include "battery.h" |
21 | #include "batterystatus.h" | 21 | #include "batterystatus.h" |
22 | 22 | ||
23 | /* OPIE */ | 23 | /* OPIE */ |
24 | #include <opie2/otaskbarapplet.h> | 24 | #include <opie2/otaskbarapplet.h> |
25 | |||
26 | #include <qpe/qpeapplication.h> | ||
25 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
26 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
27 | #include <qpe/power.h> | 29 | #include <qpe/power.h> |
28 | 30 | ||
29 | /* QT */ | 31 | /* QT */ |
30 | #include <qpainter.h> | 32 | #include <qpainter.h> |
31 | #include <qtimer.h> | 33 | #include <qtimer.h> |
32 | 34 | ||
33 | 35 | ||
36 | using namespace Opie::Ui; | ||
34 | BatteryMeter::BatteryMeter( QWidget *parent ) | 37 | BatteryMeter::BatteryMeter( QWidget *parent ) |
35 | : QWidget( parent ), charging(false) | 38 | : QWidget( parent ), charging(false) |
36 | { | 39 | { |
37 | ps = new PowerStatus; | 40 | ps = new PowerStatus; |
38 | startTimer( 10000 ); | 41 | startTimer( 10000 ); |
39 | 42 | ||
40 | setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); | 43 | setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); |
41 | setFixedHeight( AppLnk::smallIconSize() ); | 44 | setFixedHeight( AppLnk::smallIconSize() ); |
42 | 45 | ||
43 | chargeTimer = new QTimer( this ); | 46 | chargeTimer = new QTimer( this ); |
44 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); | 47 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); |
45 | timerEvent(0); | 48 | timerEvent(0); |
@@ -166,17 +169,14 @@ void BatteryMeter::paintEvent( QPaintEvent* ) | |||
166 | p.drawLine( x1+middle+i, 2, x1+middle+i, y-1 ); | 169 | p.drawLine( x1+middle+i, 2, x1+middle+i, y-1 ); |
167 | p.setPen( color.dark( 100+i*20 ) ); | 170 | p.setPen( color.dark( 100+i*20 ) ); |
168 | p.drawLine( x1+middle-i, y, x1+middle-i, y2 ); | 171 | p.drawLine( x1+middle-i, y, x1+middle-i, y2 ); |
169 | p.drawLine( x1+middle+i, y, x1+middle+i, y2 ); | 172 | p.drawLine( x1+middle+i, y, x1+middle+i, y2 ); |
170 | } | 173 | } |
171 | } | 174 | } |
172 | 175 | ||
173 | int BatteryMeter::position() | 176 | int BatteryMeter::position() |
174 | { | 177 | { |
175 | return 8; | 178 | return 8; |
176 | } | 179 | } |
177 | 180 | ||
178 | Q_EXPORT_INTERFACE() | 181 | EXPORT_OPIE_APPLET_v1( BatteryMeter ) |
179 | { | ||
180 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<BatteryMeter> ); | ||
181 | } | ||
182 | 182 | ||