diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-02 16:01:33 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-02 17:02:28 (GMT) |
commit | 1d651e82459c0480cb3e803a9d9452092ac9d502 (patch) | |
tree | d6739ae76e73287dfb60fa1c5eced3444cdff5cc /src/gui/graphicsview/qgraphicsscene_bsp_p.h | |
parent | c4ae87721e011fe44f301c4039f0651a05394162 (diff) | |
download | Qt-1d651e82459c0480cb3e803a9d9452092ac9d502.zip Qt-1d651e82459c0480cb3e803a9d9452092ac9d502.tar.gz Qt-1d651e82459c0480cb3e803a9d9452092ac9d502.tar.bz2 |
More re-factoring of QGraphicsSceneIndex.
New method: QGraphicsSceneIndex::estimateTopLevelItems.
QGraphicsSceneIndex::estimateItems returns *all* items within the rect,
but we are only interested in the top-levels (those that are within the
rect themselves or have descendants within the rect) when doing
recursive drawing/item-lookup.
All auto-tests pass. Demos/examples/manualtests run fine.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_bsp_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene_bsp_p.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_bsp_p.h b/src/gui/graphicsview/qgraphicsscene_bsp_p.h index 24b926c..4cac64a 100644 --- a/src/gui/graphicsview/qgraphicsscene_bsp_p.h +++ b/src/gui/graphicsview/qgraphicsscene_bsp_p.h @@ -92,7 +92,7 @@ public: void removeItem(QGraphicsItem *item, const QRectF &rect); void removeItems(const QSet<QGraphicsItem *> &items); - QList<QGraphicsItem *> items(const QRectF &rect) const; + QList<QGraphicsItem *> items(const QRectF &rect, bool onlyTopLevelItems = false) const; int leafCount() const; inline int firstChildIndex(int index) const @@ -106,8 +106,6 @@ public: private: void initialize(const QRectF &rect, int depth, int index); void climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index = 0) const; - - void findItems(QList<QGraphicsItem *> *foundItems, const QRectF &rect, int index); QRectF rectForIndex(int index) const; QVector<Node> nodes; |