From 7a9cabb330284777113bb544139843dcf0593628 Mon Sep 17 00:00:00 2001 From: harlekin Date: Tue, 11 May 2004 22:41:22 +0000 Subject: the "bett ery" commit, batteryapplet is now a popup, only shows second battery on ipaq if a second battery is present --- (limited to 'core/applets/batteryapplet/batterystatus.h') 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 @@ #ifndef BATTERY_STATUS_H #define BATTERY_STATUS_H -#include +#include class PowerStatus; -class BatteryStatus : public QWidget +class BatteryStatus : public QFrame { Q_OBJECT public: - BatteryStatus( const PowerStatus *s, QWidget *parent=0 ); + BatteryStatus( const PowerStatus *s, QWidget *parent=0, WFlags f = 0 ); ~BatteryStatus(); void updatePercent( int ); - + QSize sizeHint() const; protected: void drawSegment( QPainter *p, const QRect &r, const QColor &topgrad, const QColor &botgrad, const QColor &highlight, int hightlight_height ); void paintEvent( QPaintEvent *pe ); bool BatteryStatus::getProcApmStatusIpaq(); + private: + QString statusText() const; + QString statusTextIpaq() const; const PowerStatus *ps; int percent; int ipaqPercent; @@ -52,6 +55,7 @@ private: QString ipaqChem; QString jackChem; bool bat2; + bool bat2inserted; int screenWidth; int screenHeight; }; -- cgit v0.9.0.2