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

List:       kde-panel-devel
Subject:    Re: [Panel-devel] Plasma::Widget subclassing and QGVItem's
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2007-05-25 1:24:04
Message-ID: 200705241924.04910.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 24 May 2007, Matias Valdenegro T. wrote:
> 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.

well, in the Qt provided items case it would subclass from LayoutItem and, for 
instance, QGraphicsSvgItem. this is exactly what the LineEdit widget is 
doing, in fact.

> > class Widget : public QGraphicsItem, public LayoutItem
> > {
> > };
>
> As we speak is defined as
>
> class Widget : public QGraphicsItem, public LayoutItem, public
> DataVisualization
> {
> };

right; DataVisualization is going to go away though. it's nice because it 
documents the required slot's signature and even causes a compile time check 
on the signature (due to it being pure virtual) .... but it really has little 
purpose beyond that and so isn't worth the API imho.

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

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


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

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