Difference between revisions of "KThinkBat"

From ThinkWiki
Jump to: navigation, search
m (capitalization [ hey, cool feature! :-) ])
Line 3: Line 3:
 
[https://lepetitfou.dyndns.org/KThinkBat KThinkBat] is a laptop battery monitor for the KDE-Kicker. It is inspired by the Windows Application "Battery Maximizer" which is included with ThinkPads.  
 
[https://lepetitfou.dyndns.org/KThinkBat KThinkBat] is a laptop battery monitor for the KDE-Kicker. It is inspired by the Windows Application "Battery Maximizer" which is included with ThinkPads.  
  
On ThinkPads it uses the SMAPI BIOS through the [[Tp_smapi]] driver.
+
On ThinkPads it uses the SMAPI BIOS through the [[tp_smapi]] driver.
  
 
Homepage: https://lepetitfou.dyndns.org/KThinkBat
 
Homepage: https://lepetitfou.dyndns.org/KThinkBat

Revision as of 11:45, 12 January 2006

Description

KThinkBat is a laptop battery monitor for the KDE-Kicker. It is inspired by the Windows Application "Battery Maximizer" which is included with ThinkPads.

On ThinkPads it uses the SMAPI BIOS through the tp_smapi driver.

Homepage: https://lepetitfou.dyndns.org/KThinkBat

Author: Tobias Roeser

Latest Version: 0.1.5_alpha2

Screenshot

KThinkBat.png

Offline Mode: You see how much power left and how much is consumed at the moment.

KThinkBat ac.png

Online Mode: You see the loading-power.

Installation

KThinkBat uses the autotools. For a standard installation use

./configure
make
su -c 'make install'

Gentoo

You can use the the ebuild from this portage overlay, category/package: app-laptop/kthinkbat.

Patches

Here's a small patch that changes the color of the current power consumtion text to white ( for dark background). Furthermore it changes the battery gauge's size (looks nicer if you place the kicker vertical).

diff -ur kthinkbat.orig/src/kthinkbat.cpp kthinkbat/src/kthinkbat.cpp
--- kthinkbat.orig/src/kthinkbat.cpp    2005-12-15 22:54:28.000000000 +0100
+++ kthinkbat/src/kthinkbat.cpp 2005-12-15 23:32:10.000000000 +0100
@@ -101,7 +101,7 @@
 void KThinkBat::paintEvent(QPaintEvent* event)
 {
     // Werte fr Gauge und Rand
-    QSize gaugeFill(40, 18);
+    QSize gaugeFill(40, 14);
     QSize gHalfDot(4, 4);
     QSize offset(4, 4);

@@ -135,9 +135,10 @@
     painter.drawPolyline(border);

     // Prozent-Anzeige
-    painter.drawText( offset.width() + 12, offset.height() + gaugeFill.height() - 5, QString().number(batValue));
+    painter.drawText( offset.width() + 14, offset.height() + gaugeFill.height() - 2, QString().number(batValue));

     // aktueller Verbrauch in W
+    painter.setPen ( "white" );
     painter.drawText( offset.width(), offset.height() + gaugeFill.height() + 12, QString().number((mWH + 500)/1000) + " " + unity );

     painter.end();


Download