summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsanchorlayout_p.h
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-29 12:09:50 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-29 12:09:50 (GMT)
commitaa8c3b5f31ddd778ab8e9285a69bbe535fb23017 (patch)
treeea5b86cd889c803620eb5db0069dae5fa7f01111 /src/gui/graphicsview/qgraphicsanchorlayout_p.h
parent25502811723a026a38c0a861a6a304d24b8e6a95 (diff)
parente77732c9b0c8b8313138306d723f5227cfbc124d (diff)
downloadQt-aa8c3b5f31ddd778ab8e9285a69bbe535fb23017.zip
Qt-aa8c3b5f31ddd778ab8e9285a69bbe535fb23017.tar.gz
Qt-aa8c3b5f31ddd778ab8e9285a69bbe535fb23017.tar.bz2
Merge branch 'fixes' of git://gitorious.org/~cmarcelo/qt/cmarcelos-clone into cmarcelo-fixes
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 99a866b..9628d64 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -223,11 +223,13 @@ inline QString AnchorData::toString() const
struct SequentialAnchorData : public AnchorData
{
- SequentialAnchorData() : AnchorData()
+ SequentialAnchorData(const QVector<AnchorVertex *> &vertices, const QVector<AnchorData *> &edges)
+ : AnchorData(), m_children(vertices), m_edges(edges)
{
type = AnchorData::Sequential;
+ orientation = m_edges.at(0)->orientation;
#ifdef QT_DEBUG
- name = QLatin1String("SequentialAnchorData");
+ name = QString::fromAscii("%1 -- %2").arg(vertices.first()->toString(), vertices.last()->toString());
#endif
}
@@ -236,14 +238,6 @@ struct SequentialAnchorData : public AnchorData
bool refreshSizeHints_helper(const QLayoutStyleInfo *styleInfo, bool refreshChildren = true);
- void setVertices(const QVector<AnchorVertex*> &vertices)
- {
- m_children = vertices;
-#ifdef QT_DEBUG
- name = QString::fromAscii("%1 -- %2").arg(vertices.first()->toString(), vertices.last()->toString());
-#endif
- }
-
QVector<AnchorVertex*> m_children; // list of vertices in the sequence
QVector<AnchorData*> m_edges; // keep the list of edges too.
};
@@ -254,6 +248,7 @@ struct ParallelAnchorData : public AnchorData
: AnchorData(), firstEdge(first), secondEdge(second)
{
type = AnchorData::Parallel;
+ orientation = first->orientation;
// ### Those asserts force that both child anchors have the same direction,
// but can't we simplify a pair of anchors in opposite directions?