summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsanchorlayout_p.h
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-09-25 19:13:18 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-06 09:28:40 (GMT)
commitbcd08ab82b5df13f7687a504f868cb8b6ff8b75e (patch)
tree026473dc868c7d48825055a8f88780772f22f018 /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parent5dd77be3acfb53b44d7d6b0015af0c33124ab84a (diff)
downloadQt-bcd08ab82b5df13f7687a504f868cb8b6ff8b75e.zip
Qt-bcd08ab82b5df13f7687a504f868cb8b6ff8b75e.tar.gz
Qt-bcd08ab82b5df13f7687a504f868cb8b6ff8b75e.tar.bz2
QGraphicsAnchorLayout: avoid code duplication when initializing complex anchors
Now we can use refreshSizeHints_helper() to initialize complex anchors (parallel and sequential). This avoids duplication of code in the function simplifySequentialChunk(). This commit also 'disable' ExpandFlag temporarily, stabilizing the tests for the simplification. The next commit should re-enable it implementing the necessary code for simplification as well. 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 047be39..8f67b2c 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -238,6 +238,8 @@ struct SequentialAnchorData : public AnchorData
virtual void updateChildrenSizes();
virtual void refreshSizeHints(qreal effectiveSpacing);
+ void refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
+
void setVertices(const QVector<AnchorVertex*> &vertices)
{
m_children = vertices;
@@ -272,6 +274,8 @@ struct ParallelAnchorData : public AnchorData
virtual void updateChildrenSizes();
virtual void refreshSizeHints(qreal effectiveSpacing);
+ void refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
+
AnchorData* firstEdge;
AnchorData* secondEdge;
};