diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-02 08:46:37 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-02 08:46:37 (GMT) |
commit | 6d71de4283c05b1b42ef26fe4c23334ad34c8a54 (patch) | |
tree | bd16b1350b54836be6d11e8c11c56d6fa21cd1e7 /src/gui/graphicsview/qgraphicsscene_bsp.cpp | |
parent | 5fc3fe2e3f04475ac8c0e3287af6042bd8b67c57 (diff) | |
download | Qt-6d71de4283c05b1b42ef26fe4c23334ad34c8a54.zip Qt-6d71de4283c05b1b42ef26fe4c23334ad34c8a54.tar.gz Qt-6d71de4283c05b1b42ef26fe4c23334ad34c8a54.tar.bz2 |
Kill dead BSP tree code in graphics view.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_bsp.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene_bsp.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_bsp.cpp b/src/gui/graphicsview/qgraphicsscene_bsp.cpp index 5858eab..7d30749 100644 --- a/src/gui/graphicsview/qgraphicsscene_bsp.cpp +++ b/src/gui/graphicsview/qgraphicsscene_bsp.cpp @@ -154,17 +154,6 @@ QList<QGraphicsItem *> QGraphicsSceneBspTree::items(const QRectF &rect) const return tmp; } -QList<QGraphicsItem *> QGraphicsSceneBspTree::items(const QPointF &pos) const -{ - QList<QGraphicsItem *> tmp; - findVisitor->foundItems = &tmp; - climbTree(findVisitor, pos); - // Reset discovery bits. - for (int i = 0; i < tmp.size(); ++i) - tmp.at(i)->d_ptr->itemDiscovered = 0; - return tmp; -} - int QGraphicsSceneBspTree::leafCount() const { return leafCnt; @@ -241,36 +230,6 @@ void QGraphicsSceneBspTree::initialize(const QRectF &rect, int depth, int index) } } -void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QPointF &pos, int index) const -{ - if (nodes.isEmpty()) - return; - - const Node &node = nodes.at(index); - const int childIndex = firstChildIndex(index); - - switch (node.type) { - case Node::Leaf: { - visitor->visit(const_cast<QList<QGraphicsItem*>*>(&leaves[node.leafIndex])); - break; - } - case Node::Vertical: - if (pos.x() < node.offset) { - climbTree(visitor, pos, childIndex); - } else { - climbTree(visitor, pos, childIndex + 1); - } - break; - case Node::Horizontal: - if (pos.y() < node.offset) { - climbTree(visitor, pos, childIndex); - } else { - climbTree(visitor, pos, childIndex + 1); - } - break; - } -} - void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index) const { if (nodes.isEmpty()) |