diff options
author | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-11-10 18:51:53 (GMT) |
---|---|---|
committer | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-11-12 21:35:26 (GMT) |
commit | bf0e30ce2987a9e93369fe01ab0f01eeb1d3afdb (patch) | |
tree | 962279b65f3b54ae51683ef3fc5b95d8b3cca2e6 /src/gui/graphicsview/qgraphicsanchorlayout_p.h | |
parent | 0f5a0ec164b3a5bc1f2a48ae56688a984b990bbd (diff) | |
download | Qt-bf0e30ce2987a9e93369fe01ab0f01eeb1d3afdb.zip Qt-bf0e30ce2987a9e93369fe01ab0f01eeb1d3afdb.tar.gz Qt-bf0e30ce2987a9e93369fe01ab0f01eeb1d3afdb.tar.bz2 |
QGAL: Update header documentation in QGALPrivate
As part of the refactoring of the setSpacing logic, we are encoraging
the analogy between the references to QGraphicsLayoutItem and to
QGraphicsAnchor, from the AnchorData point of view.
It happens that leaf anchors (ie, those that were not created by the
simplification) either represent an item or an user-created anchor.
This means that they should fetch their size information either from
a QGraphicsLayoutItem (member AnchorData->item) or from a QGraphicsAnchor
(member AnchorData->graphicsAnchor).
Thus, I'm organizing the header to make it more consistent to
the new concept.
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 5f50c85..26df109 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -121,10 +121,10 @@ struct AnchorData : public QSimplexVariable { }; AnchorData() - : QSimplexVariable(), item(0), from(0), to(0), + : QSimplexVariable(), from(0), to(0), minSize(0), prefSize(0), maxSize(0), sizeAtMinimum(0), sizeAtPreferred(0), - sizeAtMaximum(0), + sizeAtMaximum(0), item(0), graphicsAnchor(0), skipInPreferred(0), type(Normal), hasSize(true), isLayoutAnchor(false), isCenterAnchor(false), orientation(0), @@ -152,27 +152,32 @@ struct AnchorData : public QSimplexVariable { hasSize = false; } - // Internal anchors have associated items - QGraphicsLayoutItem *item; - // Anchor is semantically directed AnchorVertex *from; AnchorVertex *to; - // Size restrictions of this edge. For anchors internal to items, these - // values are derived from the respective item size hints. For anchors - // that were added by users, these values are equal to the specified anchor - // size. + // Nominal sizes + // These are the intrinsic size restrictions for a given item. They are + // used as input for the calculation of the actual sizes. + // These values are filled by the refreshSizeHints method, based on the + // anchor size policy, the size hints of the item it (possibly) represents + // and the layout spacing information. qreal minSize; qreal prefSize; qreal maxSize; + // Calculated sizes // These attributes define which sizes should that anchor be in when the // layout is at its minimum, preferred or maximum sizes. Values are // calculated by the Simplex solver based on the current layout setup. qreal sizeAtMinimum; qreal sizeAtPreferred; qreal sizeAtMaximum; + + // References to the classes that represent this anchor in the public world + // An anchor may represent a LayoutItem, it may also be acessible externally + // through a GraphicsAnchor "handler". + QGraphicsLayoutItem *item; QGraphicsAnchor *graphicsAnchor; uint skipInPreferred : 1; |