Wallpaper class; API review requested

Aaron J. Seigo aseigo at kde.org
Tue Aug 12 15:52:45 CEST 2008


On Monday 11 August 2008, Kevin Ottens wrote:
> Hello,
>
> Same dumb method as usual from me.
>
> Le Tuesday 05 August 2008, Aaron J. Seigo a écrit :
> > the affected classes are Containment, with a setter and getter for the
> > wallpaper
>
> I'd probably add a setWallpaper(Wallpaper*) so that the setter/getter
> couple becomes symetric with an extra convenience version (the one doing
> the load for you).

ownership of the Wallpaper* would then be taken by the Containment in this 
case; there are still ways to screw it up at this point. i'm always wary of 
these kinds of setters for this reason.

> > and the new class Wallpaper.
>
> A few comments:
>  * I think it's worth it to have the "icon" property too

+1

>  * I don't get what the "mode" thing is about. Any more specific use case?
> I admit I had to look for the apidox for this one. I found a small blurb in
> the class apidox about modes, but from the relevant methods there's nothing
> about what the modes are. Last, the class apidox didn't make me figure out
> what they are exactly (switch to using an "Action" term at some point).

yes, this needs to be made clearer. the concept is that one plugin may provide 
multiple wallpaper methods.

our current wallpaper renderer does Single Image, Slideshow and Plain Color. 
so, three different modes.

>  * Depending on what we figure out regarding what the modes are, it might
> be worth it to have a small "WallpaperMode" class (it holds already three
> properties, and could grow).

which 3 properties?

>  * I don't get the action parameter from the init() method (but since I
> didn't understand th mode thing, that's probably related).

that's actually supposed to be mode, not action.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080812/7c25674c/attachment-0001.pgp 


More information about the Plasma-devel mailing list