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-27 19:04:10 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 23:26:41 (GMT)
commitff5becbd4dafbabb79c086dc0cc18111d9e82a15 (patch)
treed67a34c525d861a71579d5a752b5745f15c9f0fa /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parent8caacf51667d4cf770b18a8b59e46f842861210e (diff)
downloadQt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.zip
Qt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.tar.gz
Qt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.tar.bz2
QGAL: keep references to layout vertices
We used to keep a reference just to the first vertex of the layout (corresponding to the left/top anchor point) inside the Graph class, as "root vertex". Since the notion of rootVertex isn't used by the Graph itself, now this is stored outside the graph, and we also store the central and last vertices. This avoids using internalVertex() function to find out the vertices based on the item (in the case, the 'q'). This will be useful when we do simplify vertices, since the original layout vertice might not be the "layout vertice" in the graph. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 7dd0d65..7d7bdb6 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -504,6 +504,10 @@ public:
// Internal graph of anchorage points and anchors, for both orientations
Graph<AnchorVertex, AnchorData> graph[2];
+ AnchorVertex *layoutFirstVertex[2];
+ AnchorVertex *layoutCentralVertex[2];
+ AnchorVertex *layoutLastVertex[2];
+
// Graph paths and constraints, for both orientations
QMultiHash<AnchorVertex *, GraphPath> graphPaths[2];
QList<QSimplexConstraint *> constraints[2];