toolbox (and applethandle?) architecture rewamp

Giulio Camuffo giuliocamuffo at gmail.com
Sat Jul 31 15:53:20 CEST 2010


In data giovedì 29 luglio 2010 21:11:05, Marco Martin ha scritto:
> On Thu, Jul 29, 2010 at 6:46 PM, Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
> > In data giovedì 29 luglio 2010 18:09:10, Marco Martin ha scritto:
> >> if this works out, i would like to try it for applet handles as well
> >> in the future (in this case there wouldn't be a dependency from
> >> corona, but a DesktopContainment could set a different plugin for
> >> instance, but that's another topic).
> > 
> > I'm all for the support for different handles, and it would be really
> > nice if we find out a nice API allowing to use the same handles with
> > different, developer-defined, widgets other than the Applets.
> > Currently in my containments with grouping support i have to reimplement
> > the handle to be able to use it with my groups, and i'd like to find a
> > nicer solution.
> 
> yep, that was an use case i had in mind...
> i want to see how the toolbox ones turns out before really starting to
> think on that...
> but if you would like to give it a crack i'm happy to leave it to you :p

I see two ways to do it, though i don't like so much either one :(
1) We could modify the handle constructor to let it pass a QGraphicsWidget instead of an 
Applet and then check things like hasConfigurationInterface() using the property() method.
Still it would remain the problem of emitting the appletTransformedByUser() signal, but 
maybe we could workaround that.

2) Or we could create a class like Plasma::Widget, maybe abstract, which has the 
hasConfigurationInterface()-like methods and add to the handle a constructor for it. Then 
for KDE 5 we could make Applet a subclass of that.

Giulio


More information about the Plasma-devel mailing list