[Panel-devel] battery applet

Sebastian Kügler sebas at kde.org
Thu Jun 28 13:26:11 CEST 2007


On Thursday 28 June 2007 13:14:45 Kevin Ottens wrote:
> Le jeudi 28 juin 2007, Sebastian Kügler a écrit :
> > As some of you already have seen, I've put a battery applet into
> > playground. Some people have already worked a bit with the code. The
> > catch is that I'm new to C++, so there are probably dumb things in there.
> >
> > So if someone wants to look through the code, I'd appreciate comment. But
> > by all means, don't let me steal your valuable time.
> >
> > The code is in
> > http://websvn.kde.org/trunk/playground/base/plasma/applet/battery
> > A screenshot is at http://vizzzion.org/images/blog/battery-plasmoid.png
> >
> > Christopher Blauvelt has adapted the applet for use with the solidengine,
> > so the battery dataengine might soon go away.
>
> Well, you probably want more than simply reporting one battery level, don't
> you?

Yes, but for a prototype, I think this is quite OK.

> Actually, you probably want to report the overall battery level...
> Reporting only _one_ battery level is not enough for some systems. In fact,
> that would be nice to have a "powermanagement" dataengine (I don't like the
> name battery), and the applet could use this one or the solidengine to
> report battery level... Depending on the engine it uses you'd focus on one
> battery, or the overall state of the system.

That's right, whether or not we want a separate dataengine for that, I don't 
know. It probably depends on how much code would be duplicated, and how much 
overhead one or the other case causes. (Since it's mostly SIGNAL-based, I 
don't think that'd be a lot though.) I'd not have a problem with deleting the 
battery dataengine (did indeed ponder renaming it to something 
like "powermanagement engine", but I'd like to discuss this with others 
first).

Regarding different batteries, combined states and the like: I don't know how 
to solve this problem at this layer in the best possible way. Having a second 
battery (which I don't have) would probably make it easier to futz with this.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Death solves all problems: no man, no problem. - Joseph Stalin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070628/3bb4cb40/attachment.pgp 


More information about the Panel-devel mailing list