summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsanchorlayout_p.h
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-10-16 15:26:21 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-10-26 22:17:47 (GMT)
commitbee00ac4ca0865e621edaea54d079005c68f120e (patch)
tree5cef546fbe483a12d5d698fc5902224e19be36bd /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parentf9dfd711d104bb438da6ea281012600a897ab30c (diff)
downloadQt-bee00ac4ca0865e621edaea54d079005c68f120e.zip
Qt-bee00ac4ca0865e621edaea54d079005c68f120e.tar.gz
Qt-bee00ac4ca0865e621edaea54d079005c68f120e.tar.bz2
QGAL: store item and center-ness information in the anchor
We used to look for this information in the anchor's from and to vertices, but to enable simplification of vertices, we have to store this information in the anchor. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index a3de6f6..511e1ec 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -151,12 +151,13 @@ struct AnchorData : public QSimplexVariable {
};
AnchorData()
- : QSimplexVariable(), from(0), to(0),
+ : QSimplexVariable(), item(0), from(0), to(0),
minSize(0), prefSize(0), expSize(0), maxSize(0),
sizeAtMinimum(0), sizeAtPreferred(0),
sizeAtExpanding(0), sizeAtMaximum(0),
graphicsAnchor(0), skipInPreferred(0),
- type(Normal), hasSize(true), isLayoutAnchor(false) {}
+ type(Normal), hasSize(true), isLayoutAnchor(false),
+ isCenterAnchor(false) {}
virtual void updateChildrenSizes() {}
virtual bool refreshSizeHints(qreal effectiveSpacing);
@@ -180,6 +181,9 @@ struct AnchorData : public QSimplexVariable {
hasSize = false;
}
+ // Internal anchors have associated items
+ QGraphicsLayoutItem *item;
+
// Anchor is semantically directed
AnchorVertex *from;
AnchorVertex *to;
@@ -206,6 +210,7 @@ struct AnchorData : public QSimplexVariable {
uint type : 2; // either Normal, Sequential or Parallel
uint hasSize : 1; // if false, get size from style.
uint isLayoutAnchor : 1; // if this anchor is connected to a layout 'edge'
+ uint isCenterAnchor : 1;
};
#ifdef QT_DEBUG