[Panel-devel] CardLayout and PositionLayout

Ivan Čukić ivan.cukic+kde at gmail.com
Fri Oct 12 12:44:13 CEST 2007


So, here's the diff of the NodeLayout (was PositionLayout, but imho this name 
is more accurate).

It is even more powerfull than I wanted in the beginning.

/**
 * Node layout has an advanced layouting mechanism. Every item's position
 * is defined by two nodes - one for top-left corner, and the other one for
 * bottom-right corner.
 * 
 * Each node is defined by a pair of relative (xr, yr) and a pair of 
 * absolute (xa, ya) coordinates. The calculated node coordinates depend
 * on the size and position of the NodeLayout object in the following
 * manner:
 *   x = layoutLeft + (xr * layoutWidth)  + xa
 *   y = layoutTop  + (yr * layoutHeight) + ya
 *
 * Alternatively, the item's position can be defined by using one node and
 * one pair of relative coordinates (xr, yr). In that case, the item is sized
 * following the sizeHint(). The relative coordinates (this time they are 
 * relative to the item's geometry, not the layout's) specify what point of
 * the item will be bound to the defined node.
 */

Cheers!

-- 
A positive attitude may not solve all your problems, but it will annoy enough 
people to make it worth the effort
   -- Herm Albright
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nodelayout.diff
Type: text/x-diff
Size: 9392 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071012/d9581bc5/attachment.bin 
-------------- 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/20071012/d9581bc5/attachment.pgp 


More information about the Panel-devel mailing list