4#ifndef QGRAPHICSSCENELINEARINDEX_H
5#define QGRAPHICSSCENELINEARINDEX_H
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include <QtCore/qrect.h>
21#include <QtCore/qlist.h>
22#include <QtWidgets/qgraphicsitem.h>
23#include <private/qgraphicssceneindex_p.h>
51 m_numSortedElements = 0;
60 if (m_numSortedElements < m_items.size())
62 std::sort(m_items.begin() + m_numSortedElements, m_items.end() );
63 std::inplace_merge(m_items.begin(), m_items.begin() + m_numSortedElements, m_items.end());
64 m_numSortedElements = m_items.size();
68 if (element != m_items.end() && *element ==
item)
70 m_items.erase(element);
71 --m_numSortedElements;
77 int m_numSortedElements;
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
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
Add the item from the index.
QList< QGraphicsItem * > items(Qt::SortOrder order=Qt::DescendingOrder) const override
Return all items in the index and sort them using order.
virtual void addItem(QGraphicsItem *item) override
Add the item into the index.
virtual void clear() override
QGraphicsSceneLinearIndex(QGraphicsScene *scene=nullptr)
Construct a linear index for the given scene.
virtual QList< QGraphicsItem * > estimateItems(const QRectF &rect, Qt::SortOrder order) const override
Returns an estimation visible items that are either inside or intersect with the specified rect and r...
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
\inmodule QtCore\reentrant
Combined button and popup list for selecting options.
GLfixed GLfixed GLint GLint order
#define Q_AUTOTEST_EXPORT
#define QT_REQUIRE_CONFIG(feature)