diff options
author | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-08-08 00:46:38 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-08-10 07:46:54 (GMT) |
commit | c08f8182d81e053b4030e8883acb95de1d9aba84 (patch) | |
tree | 70bc283660a175130014e9b076be596759cc5511 /src/gui/graphicsview/qgraphicsanchorlayout_p.h | |
parent | f48d5dd7554edef5ac3fa11ebd86eaa52a8e23b6 (diff) | |
download | Qt-c08f8182d81e053b4030e8883acb95de1d9aba84.zip Qt-c08f8182d81e053b4030e8883acb95de1d9aba84.tar.gz Qt-c08f8182d81e053b4030e8883acb95de1d9aba84.tar.bz2 |
QGraphicsAnchorLayout: Adding updateChildrenSizes method to anchors
This method is meant to be called by the AnchorLayout after it has
set the sizes of all root anchors of a simplified graph.
The idea here it that these anchors will then propagate its new
sizes down the simplification tree.
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 2f1aa97..1c0f737 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -145,6 +145,8 @@ struct AnchorData : public QSimplexVariable { sizeAtMinimum(0), sizeAtPreferred(0), sizeAtMaximum(0), skipInPreferred(0), type(Normal), hasSize(false) {} + virtual void updateChildrenSizes() { }; + inline QString toString() const; QString name; @@ -192,6 +194,8 @@ struct SequentialAnchorData : public AnchorData name = QLatin1String("SequentialAnchorData"); } + virtual void updateChildrenSizes(); + void setVertices(const QVector<AnchorVertex*> &vertices) { m_children = vertices; @@ -212,6 +216,9 @@ struct ParallelAnchorData : public AnchorData origin = first->origin; name = QString::fromAscii("%1 | %2").arg(first->toString(), second->toString()); } + + virtual void updateChildrenSizes(); + AnchorData* firstEdge; AnchorData* secondEdge; }; |