Sets the profiles via the wrapped ui in powerdevil if available.
If the performance profile is inhibited, the second half of the slider
will look disabled and it will be impossible to move it to performance.
Co-authored-by: Kai Uwe Broulik <kde@privat.broulik.de>
Summary:
Those information mostly clutter the plasmoid UI and are not very useful in the energy plasmoid
The battery plasmoid represents the state of the battery, for battery information we have the Energy information KCM in kinfocenter that will display this after D23152 .
Test Plan:
Before:
{F7257309}
After:
{F7257310}
Reviewers: ngraham, #plasma, broulik, #vdg, filipf
Reviewed By: ngraham, #vdg, filipf
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23237
Gives them a nicer icon.
The icon does not yet exist in Plasma but gaming-input does, so it falls back to that.
CHANGELOG: Battery Monitor can now show battery levels of gaming devices, such as wireless gamepads and joysticks
Differential Revision: https://phabricator.kde.org/D11571
This allows to query for whether the user may logout from QML-only parts
like the desktop toolbox.
Differential Revision: https://phabricator.kde.org/D1610
Energy readings seem quite unreliable - if we only have one battery
it's better just to show the actual percentage which, for whatever reason,
is usually more accurate than energy divided by energyFull.
According to the UPower specification UPS batteries do not suppliy energy values (Wh)
thus our calculation breaks when there's just an UPS and we start blinking because
we think the total percentage is zero. In case we do have batteries but no energy
just average the percentages. Still not perfect but close enough.
BUG: 348588
FIXED-IN: 5.4.0
Otherwise there will be a JS exception in the binding causing the battery percentage
to be shown on the screenlocker unconditionally leading to a "0% remaining" on a desktop PC
This can result in the "unknown" icon being shown but when an app posts an inhibition
without being found by either KService or name, that is a really naughty app.
A value of zero could either mean no battery present or it is really zero percent.
Also display "n% battery remaining" as fallback rather than an explicit "charging"
This was there to initially populate the dataengine. But since the requests are all
asynchronous the data won't be there on time anyway, so let's just wait until somebody
explicitly requests the source which was done by batterymonitor anyway resulting in two
subsequent calls potentially confusing PowerDevil and causing it to go nuts.
CCBUG: 337674
This adds a new "Inhibitions" source which has keys for each application
(amarok, vlc, ...) and inside a QVariantMap with the pretty application name
(taken from the desktop file through KService and cached localle), the
application icon and the reason for the inhibition (as provided by the app)
REVIEW: 122132
in case of several batteries; a plain "sum/count" won't do it,
especially when the batteries have different Energy. Take that into
account, report it thru the dataengine and do the math correctly
This should eventually allow us to react to hotplugging a keyboard and provide brightness
controls then. It does not yet watch for PowerDevil's availability on DBus (eg. when kded
takes a bit longer to startup), and also PowerDevil's brightness controls don't support
on-demand activation yet
REVIEW: 121365
Now that we can finally use absolute brightness values, rather than a fixed 0 - 100% range,
those values should be exposed in the dataengine. This allows us to eg. properly handle
keyboard brightness controls which usually have just a few steps
Also clean up code by moving stuff into lambdas and reworking the ugly brightness availability stuff.
REVIEW: 121355