Image 01
profile-image

CxOrg

Ian Newton London, United Kingdom
WattRate

Plasma 4 Extensions by souledge 13 comments

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

} - May 19 2015
WattRate

Plasma 4 Extensions by souledge 13 comments

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

} - May 18 2015
WattRate

Plasma 4 Extensions by souledge 13 comments

Small correction to h:mm

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

Plasma 4 Extensions by souledge 13 comments

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";
} - May 12 2015
Colibri

Various KDE 1.-4. Improvements by bk12 155 comments

Colibri will only run and appear with the desktop style if Plasma notifications are switched on at login then disabled to allow Colibri to be started. Otherwise there is some conflict at login to KDE which results in unstyled popups and Colibri reporting that plasma notifications are not started in the Colibri system settings pane. - Apr 01 2015