summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-02 16:01:33 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-02 17:02:28 (GMT)
commit1d651e82459c0480cb3e803a9d9452092ac9d502 (patch)
treed6739ae76e73287dfb60fa1c5eced3444cdff5cc /src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
parentc4ae87721e011fe44f301c4039f0651a05394162 (diff)
downloadQt-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/qgraphicsscenebsptreeindex_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
index 437b17d..3ac922b 100644
--- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -82,8 +82,8 @@ public:
QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0);
~QGraphicsSceneBspTreeIndex();
- QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order, const QTransform &deviceTransform) const;
-
+ QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const;
+ QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const;
QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::AscendingOrder) const;
int bspTreeDepth();
@@ -145,6 +145,7 @@ public:
void invalidateSortCache();
void addItem(QGraphicsItem *item, bool recursive = false);
void removeItem(QGraphicsItem *item, bool recursive = false, bool moveToUnindexedItems = false);
+ QList<QGraphicsItem *> estimateItems(const QRectF &, Qt::SortOrder, bool b = false);
static void climbTree(QGraphicsItem *item, int *stackingOrder);
static bool closestItemFirst_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2);
@@ -159,7 +160,8 @@ public:
return item1->d_ptr->globalStackingOrder >= item2->d_ptr->globalStackingOrder;
}
- static void sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order, bool cached);
+ static void sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order,
+ bool cached, bool onlyTopLevelItems = false);
};