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-19 10:30:52 (GMT)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-10-26 20:03:31 (GMT)
commit96f59cb98c248185a3873f06d0e1a2e7652d8cec (patch)
tree8a519ad2457863f983b2cf5daa7056a4b828c58d /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parent9a1ee410d24321e7eedaea6bb4f1b21fcc6fb427 (diff)
downloadQt-96f59cb98c248185a3873f06d0e1a2e7652d8cec.zip
Qt-96f59cb98c248185a3873f06d0e1a2e7652d8cec.tar.gz
Qt-96f59cb98c248185a3873f06d0e1a2e7652d8cec.tar.bz2
QGAL: complex anchors can indicate errors when refreshing sizehint
Now the refreshSizeHints() returns a boolean, and the parallel anchor will return false in unfeasible cases, e.g. one anchor has maximum size smaller than other minimum size. 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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index d45c004..d4eb2d4 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -159,7 +159,7 @@ struct AnchorData : public QSimplexVariable {
type(Normal), hasSize(true), isLayoutAnchor(false) {}
virtual void updateChildrenSizes() {}
- virtual void refreshSizeHints(qreal effectiveSpacing);
+ virtual bool refreshSizeHints(qreal effectiveSpacing);
virtual ~AnchorData() {}
@@ -226,9 +226,9 @@ struct SequentialAnchorData : public AnchorData
}
virtual void updateChildrenSizes();
- virtual void refreshSizeHints(qreal effectiveSpacing);
+ virtual bool refreshSizeHints(qreal effectiveSpacing);
- void refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
+ bool refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
void setVertices(const QVector<AnchorVertex*> &vertices)
{
@@ -261,9 +261,9 @@ struct ParallelAnchorData : public AnchorData
}
virtual void updateChildrenSizes();
- virtual void refreshSizeHints(qreal effectiveSpacing);
+ virtual bool refreshSizeHints(qreal effectiveSpacing);
- void refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
+ bool refreshSizeHints_helper(qreal effectiveSpacing, bool refreshChildren = true);
AnchorData* firstEdge;
AnchorData* secondEdge;