![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qqmldelegatemodel_p_p.h>
Classes | |
| union | [union].__unnamed0__ |
Public Types | |
| enum class | InsertionResult { Success , Error , Retry } |
| Public Types inherited from QObjectPrivate | |
| typedef void(*) | StaticMetaCallFunction(QObject *, QMetaObject::Call, int, void **) |
| using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Static Public Member Functions | |
| static QQmlDelegateModelPrivate * | get (QQmlDelegateModel *mm) |
| static void | group_append (QQmlListProperty< QQmlDelegateModelGroup > *property, QQmlDelegateModelGroup *groupgroup) |
| static qsizetype | group_count (QQmlListProperty< QQmlDelegateModelGroup > *property) |
| static QQmlDelegateModelGroup * | group_at (QQmlListProperty< QQmlDelegateModelGroup > *property, qsizetype indexindex) |
| Static Public Member Functions inherited from QObjectPrivate | |
| static bool | removeConnection (Connection *cc) |
| static QObjectPrivate * | get (QObject *o) |
| static const QObjectPrivate * | get (const QObject *o) |
| static void | deleteInOwnThread (QObject *objectobject) |
| 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 typetype=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 typetype, const int *typestypes, const QMetaObject *senderMetaObject) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype) |
| 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) |
Definition at line 502 of file qqmldelegatemodel_p_p.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| Error | |
| Retry | |
Definition at line 560 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelPrivate::QQmlDelegateModelPrivate | ( | QQmlContext * | ctxt | ) |
\qmltype DelegateModel \nativetype QQmlDelegateModel \inqmlmodule QtQml.Models
Encapsulates a model and delegate.
The DelegateModel type encapsulates a model and the delegate that will be instantiated for items in the model.
It is usually not necessary to create a DelegateModel. However, it can be useful for manipulating and accessing the \l modelIndex when a QAbstractItemModel subclass is used as the model. Also, DelegateModel is used together with \l Package to provide delegates to multiple views, and with DelegateModelGroup to sort and filter delegate items.
DelegateModel only supports one-dimensional models – assigning a table model to DelegateModel and that to TableView will thus only show one column.
The example below illustrates using a DelegateModel with a ListView.
Definition at line 162 of file qqmldelegatemodel.cpp.
References m_complete, m_count, m_delegateChooser, m_delegateValidated, m_incubatorCleanupScheduled, m_parts, m_reset, m_transaction, and m_waitingToFetchMore.
| QQmlDelegateModelPrivate::~QQmlDelegateModelPrivate | ( | ) |
Definition at line 182 of file qqmldelegatemodel.cpp.
References drainReusableItemsPool().
| int QQmlDelegateModelPrivate::adaptorModelCount | ( | ) | const |
Definition at line 190 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::addCacheItem | ( | QQmlDelegateModelItem * | item, |
| Compositor::iterator | it ) |
Definition at line 1178 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::addGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1469 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::connectModel | ( | QQmlAdaptorModel * | model | ) |
| void QQmlDelegateModelPrivate::connectToAbstractItemModel | ( | ) |
Definition at line 338 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::delegateChanged | ( | bool | add = true, |
| bool | remove = true ) |
Definition at line 1934 of file qqmldelegatemodel.cpp.
References emitChanges(), QQmlDelegateModelGroupPrivate::get(), m_complete, m_groupCount, and m_transaction.
| void QQmlDelegateModelPrivate::destroyCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 642 of file qqmldelegatemodel.cpp.
References releaseIncubator().
Referenced by release().
| void QQmlDelegateModelPrivate::disconnectFromAbstractItemModel | ( | ) |
Definition at line 358 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::drainReusableItemsPool | ( | int | maxPoolTime | ) |
Definition at line 1147 of file qqmldelegatemodel.cpp.
Referenced by ~QQmlDelegateModelPrivate().
| void QQmlDelegateModelPrivate::emitChanges | ( | ) |
Definition at line 1960 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), m_groupCount, m_reset, and m_transaction.
Referenced by addGroups(), delegateChanged(), removeGroups(), and setGroups().
|
inline |
Definition at line 524 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitCreatedPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 920 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
Referenced by incubatorStatusChanged().
Definition at line 529 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitDestroyingPackage | ( | QQuickPackage * | package | ) |
Definition at line 932 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
Referenced by incubatorStatusChanged().
|
inline |
Definition at line 526 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitInitPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 926 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
Referenced by setInitialState().
|
overridevirtual |
Implements QQmlDelegateModelGroupEmitter.
Definition at line 1926 of file qqmldelegatemodel.cpp.
|
inlinestatic |
Definition at line 509 of file qqmldelegatemodel_p_p.h.
|
static |
Definition at line 700 of file qqmldelegatemodel.cpp.
References m_complete, and m_groupCount.
|
static |
Definition at line 721 of file qqmldelegatemodel.cpp.
References m_groupCount.
|
static |
Definition at line 714 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::incubatorStatusChanged | ( | QQDMIncubationTask * | incubationTask, |
| QQmlIncubator::Status | status ) |
Definition at line 1195 of file qqmldelegatemodel.cpp.
References emitCreatedPackage(), emitDestroyingPackage(), QQDMIncubationTask::incubating, releaseIncubator(), and removeCacheItem().
| void QQmlDelegateModelPrivate::init | ( | ) |
Definition at line 207 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get().
| QQmlDelegateModelPrivate::InsertionResult QQmlDelegateModelPrivate::insert | ( | Compositor::insert_iterator & | before, |
| const QV4::Value & | object, | ||
| int | groups ) |
Definition at line 2192 of file qqmldelegatemodel.cpp.
Definition at line 1517 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
Definition at line 1664 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
| void QQmlDelegateModelPrivate::itemsInserted | ( | const QList< Compositor::Insert > & | inserts, |
| QVarLengthArray< QList< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedInserts, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1605 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::itemsMoved | ( | const QList< Compositor::Remove > & | removes, |
| const QList< Compositor::Insert > & | inserts ) |
Definition at line 1866 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
Definition at line 1814 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), and m_groupCount.
| void QQmlDelegateModelPrivate::itemsRemoved | ( | const QList< Compositor::Remove > & | removes, |
| QVarLengthArray< QList< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedRemoves, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1714 of file qqmldelegatemodel.cpp.
References m_groupCount.
| QObject * QQmlDelegateModelPrivate::object | ( | Compositor::Group | group, |
| int | index, | ||
| QQmlIncubator::IncubationMode | incubationMode ) |
Definition at line 1255 of file qqmldelegatemodel.cpp.
References QQDMIncubationTask::incubating, m_groupCount, removeCacheItem(), requestMoreIfNecessary(), and reuseItem().
| QQmlDelegateModel::ReleaseFlags QQmlDelegateModelPrivate::release | ( | QObject * | object, |
| QQmlInstanceModel::ReusableFlag | reusable = QQmlInstanceModel::NotReusable ) |
Definition at line 620 of file qqmldelegatemodel.cpp.
References destroyCacheItem(), and removeCacheItem().
| void QQmlDelegateModelPrivate::releaseIncubator | ( | QQDMIncubationTask * | incubationTask | ) |
Definition at line 1101 of file qqmldelegatemodel.cpp.
References m_incubatorCleanupScheduled.
Referenced by destroyCacheItem(), and incubatorStatusChanged().
| void QQmlDelegateModelPrivate::removeCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 1185 of file qqmldelegatemodel.cpp.
Referenced by incubatorStatusChanged(), object(), and release().
| void QQmlDelegateModelPrivate::removeGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1478 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::requestMoreIfNecessary | ( | ) |
Definition at line 198 of file qqmldelegatemodel.cpp.
References m_waitingToFetchMore.
Referenced by object().
| QQmlComponent * QQmlDelegateModelPrivate::resolveDelegate | ( | int | index | ) |
Definition at line 1162 of file qqmldelegatemodel.cpp.
References m_delegateChooser.
| void QQmlDelegateModelPrivate::reuseItem | ( | QQmlDelegateModelItem * | item, |
| int | newModelIndex, | ||
| int | newGroups ) |
Definition at line 1113 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelAttached::emitChanges(), and QQmlDelegateModelAttached::resetCurrentIndex().
Referenced by object().
| void QQmlDelegateModelPrivate::setGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1487 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::setInitialState | ( | QQDMIncubationTask * | incubationTask, |
| QObject * | o ) |
Definition at line 1242 of file qqmldelegatemodel.cpp.
References emitInitPackage(), and QQDMIncubationTask::incubating.
| void QQmlDelegateModelPrivate::updateFilterGroup | ( | ) |
Definition at line 842 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelGroupPrivate::get(), m_groupCount, and m_parts.
| QVariant QQmlDelegateModelPrivate::variantValue | ( | Compositor::Group | group, |
| int | index, | ||
| const QString & | name ) |
Definition at line 1419 of file qqmldelegatemodel.cpp.
| QQmlAdaptorModel QQmlDelegateModelPrivate::m_adaptorModel |
Definition at line 577 of file qqmldelegatemodel_p_p.h.
| QList<QQmlDelegateModelItem *> QQmlDelegateModelPrivate::m_cache |
Definition at line 587 of file qqmldelegatemodel_p_p.h.
| QQmlRefPointer<QQmlDelegateModelItemMetaType> QQmlDelegateModelPrivate::m_cacheMetaType |
Definition at line 582 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_complete |
Definition at line 598 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and group_append().
| QQmlListCompositor QQmlDelegateModelPrivate::m_compositor |
Definition at line 578 of file qqmldelegatemodel_p_p.h.
| QQmlListCompositor::Group QQmlDelegateModelPrivate::m_compositorGroup |
Definition at line 597 of file qqmldelegatemodel_p_p.h.
| QPointer<QQmlContext> QQmlDelegateModelPrivate::m_context |
Definition at line 583 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_count |
Definition at line 594 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate().
| QQmlStrongJSQObjectReference<QQmlComponent> QQmlDelegateModelPrivate::m_delegate |
Definition at line 579 of file qqmldelegatemodel_p_p.h.
| QQmlAbstractDelegateComponent* QQmlDelegateModelPrivate::m_delegateChooser |
Definition at line 580 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and resolveDelegate().
| QMetaObject::Connection QQmlDelegateModelPrivate::m_delegateChooserChanged |
Definition at line 581 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_delegateValidated |
Definition at line 599 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and QQmlPartsModel::object().
| QString QQmlDelegateModelPrivate::m_filterGroup |
Definition at line 592 of file qqmldelegatemodel_p_p.h.
| QList<QQDMIncubationTask *> QQmlDelegateModelPrivate::m_finishedIncubating |
Definition at line 589 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_groupCount |
Definition at line 595 of file qqmldelegatemodel_p_p.h.
Referenced by delegateChanged(), emitChanges(), emitCreatedPackage(), emitDestroyingPackage(), emitInitPackage(), group_append(), group_at(), group_count(), itemsChanged(), itemsInserted(), itemsInserted(), itemsMoved(), itemsRemoved(), itemsRemoved(), object(), updateFilterGroup(), and QQmlPartsModel::updateFilterGroup().
| bool QQmlDelegateModelPrivate::m_incubatorCleanupScheduled |
Definition at line 602 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and releaseIncubator().
| QQmlDelegateModelParts* QQmlDelegateModelPrivate::m_parts |
Definition at line 584 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and updateFilterGroup().
| QQmlDelegateModelGroupEmitterList QQmlDelegateModelPrivate::m_pendingParts |
Definition at line 585 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlPartsModel::QQmlPartsModel().
| bool QQmlDelegateModelPrivate::m_reset |
Definition at line 600 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and emitChanges().
| QQmlReusableDelegateModelItemsPool QQmlDelegateModelPrivate::m_reusableItemsPool |
Definition at line 588 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_transaction |
Definition at line 601 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and emitChanges().
| bool QQmlDelegateModelPrivate::m_waitingToFetchMore |
Definition at line 603 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and requestMoreIfNecessary().
| QList<QByteArray> QQmlDelegateModelPrivate::m_watchedRoles |
Definition at line 590 of file qqmldelegatemodel_p_p.h.