40 #ifndef QGRAPHICSSCENELINEARINDEX_H
41 #define QGRAPHICSSCENELINEARINDEX_H
54 #include <QtWidgets/private/qtwidgetsglobal_p.h>
56 #include <QtCore/qrect.h>
57 #include <QtCore/qlist.h>
58 #include <QtWidgets/qgraphicsitem.h>
59 #include <private/qgraphicssceneindex_p.h>
87 m_numSortedElements = 0;
96 if (m_numSortedElements < m_items.size())
98 std::sort(m_items.begin() + m_numSortedElements, m_items.end() );
99 std::inplace_merge(m_items.begin(), m_items.begin() + m_numSortedElements, m_items.end());
100 m_numSortedElements = m_items.size();
104 if (element != m_items.
end() && *element ==
item)
106 m_items.erase(element);
107 --m_numSortedElements;
113 int m_numSortedElements;
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
The QGraphicsSceneIndex class provides a base class to implement a custom indexing algorithm for disc...
The QGraphicsSceneLinearIndex class provides an implementation of a linear indexing algorithm for dis...
virtual void removeItem(QGraphicsItem *item) override
QList< QGraphicsItem * > items(Qt::SortOrder order=Qt::DescendingOrder) const override
virtual void addItem(QGraphicsItem *item) override
virtual void clear() override
QGraphicsSceneLinearIndex(QGraphicsScene *scene=nullptr)
virtual QList< QGraphicsItem * > estimateItems(const QRectF &rect, Qt::SortOrder order) const override
The QRectF class defines a finite rectangle in the plane using floating point precision.
#define Q_AUTOTEST_EXPORT
QT_REQUIRE_CONFIG(graphicsview)
GLfixed GLfixed GLint GLint order