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-08 23:09:21 (GMT)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-10-09 14:18:43 (GMT)
commitcebaf35e3d79a7cde84a9ef5b0023e841075d5c1 (patch)
treee939f9f8f724b0bc406af98717aaf02694a50289 /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parenta9b1d44fdc9fac0be0016114afcad56e9d372c26 (diff)
downloadQt-cebaf35e3d79a7cde84a9ef5b0023e841075d5c1.zip
Qt-cebaf35e3d79a7cde84a9ef5b0023e841075d5c1.tar.gz
Qt-cebaf35e3d79a7cde84a9ef5b0023e841075d5c1.tar.bz2
QGAL: refactor calculateGraphs() method
Create calculateTrunk() and calculateNonTrunk() methods, that calculate sizes for anchors in different parts of the simplified graph (using simplex when needed). Also fixes a minor leak when the nontrunk part is non-feasible. The old code left the loop leaving the contents of 'sizeHintConstraints' not allocated. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 940f143..2ced72d 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -438,6 +438,13 @@ public:
void calculateGraphs();
void calculateGraphs(Orientation orientation);
+
+ bool calculateTrunk(Orientation orientation, const GraphPath &trunkPath,
+ const QList<QSimplexConstraint *> &constraints,
+ const QList<AnchorData *> &variables);
+ bool calculateNonTrunk(const QList<QSimplexConstraint *> &constraints,
+ const QList<AnchorData *> &variables);
+
void setAnchorSizeHintsFromItems(Orientation orientation);
void findPaths(Orientation orientation);
void constraintsFromPaths(Orientation orientation);