diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-06-15 18:50:26 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-06-15 18:50:26 (GMT) |
commit | da70cf2876cee57299dbeebb86c4c3881e3df721 (patch) | |
tree | 2324072c7ab22893794c86d4aa0cfec6f9714f9d /src/gui/graphicsview/qgraphicssceneindex_p.h | |
parent | 3d9d7d10c2c6a4aed4650572bc9f3c8bd5b899b5 (diff) | |
download | Qt-da70cf2876cee57299dbeebb86c4c3881e3df721.zip Qt-da70cf2876cee57299dbeebb86c4c3881e3df721.tar.gz Qt-da70cf2876cee57299dbeebb86c4c3881e3df721.tar.bz2 |
Kill items_helper and child_items_helper for ever. We have now
on function recusrsive_item_helper that doing the job. To resolve
different use cases we use concept of interceptors for QRectF, QPointF
QPolygonF and QPainterPath.
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicssceneindex_p.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h index 3a2cb27..d0d181b 100644 --- a/src/gui/graphicsview/qgraphicssceneindex_p.h +++ b/src/gui/graphicsview/qgraphicssceneindex_p.h @@ -63,30 +63,38 @@ QT_BEGIN_NAMESPACE class QGraphicsScene; +class QGraphicsSceneIndexIntersector; +class QGraphicsSceneIndexRectIntersector; +class QGraphicsSceneIndexPointIntersector; +class QGraphicsSceneIndexPathIntersector; class QGraphicsSceneIndexPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QGraphicsSceneIndex) public: QGraphicsSceneIndexPrivate(QGraphicsScene *scene); + ~QGraphicsSceneIndexPrivate(); - void recursive_items_helper(QGraphicsItem *item, QRectF rect, QList<QGraphicsItem *> *items, + void recursive_items_helper(QGraphicsItem *item, QGraphicsSceneIndexIntersector *intersector, QList<QGraphicsItem *> *items, const QTransform &parentTransform, const QTransform &viewTransform, Qt::ItemSelectionMode mode, Qt::SortOrder order, qreal parentOpacity = 1.0) const; - - void childItems_helper(QList<QGraphicsItem *> *items, - const QGraphicsItem *parent, - const QPointF &pos) const; - void childItems_helper(QList<QGraphicsItem *> *items, - const QGraphicsItem *parent, - const QPolygonF &polygon, - Qt::ItemSelectionMode mode) const; - void childItems_helper(QList<QGraphicsItem *> *items, - const QGraphicsItem *parent, - const QPainterPath &path, - Qt::ItemSelectionMode mode) const; - QGraphicsScene *scene; + QGraphicsSceneIndexPointIntersector *pointIntersector; + QGraphicsSceneIndexRectIntersector *rectIntersector; + QGraphicsSceneIndexPathIntersector *pathIntersector; +}; + +class QGraphicsSceneIndexIntersector +{ +public: + QGraphicsSceneIndexIntersector(QGraphicsScene *scene) : scene(scene) { } + virtual ~QGraphicsSceneIndexIntersector() { } + virtual bool intersect(const QRectF &rect) const = 0; + Qt::ItemSelectionMode mode; + QGraphicsItem *item; + QGraphicsScene *scene; + QRectF rect; + QTransform transform; }; QT_END_NAMESPACE |