need help in containments development

Giulio Camuffo giuliocamuffo at gmail.com
Wed Jul 21 10:57:44 CEST 2010


2010/7/20 Aaron J. Seigo <aseigo at kde.org>

> > so if I had previously swapped
> > from my own containment to the default one it will first create the
> default
> > one and then restore the previously saved object, resulting in one
> useless
> > object.
>
> is this "object" a Plasma::Applet, and the default containment is restoring
> it? otherwise, i'm completely lost by what you mean here :)
>
> perhaps you could provide a clearer description of exactly what you are
> trying
> to achieve?
>
> I know I've the bad habit to try to keep the talk abstract. :)
It isn't an Applet. It is a QGraphicsWidget I use to group applets together.
It saves its config information in the rc file, just like Applet does. So in
restoreContents if the containment finds its entry it restores it. But if
there isn't the entry or if restoreContents isn't called i need to create a
default one.
init() is the first method after the constructor that gets called, and there
it can't know if restoreContents will get called and if it will restore my
qgw, so i can't create the default one there.
If you need to look at the code look at
playground/base/plasma/containments/groupingdesktop/lib/groupingcontainment.cpp

Giulio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100721/28c2b074/attachment.htm 


More information about the Plasma-devel mailing list