diff options
author | Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> | 2009-08-13 18:36:29 (GMT) |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> | 2009-08-13 18:36:29 (GMT) |
commit | f95dfb70e5c963b5c2502b94c2c391994b0e17ee (patch) | |
tree | e4634128ae3b509b6fc869eee0f8505bfb270143 /src/gui | |
parent | c938d16249e24c297f2b36b4711a3e592de5e7d6 (diff) | |
download | Qt-f95dfb70e5c963b5c2502b94c2c391994b0e17ee.zip Qt-f95dfb70e5c963b5c2502b94c2c391994b0e17ee.tar.gz Qt-f95dfb70e5c963b5c2502b94c2c391994b0e17ee.tar.bz2 |
QGraphicsAnchorLayout: remove unused function
The function setAnchorSizeHintsFromDefaults() is not necessary, since
a more updated version (ready or almost-ready for simplification) was
added: setAnchorSizeHintsFromItems().
Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 30 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.h | 1 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index e75bf19..83ba3b5 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1121,9 +1121,6 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( // Reset the nominal sizes of each anchor based on the current item sizes setAnchorSizeHintsFromItems(orientation); - // Reset the nominal sizes of each anchor based on the current item sizes - //setAnchorSizeHintsFromDefaults(orientation); - // Simplify the graph // ### Ideally we would like to do that if, and only if, anchors had // been added or removed since the last time this method was called. @@ -1255,33 +1252,6 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( graphPaths[orientation].clear(); // ### } -void QGraphicsAnchorLayoutPrivate::setAnchorSizeHintsFromDefaults(Orientation orientation) -{ - Graph<AnchorVertex, AnchorData> &g = graph[orientation]; - QSet<AnchorVertex *> setOfVertices = g.vertices(); - - for (QSet<AnchorVertex *>::const_iterator it = setOfVertices.begin(); it != setOfVertices.end(); ++it) { - AnchorVertex *v = *it; - QList<AnchorVertex *> adjacents = g.adjacentVertices(v); - for (int i = 0; i < adjacents.count(); ++i) { - AnchorVertex *v1 = adjacents.at(i); - AnchorData *data = g.edgeData(v, v1); - if (!data->hasSize) { - bool forward = data->origin == v; - if (forward) { - qreal s = effectiveSpacing(orientation); - data->minSize = s; - data->prefSize = s; - data->maxSize = s; - data->sizeAtMinimum = s; - data->sizeAtPreferred = s; - data->sizeAtMaximum = s; - } - } - } - } -} - /*! \internal diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 3b5f64b..fa79f6b 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -347,7 +347,6 @@ public: void calculateGraphs(); void calculateGraphs(Orientation orientation); void setAnchorSizeHintsFromItems(Orientation orientation); - void setAnchorSizeHintsFromDefaults(Orientation orientation); void findPaths(Orientation orientation); void constraintsFromPaths(Orientation orientation); QList<QSimplexConstraint *> constraintsFromSizeHints(const QList<AnchorData *> &anchors); |