summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicssceneindex.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-29 15:18:38 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-05-29 15:18:38 (GMT)
commit53187fabdbfb8a513e735fdd034e1a9fbbccc9cd (patch)
tree4d262607a95c75f73b6d06574c2af6ec9f69568b /src/gui/graphicsview/qgraphicssceneindex.cpp
parent32155ed07a6f8b8c831db6ba219395b4825fa9fd (diff)
downloadQt-53187fabdbfb8a513e735fdd034e1a9fbbccc9cd.zip
Qt-53187fabdbfb8a513e735fdd034e1a9fbbccc9cd.tar.gz
Qt-53187fabdbfb8a513e735fdd034e1a9fbbccc9cd.tar.bz2
Add an API to know the indexed rect of the index.
Usefull for the POV of the scene and let the BSP update its internal structure before the next event loop reentrancy.
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp
index 36da295..fe3a68a 100644
--- a/src/gui/graphicsview/qgraphicssceneindex.cpp
+++ b/src/gui/graphicsview/qgraphicssceneindex.cpp
@@ -297,6 +297,16 @@ QGraphicsScene* QGraphicsSceneIndex::scene() const
Q_D(const QGraphicsSceneIndex);
return d->scene;
}
+
+/*!
+ Returns the indexed area for the index
+*/
+QRectF QGraphicsSceneIndex::indexedRect()
+{
+ Q_D(const QGraphicsSceneIndex);
+ return d->scene->d_func()->sceneRect;
+}
+
/*!
\fn QList<QGraphicsItem *> items() const = 0