summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/battery.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp
index 3d254fc..3b329c6 100644
--- a/core/applets/batteryapplet/battery.cpp
+++ b/core/applets/batteryapplet/battery.cpp
@@ -1,61 +1,61 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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#include <qpe/power.h> 23#include <qpe/power.h>
24 24
25#include <qpainter.h> 25#include <qpainter.h>
26#include <qtimer.h> 26#include <qtimer.h>
27 27
28 28
29BatteryMeter::BatteryMeter( QWidget *parent = 0 ) 29BatteryMeter::BatteryMeter( QWidget *parent )
30 : QWidget( parent ), charging(false) 30 : QWidget( parent ), charging(false)
31{ 31{
32 ps = new PowerStatus; 32 ps = new PowerStatus;
33 startTimer( 10000 ); 33 startTimer( 10000 );
34 setFixedHeight(12); 34 setFixedHeight(12);
35 chargeTimer = new QTimer( this ); 35 chargeTimer = new QTimer( this );
36 connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); 36 connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) );
37 timerEvent(0); 37 timerEvent(0);
38} 38}
39 39
40BatteryMeter::~BatteryMeter() 40BatteryMeter::~BatteryMeter()
41{ 41{
42 delete ps; 42 delete ps;
43} 43}
44 44
45QSize BatteryMeter::sizeHint() const 45QSize BatteryMeter::sizeHint() const
46{ 46{
47 return QSize(10,12); 47 return QSize(10,12);
48} 48}
49 49
50void BatteryMeter::mouseReleaseEvent( QMouseEvent *) 50void BatteryMeter::mouseReleaseEvent( QMouseEvent *)
51{ 51{
52 if ( batteryView && batteryView->isVisible() ) { 52 if ( batteryView && batteryView->isVisible() ) {
53 delete (QWidget *) batteryView; 53 delete (QWidget *) batteryView;
54 } else { 54 } else {
55 if ( !batteryView ) 55 if ( !batteryView )
56 batteryView = new BatteryStatus( ps ); 56 batteryView = new BatteryStatus( ps );
57 batteryView->showMaximized(); 57 batteryView->showMaximized();
58 batteryView->raise(); 58 batteryView->raise();
59 batteryView->show(); 59 batteryView->show();
60 } 60 }
61} 61}