Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qabstractitemmodel_p.h>
Classes | |
struct | Change |
struct | Persistent |
Static Public Member Functions | |
static QAbstractItemModel * | staticEmptyModel () |
static bool | variantLessThan (const QVariant &v1, const QVariant &v2) |
static const QHash< int, QByteArray > & | defaultRoleNames () |
static bool | isVariantLessThan (const QVariant &left, const QVariant &right, Qt::CaseSensitivity cs=Qt::CaseSensitive, bool isLocaleAware=false) |
Static Public Member Functions inherited from QObjectPrivate | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Public Attributes | ||
QStack< Change > | changes | |
struct QAbstractItemModelPrivate::Persistent | persistent | |
Public Attributes inherited from QObjectPrivate | ||
ExtraData * | extraData | |
QAtomicPointer< QThreadData > | threadData | |
QAtomicPointer< ConnectionData > | connections | |
union { | ||
QObject * currentChildBeingDeleted | ||
QAbstractDeclarativeData * declarativeData | ||
}; | ||
QAtomicPointer< QtSharedPointer::ExternalRefCountData > | sharedRefcount | |
Public Attributes inherited from QObjectData | ||
QObject * | q_ptr | |
QObject * | parent | |
QObjectList | children | |
uint | isWidget: 1 | |
uint | blockSig: 1 | |
uint | wasDeleted: 1 | |
uint | isDeletingChildren: 1 | |
uint | sendChildEvents: 1 | |
uint | receiveChildEvents: 1 | |
uint | isWindow: 1 | |
uint | deleteLaterCalled: 1 | |
uint | isQuickItem: 1 | |
uint | willBeWidget: 1 | |
uint | wasWidget: 1 | |
uint | receiveParentEvents: 1 | |
uint | unused: 20 | |
QAtomicInt | postedEvents | |
QDynamicMetaObjectData * | metaObject | |
QBindingStorage | bindingStorage | |
Additional Inherited Members | |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Definition at line 40 of file qabstractitemmodel_p.h.
QAbstractItemModelPrivate::QAbstractItemModelPrivate | ( | ) |
Definition at line 703 of file qabstractitemmodel.cpp.
QAbstractItemModelPrivate::~QAbstractItemModelPrivate | ( | ) |
Definition at line 708 of file qabstractitemmodel.cpp.
bool QAbstractItemModelPrivate::allowMove | ( | const QModelIndex & | srcParent, |
int | start, | ||
int | end, | ||
const QModelIndex & | destinationParent, | ||
int | destinationStart, | ||
Qt::Orientation | orientation ) |
Returns whether a move operation is valid.
A move operation is not allowed if it moves a continuous range of rows to a destination within itself, or if it attempts to move a row to one of its own descendants.
Definition at line 2975 of file qabstractitemmodel.cpp.
References forever, pos, QModelIndex::row(), and Qt::Vertical.
void QAbstractItemModelPrivate::columnsAboutToBeInserted | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 1046 of file qabstractitemmodel.cpp.
References QObjectData::parent, persistent, and Q_UNUSED.
void QAbstractItemModelPrivate::columnsAboutToBeRemoved | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 1079 of file qabstractitemmodel.cpp.
References QModelIndex::column(), QModelIndex::isValid(), QModelIndex::parent(), QObjectData::parent, and persistent.
void QAbstractItemModelPrivate::columnsInserted | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 1062 of file qabstractitemmodel.cpp.
References QModelIndex::column(), QObjectData::parent, persistent, qWarning, and QModelIndex::row().
void QAbstractItemModelPrivate::columnsRemoved | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 1108 of file qabstractitemmodel.cpp.
References QModelIndex::column(), QObjectData::parent, persistent, qWarning, and QModelIndex::row().
|
inline |
Definition at line 73 of file qabstractitemmodel_p.h.
|
inline |
Definition at line 69 of file qabstractitemmodel_p.h.
|
static |
Definition at line 749 of file qabstractitemmodel.cpp.
Referenced by QStandardItemModelPrivate::init(), and QAbstractItemModel::roleNames().
|
virtual |
see QTBUG-94546
Reimplemented in QTreeModelPrivate.
Definition at line 3005 of file qabstractitemmodel.cpp.
Referenced by QItemSelectionModel::hasSelection().
|
inline |
Definition at line 77 of file qabstractitemmodel_p.h.
void QAbstractItemModelPrivate::invalidatePersistentIndex | ( | const QModelIndex & | index | ) |
Clean the QPersistentModelIndex relative to the index if there is one. To be used before an index is invalided
Definition at line 729 of file qabstractitemmodel.cpp.
References it, and persistent.
void QAbstractItemModelPrivate::invalidatePersistentIndexes | ( | ) |
Definition at line 717 of file qabstractitemmodel.cpp.
References persistent.
Referenced by QSortFilterProxyModelPrivate::_q_sourceReset().
|
static |
Definition at line 754 of file qabstractitemmodel.cpp.
References QMetaType::UnknownType.
Referenced by QSortFilterProxyModel::lessThan(), and QStandardItem::operator<().
void QAbstractItemModelPrivate::itemsAboutToBeMoved | ( | const QModelIndex & | srcParent, |
int | srcFirst, | ||
int | srcLast, | ||
const QModelIndex & | destinationParent, | ||
int | destinationChild, | ||
Qt::Orientation | orientation ) |
Definition at line 894 of file qabstractitemmodel.cpp.
References QObjectData::parent, QObject::parent(), persistent, and Qt::Vertical.
void QAbstractItemModelPrivate::itemsMoved | ( | const QModelIndex & | srcParent, |
int | srcFirst, | ||
int | srcLast, | ||
const QModelIndex & | destinationParent, | ||
int | destinationChild, | ||
Qt::Orientation | orientation ) |
Definition at line 976 of file qabstractitemmodel.cpp.
References movePersistentIndexes(), and persistent.
void QAbstractItemModelPrivate::movePersistentIndexes | ( | const QList< QPersistentModelIndexData * > & | indexes, |
int | change, | ||
const QModelIndex & | parent, | ||
Qt::Orientation | orientation ) |
Moves persistent indexes indexes by amount change. The change will be either a change in row value or a change in column value depending on the value of orientation. The indexes may also be moved to a different parent if parent differs from the existing parent for the index.
Definition at line 954 of file qabstractitemmodel.cpp.
References QObjectData::parent, persistent, qWarning, and Qt::Vertical.
Referenced by itemsMoved().
void QAbstractItemModelPrivate::removePersistentIndexData | ( | QPersistentModelIndexData * | data | ) |
Definition at line 835 of file qabstractitemmodel.cpp.
References i, persistent, Q_ASSERT_X, and Q_UNUSED.
void QAbstractItemModelPrivate::rowsAboutToBeInserted | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 860 of file qabstractitemmodel.cpp.
References QObjectData::parent, persistent, and Q_UNUSED.
void QAbstractItemModelPrivate::rowsAboutToBeRemoved | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 994 of file qabstractitemmodel.cpp.
References QModelIndex::isValid(), QModelIndex::parent(), QObjectData::parent, persistent, and QModelIndex::row().
void QAbstractItemModelPrivate::rowsInserted | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 877 of file qabstractitemmodel.cpp.
References QModelIndex::column(), QObjectData::parent, persistent, qWarning, and QModelIndex::row().
void QAbstractItemModelPrivate::rowsRemoved | ( | const QModelIndex & | parent, |
int | first, | ||
int | last ) |
Definition at line 1022 of file qabstractitemmodel.cpp.
References QModelIndex::column(), QObjectData::parent, persistent, qWarning, and QModelIndex::row().
|
static |
Definition at line 712 of file qabstractitemmodel.cpp.
Referenced by QAbstractProxyModel::QAbstractProxyModel(), QAbstractProxyModel::QAbstractProxyModel(), QAbstractItemView::model(), QDataWidgetMapper::model(), QComboBox::model(), QAbstractItemViewPrivate::modelDestroyed(), QDataWidgetMapperPrivate::modelDestroyed(), QComboBoxPrivate::modelDestroyed(), QAbstractItemView::setModel(), QHeaderView::setModel(), QTableView::setModel(), QTreeView::setModel(), QAbstractProxyModel::setSourceModel(), and QAbstractProxyModel::sourceModel().
Return {true} if value contains a numerical type.
This function is used by our Q{Tree,Widget,Table}WidgetModel classes to sort.
Definition at line 822 of file qabstractitemmodel.cpp.
References qMax(), and typeOfVariant().
Referenced by QListWidgetItem::operator<(), QTableWidgetItem::operator<(), and QTreeWidgetItem::operator<().
Definition at line 108 of file qabstractitemmodel_p.h.
struct QAbstractItemModelPrivate::Persistent QAbstractItemModelPrivate::persistent |
Referenced by QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(), columnsAboutToBeInserted(), columnsAboutToBeRemoved(), columnsInserted(), columnsRemoved(), invalidatePersistentIndex(), invalidatePersistentIndexes(), itemsAboutToBeMoved(), itemsMoved(), movePersistentIndexes(), removePersistentIndexData(), rowsAboutToBeInserted(), rowsAboutToBeRemoved(), rowsInserted(), rowsRemoved(), QTreeModel::sortItems(), and QSortFilterProxyModelPrivate::store_persistent_indexes().