Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
7.2

Description:
Mostra l'Energy Rate attuale del laptop nel momento in cui si e' a batteria.

It shows energy rate's laptop when it works on battery mode.

For installation, read README file in the extracted download package.

HOW TO TRANSLATE WattRate INTO GERMA LANGUAGE:

SELECT
wattUsage = d->energyRate();

if( wattUsage > 0 && d->timeToEmpty() > 0 )
{
wattString = "Consumo attuale: " + QString::number( wattUsage , 'd' , 2 ) + "Wn" + "Carica rimanente: " + QString::number( d->percentage() , 'i', 0 ) + "%";
}
else
{
wattString = "Fonte AC in usonPercentuale ricarica: " + QString::number( d->percentage() , 'i' , 0 ) + "%";
}
update();

AND REPLACE WITH

wattUsage = d->energyRate();

if( wattUsage > 0 && d->timeToEmpty() > 0 )
{
wattString = "aktueller Verbrauch: " + QString::number( wattUsage , 'd' , 2 ) + "Wn"
+ "Akku zu " + QString::number( d->percentage() , 'i', 0 ) + "% voll";
}
else
{
wattString = "Akku zu " + QString::number( d->percentage() , 'i' , 0 ) + "% aufgeladen,nam Netzteil angeschlossen";
}

update();


19/06/2011: 0.2 version
---
0.1 version

Ratings & Comments

13 Comments

CxOrg

When charging shows Wh in battery, time to charge and % capacity. When discharging estimated time to empty, current watts drawn and % capacty. Can take a minute for the next sample but a useful none the less. Thanks for the nice example to get started with Qt libraries! if( wattUsage > 0 && d->timeToEmpty() > 0 ) { wattString = QDateTime::fromTime_t(d->timeToEmpty()).toString("h:mm") + " h:m\n" + QString::number( wattUsage , 'd' , 1 ) + "w" + QString::number( d->percentage() , 'i' , 0 ) + "%"; } else { wattString = QString::number( d->energy() , 'd' , 2 ) + " Wh\n" + QString::number(d->timeToFull()/60 , 'i', 0 ) + "m " + QString::number( d->percentage() , 'i' , 0 ) + "%"; }

CxOrg

When charging shows Wh in battery, time to charge and % capacity. When discharging estimated time to empty, current watts drawn and % capacty. Can take a minute for the next sample but a useful none the less. Thanks for the nice example to get started with Qt libraries! if( wattUsage > 0 && d->timeToEmpty() > 0 ) { wattString = QDateTime::fromTime_t(d->timeToEmpty()).toString("h:mm") + " h:m\n" + QString::number( wattUsage , 'd' , 1 ) + "w" + QString::number( d->percentage() , 'i' , 0 ) + "%"; } else { wattString = QString::number( d->energy() , 'd' , 2 ) + " Wh\n" + QString::number(d->timeToFull()/60 , 'i', 0 ) + "m " + QString::number( d->percentage() , 'i' , 0 ) + "%"; }

CxOrg

A minimal version of display for Plasma panel use. if( wattUsage > 0 && d->timeToEmpty() > 0 ) { wattString = QDateTime::fromTime_t(d->timeToEmpty()).toString("h:ss") + " H\n" + QString::number( wattUsage , 'd' , 2 ) + "W"; } else { wattString = "AC:" + QString::number( d->percentage() , 'i' , 0 ) + "%\n" + QString::number( wattUsage , 'd' , 2 ) + "W"; }

CxOrg

Small correction to h:mm wattString = QDateTime::fromTime_t(d->timeToEmpty()).toString("h:mm") + "H\n" + QString::number( wattUsage , 'd' , 2 ) + "W";

SWaN

It could be a really useful and nice plasmoid, if I only could run it :) My plasma desktop crashes whenever I try to load it, and plasmoidviewer segfaults as well. I built it with the cmake flags you suggest. KDE version is 4.7.1 on Arch Linux. Besides, I agree with bitcrazy for the need of a more consistent way to add translations and edit config options. It could ease yours and other people's, willing to contribute, work.

bitcrazy

Translation into english at least would be nice and the possibility to configure whether leading texts or not. I've translated it in the source for now. Nice plasmoid nevertheless. monk

souledge

I could write an how-to to edit text into user's language but for adding a language choise I should add a config window... It's easier to modify it in the source, they're two words ;)

bitcrazy

That's right, but may you can spread the sourcw code with english texts for those not able or feared of editing the code. Config options would be fine for font size and background f.e. m0nk

AdaMin

Hi! I would like to try the app, but i don't understand the building instructions. cd /where/your/applet/is/installed

souledge

I mean the directory where you extract the package. After this, just compile it following istructions :) What distro do you use?

AdaMin

Thanks! I tried it, like you wrote, but it somehow doesn't work. I thougth, that i may misunderstood something. I'll try it today again. I use Gentoo. Bye!

souledge

Try this: - For each user: cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=release ../ OR - For your user: cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` -DCMAKE_BUILD_TYPE=release ../ Let me know if this will work

AdaMin

It works fine now! Thank you!

Pling
0 Affiliates
Details
license
version 0.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 14 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 13 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0