[Panel-devel] CardLayout and PositionLayout
Ivan Čukić
ivan.cukic+kde at gmail.com
Thu Oct 11 00:25:58 CEST 2007
Is there a need for these layouts (to port them to libplasma from Lancelot
like the BoxLayout in the past)
CardLayout:
Holds multiple elements. It can hold LayoutItems and Widgets. Only one Widget
can be shown at a time. LayoutItems are always shown since there are no
hide/show methods for them. Every Widget has an id, so that you can call
layout->show(id) to show that Widget. Every Widget and LayoutItem occupies
the whole available space given to the layout. (Except margins) No transition
animation ATM.
PositionLayout:
Holds multiple elements. The coordinates for an element can be set absolute or
relative, going from any corner of the layout.
Simple mapping of the values - x coordinates:
[0, 1.0] - this coord is relative to left border. 0.25 is located at one
quarter of the width of the layout's geometry.
(1.0, +oo) - coordinate in pixels from the left edge
[-1.0, -0] - this coord is relative to left border. -0.25 is located at three
quarters of the width of the layout's geometry (calculating from
the left edge).
(-oo, 1.0) - coordinate in pixels from the right edge
The code (a bit dirty ATM) is located in
trunk/extragear/plasma/applets/lancelot/app/
Cheers
--
Those people who think they know everything are a great annoyance to those of
us who do.
-- Isaac Asimov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071011/a36e0b61/attachment-0001.pgp
More information about the Panel-devel
mailing list