[Panel-devel] Plasma::Widget subclassing and QGVItem's

Matias Valdenegro T. mvaldenegro at informatica.utem.cl
Wed May 23 15:46:25 CEST 2007


El Mar 22 May 2007, Aaron J. Seigo escribió:
> On Tuesday 22 May 2007, Matias Valdenegro T. wrote:
> > - Create classes that inherit LayoutItem and the desired Qt Graphics Item
> > to implement boundingRect() virtually.
> > - Use dynamic properties on LayoutItems, but still you need a way to
> > notify the LayoutItem that it's geometry has changed and it needs to be
> > redrawn.
> >
> > I'm still on the idea that all Plasma Widgets inherit Plasma::Widget, but
> > for Qt's ones we should implement a workaround or something.
>
> well, we could wrap Qt's ones. what this would mean probably is:
>
> making Widget not subclass QGraphicsItem or that matter DataVisualization.
> it would then become, essentially, an interface class for "extra" plasma
> features. so:
>
> namespace Plasma
> {
> class Label : public QGraphicsItem, public Widget
> {
>      // implementation of Widget API
> };
> }
>
> how does that sound?

Sounds nice, but widget should at least inherit LayoutItem to be 
layout-manageable.


More information about the Panel-devel mailing list