40 #ifndef QABSTRACTITEMMODEL_P_H
41 #define QABSTRACTITEMMODEL_P_H
55 #include "QtCore/qabstractitemmodel.h"
56 #include "QtCore/private/qobject_p.h"
57 #include "QtCore/qstack.h"
58 #include "QtCore/qset.h"
59 #include "QtCore/qhash.h"
103 virtual void executePendingOperations()
const;
110 return q_func()->createIndex(
row,
column,
id);
114 return (
index.row() >= 0) && (
index.column() >= 0) && (
index.model() == q_func());
117 void invalidatePersistentIndexes();
180 template <
typename T>
183 static_assert(std::is_enum_v<T>);
184 if (
data.userType() == qMetaTypeId<T>())
185 return data.value<
T>();
186 else if (
data.userType() == qMetaTypeId<int>())
187 return T(
data.toInt());
192 template <
typename T>
195 if (
data.userType() == qMetaTypeId<T>())
196 return data.value<
T>();
197 else if (
data.userType() == qMetaTypeId<int>())
198 return T::fromInt(
data.toInt());
The QAbstractItemModel class provides the abstract interface for item model classes.
QModelIndex createIndex(int row, int column, int id) const
QModelIndex createIndex(int row, int column, void *data=nullptr) const
bool indexValid(const QModelIndex &index) const
The QAtomicInt class provides platform-independent atomic operations on int.
The QModelIndex class is used to locate data in a data model.
static void destroy(QPersistentModelIndexData *data)
static QPersistentModelIndexData * create(const QModelIndex &index)
QPersistentModelIndexData()
QPersistentModelIndexData(const QModelIndex &idx)
The QStack class is a template class that provides a stack.
The QVariant class acts like a union for the most common Qt data types.
T legacyEnumValueFromModelData(const QVariant &data)
T legacyFlagValueFromModelData(const QVariant &data)
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(itemmodel)
Q_DECLARE_TYPEINFO(QAbstractItemModelPrivate::Change, Q_RELOCATABLE_TYPE)
GLint GLfloat GLfloat GLfloat v2
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
constexpr Change(const QModelIndex &p, int f, int l)
constexpr bool isValid() const
QMultiHash< QModelIndex, QPersistentModelIndexData * > indexes
QStack< QList< QPersistentModelIndexData * > > moved
QStack< QList< QPersistentModelIndexData * > > invalidated
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent