[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [Panel-devel] Plasma::Widget subclassing and QGVItem's
From:       "Matias Valdenegro T." <mvaldenegro () informatica ! utem ! cl>
Date:       2007-05-25 0:01:28
Message-ID: 200705242001.28901.mvaldenegro () informatica ! utem ! cl
[Download RAW message or body]

El Jue 24 May 2007, Andreas Aardal Hanssen escribió:
> On Wednesday 23 May 2007 18:25, Aaron J. Seigo wrote:
> > > > On Tuesday 22 May 2007, Matias Valdenegro T. wrote:
> > > > 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.
> >
> > well, yes. i thought was implied =)
>
> So, maybe Widget is a Layoutitem? Maybe inheriting from QGraphicsItem and
> LayoutItem will make the item a widget?

a Widget is a LayoutItem, but i don't know if inheriting from QGraphicsItem 
will make the Qt provided items (QGraphicsTextItem and such) wrappable.

> class Widget : public QGraphicsItem, public LayoutItem
> {
> };

As we speak is defined as 

class Widget : public QGraphicsItem, public LayoutItem, public 
DataVisualization
{
};

> Just a thought. The approach we're looking at in Qt is that layouts are
> items as well, so the layout hierarchy is the same as the item hierarchy
> (as opposed to with QWidget, where the hierarchy is separate).

Yep, i've implemented the same idea, a Layout is also a LayoutItem.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic