1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4/*!
5 \class QGraphicsSceneLinearIndex
6 \brief The QGraphicsSceneLinearIndex class provides an implementation of
7 a linear indexing algorithm for discovering items in QGraphicsScene.
8 \since 4.6
9 \ingroup graphicsview-api
10 \internal
11
12 QGraphicsSceneLinearIndex index is default linear implementation to discover items.
13 It basically store all items in a list and return them to the scene.
14
15 \sa QGraphicsScene, QGraphicsView, QGraphicsSceneIndex, QGraphicsSceneBspTreeIndex
16*/
17
18#include <private/qgraphicsscenelinearindex_p.h>
19
20/*!
21 \fn QGraphicsSceneLinearIndex::QGraphicsSceneLinearIndex(QGraphicsScene *scene = nullptr):
22
23 Construct a linear index for the given \a scene.
24*/
25
26/*!
27 \fn QList<QGraphicsItem *> QGraphicsSceneLinearIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const;
28
29 Return all items in the index and sort them using \a order.
30*/
31
32
33/*!
34 \fn virtual QList<QGraphicsItem *> QGraphicsSceneLinearIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const
35
36 Returns an estimation visible items that are either inside or
37 intersect with the specified \a rect and return a list sorted using \a order.
38*/
39
40/*!
41 \fn void QGraphicsSceneLinearIndex::clear()
42 \internal
43 Clear the all the BSP index.
44*/
45
46/*!
47 \fn virtual void QGraphicsSceneLinearIndex::addItem(QGraphicsItem *item)
48
49 Add the \a item into the index.
50*/
51
52/*!
53 \fn virtual void QGraphicsSceneLinearIndex::removeItem(QGraphicsItem *item)
54
55 Add the \a item from the index.
56*/
57
58#include "moc_qgraphicsscenelinearindex_p.cpp"
59

source code of qtbase/src/widgets/graphicsview/qgraphicsscenelinearindex.cpp