[Panel-devel] [PATCH] Plasma Layouts
Aaron J. Seigo
aseigo at kde.org
Mon May 21 20:44:47 CEST 2007
On Monday 21 May 2007, Matias Valdenegro T. wrote:
> Hi:
>
> Attached are :
> - Patch against kdebase/workspace/plasma/lib
i really wish we could avoid a Widget superclass, since that makes it
difficult / impossible to add Qt-provided QGraphicsViewItems to the layouts.
the problem i can see is that QGraphicsItem doesn't provide any size hinting
information, which is understandable since it's a canvas implementation first
and formost.
blarg. so .. the question i have is: how do we add a QGraphicsTextItem to a
Layout?
> - 4 New classes :
> - Layout, base class for layouts
> - VBoxLayout, vertical box layout implementation
these look ok to me...
> - LayoutItem, base class for layout-manager items
same generall issue as for Widget .. i'm not sure what the solution is here,
though... perhaps, as with the lineedit, it's to subclass the Qt qgv text
label and MI Widget? ... unfortunately Widget is a QGraphicsItem itself.
perhaps that is the solution? make Widget just subclass DataVisualization and
have the widget MI Widget and a QGraphicsItem? still not pretty, but this is
all semi-temporary (e.g. just for the 4.0 series)
> - Container, a round corner rectangle for widget containment
this should probably be loading an SVG for its background rather than painting
a rounded rectangle manually.. Plasma::Svg can get this for you, -or- you
could subclass QGraphicsSvgItem and load the Svg using Plasma::Theme.
getting nice and close... do you have an svn account so you can commit your
own stuff?
--
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/55fb225a/attachment.pgp
More information about the Panel-devel
mailing list