summaryrefslogtreecommitdiff
path: root/core/applets/batteryapplet/battery.cpp
authordrw <drw>2004-02-18 16:23:17 (UTC)
committer drw <drw>2004-02-18 16:23:17 (UTC)
commit7d16774139aa40fb812d636bcf9ad3f45aa2b9e1 (patch) (unidiff)
tree51dc00c15db884b4f4351ed685e022853446a0d6 /core/applets/batteryapplet/battery.cpp
parent45179e1807aa5ca024b423112303509f91253a53 (diff)
downloadopie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.zip
opie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.tar.gz
opie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.tar.bz2
Fix size and drawing of battery status widget and eliminate compiler warnings
Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/battery.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp
index 3b64fb5..9a9ddf6 100644
--- a/core/applets/batteryapplet/battery.cpp
+++ b/core/applets/batteryapplet/battery.cpp
@@ -70,7 +70,7 @@ void BatteryMeter::mousePressEvent( QMouseEvent* e )
70 QWidget::mousePressEvent( e ); 70 QWidget::mousePressEvent( e );
71} 71}
72 72
73void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) 73void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ )
74{ 74{
75 if ( batteryView && batteryView->isVisible() ) { 75 if ( batteryView && batteryView->isVisible() ) {
76 delete (QWidget *) batteryView; 76 delete (QWidget *) batteryView;
@@ -110,11 +110,11 @@ void BatteryMeter::chargeTimeout()
110{ 110{
111 percent += 20; 111 percent += 20;
112 if ( percent > 100 ) 112 if ( percent > 100 )
113 percent = 0; 113 percent = 0;
114 114
115 repaint(FALSE); 115 repaint(FALSE);
116 if ( batteryView ) 116 if ( batteryView )
117 batteryView->updatePercent( percent ); 117 batteryView->updatePercent( percent );
118} 118}
119 119
120void BatteryMeter::paintEvent( QPaintEvent* ) 120void BatteryMeter::paintEvent( QPaintEvent* )
@@ -154,7 +154,7 @@ void BatteryMeter::paintEvent( QPaintEvent* )
154 p.drawRect(x1,1,w,height()-1); // corpus 154 p.drawRect(x1,1,w,height()-1); // corpus
155 p.setBrush(color); 155 p.setBrush(color);
156 156
157 int extra = ((percent * h) % 100)/(100/4); 157 //int extra = ((percent * h) % 100)/(100/4);
158 158
159 int middle = w/2; 159 int middle = w/2;
160 for ( int i = 0; i < middle; i++ ) 160 for ( int i = 0; i < middle; i++ )