Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgraphicsscenelinearindex.cpp
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5/*!
6 \class QGraphicsSceneLinearIndex
7 \brief The QGraphicsSceneLinearIndex class provides an implementation of
8 a linear indexing algorithm for discovering items in QGraphicsScene.
9 \since 4.6
10 \ingroup graphicsview-api
11 \internal
12
13 QGraphicsSceneLinearIndex index is default linear implementation to discover items.
14 It basically store all items in a list and return them to the scene.
15
16 \sa QGraphicsScene, QGraphicsView, QGraphicsSceneIndex, QGraphicsSceneBspTreeIndex
17*/
18
19#include <private/qgraphicsscenelinearindex_p.h>
20
21/*!
22 \fn QGraphicsSceneLinearIndex::QGraphicsSceneLinearIndex(QGraphicsScene *scene = nullptr):
23
24 Construct a linear index for the given \a scene.
25*/
26
27/*!
28 \fn QList<QGraphicsItem *> QGraphicsSceneLinearIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const;
29
30 Return all items in the index and sort them using \a order.
31*/
32
33
34/*!
35 \fn virtual QList<QGraphicsItem *> QGraphicsSceneLinearIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const
36
37 Returns an estimation visible items that are either inside or
38 intersect with the specified \a rect and return a list sorted using \a order.
39*/
40
41/*!
42 \fn void QGraphicsSceneLinearIndex::clear()
43 \internal
44 Clear the all the BSP index.
45*/
46
47/*!
48 \fn virtual void QGraphicsSceneLinearIndex::addItem(QGraphicsItem *item)
49
50 Add the \a item into the index.
51*/
52
53/*!
54 \fn virtual void QGraphicsSceneLinearIndex::removeItem(QGraphicsItem *item)
55
56 Add the \a item from the index.
57*/
58
59#include "moc_qgraphicsscenelinearindex_p.cpp"