WattRate

Plasma 4 Extensions

Source (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
Score 74.0%
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

CxOrg

5 years ago

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 ) + "%";

}

Report

CxOrg

5 years ago

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 ) + "%";

}

Report

CxOrg

5 years ago

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";
}

Report

CxOrg

5 years ago

Small correction to h:mm

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

Report

SWaN

8 years ago

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.

Report

bitcrazy

8 years ago

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

Report

C

souledge

8 years ago

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 ;)

Report

bitcrazy

8 years ago

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

Report

9

AdaMin

8 years ago

Hi!

I would like to try the app, but i don't understand the building instructions.

cd /where/your/applet/is/installed

Report

C

souledge

8 years ago

I mean the directory where you extract the package.
After this, just compile it following istructions :)

What distro do you use?

Report

9

AdaMin

8 years ago

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!

Report

C

souledge

8 years ago

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

Report

9

AdaMin

8 years ago

It works fine now!

Thank you!

Report

12345678910
6
product-maker levondavdyan Oct 11 2011 9 excellent
product-maker Dratek Oct 03 2011 9 excellent
product-maker AdaMin Sep 13 2011 9 excellent
product-maker shaunehunter Aug 30 2011 9 excellent
product-maker RyanMcCoskrie Jun 24 2011 9 excellent
product-maker quippini Jun 21 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2
updated Sep 11 2011
added Jun 14 2011
downloads 24h
0
mediaviews 24h 0
pageviews 24h 1