summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-29 12:45:35 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-05-29 12:45:35 (GMT)
commit9281f4c219cec2e6a1e24b43e1edd0feb0fcfce5 (patch)
tree593e1914bf75be9e7f015c54970def18ebbd6429 /src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
parent23a92388505c54155855d2f49d3a9cf81de0e5ea (diff)
downloadQt-9281f4c219cec2e6a1e24b43e1edd0feb0fcfce5.zip
Qt-9281f4c219cec2e6a1e24b43e1edd0feb0fcfce5.tar.gz
Qt-9281f4c219cec2e6a1e24b43e1edd0feb0fcfce5.tar.bz2
First bunch of changes after an very first API review
This basically move some logic from the scene to the index base class. Lot of work need to be done in order to benefits from the device transform. The sorting needs to be move in the BSP tree.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
index 74af910..63cd0e1 100644
--- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -62,27 +62,23 @@ class Q_AUTOTEST_EXPORT QGraphicsSceneBspTreeIndex : public QGraphicsSceneIndex
public:
QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0);
- void setRect(const QRectF &rect);
- virtual QRectF rect() const;
-
void clear();
- void insertItem(QGraphicsItem *item);
- void removeItem(QGraphicsItem *item, bool itemIsAboutToDie);
- void updateItem(QGraphicsItem *item);
-
- QList<QGraphicsItem *> items(const QPointF &point);
- QList<QGraphicsItem *> items(const QRectF &rect);
+ void addItem(QGraphicsItem *item);
+ void removeItem(QGraphicsItem *item);
+ void deleteItem(QGraphicsItem *item);
+ void prepareBoundingRectChange(const QGraphicsItem *item);
- QList<QGraphicsItem *> indexedItems();
+ QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order, const QTransform &deviceTransform) const;
- void updateIndex();
+ QList<QGraphicsItem *> items() const;
int bspDepth();
void setBspDepth(int depth);
protected:
bool event(QEvent *event);
+ void sceneRectChanged(const QRectF &rect);
public slots :
void _q_updateIndex();