Difference between revisions of "KThinkBat"

From ThinkWiki
Jump to: navigation, search
(Gentoo)
Line 29: Line 29:
 
==Gentoo==
 
==Gentoo==
 
You can use the the ebuild from this [https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/ portage overlay], category/package: [https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/app-laptop app-laptop]/[https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/app-laptop/kthinkbat kthinkbat].
 
You can use the the ebuild from this [https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/ portage overlay], category/package: [https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/app-laptop app-laptop]/[https://lepetitfou.dyndns.org/svn/portage-overlay-lefou/trunk/app-laptop/kthinkbat kthinkbat].
 
===Cosmetical Patch===
 
 
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).
 
 
<pre>
 
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();
 
</pre>
 
  
 
==Download==
 
==Download==

Revision as of 00:57, 17 December 2005

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.

Homepage: https://lepetitfou.dyndns.org/wiki/bin/view/Werkstatt/KThinkBat

Author: Tobias Roeser

Latest Version: 0.1.4

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.

Download