![]() |
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>
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> |
Definition at line 499 of file qqmldelegatemodel_p_p.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| Error | |
| Retry | |
Definition at line 557 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelPrivate::QQmlDelegateModelPrivate | ( | QQmlContext * | ctxt | ) |
Encapsulates a model and delegate.
\qmltype DelegateModel
! \nativetype QQmlDelegateModel \inqmlmodule QtQml.Models
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 1173 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::addGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1464 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 1929 of file qqmldelegatemodel.cpp.
References emitChanges(), m_complete, m_groupCount, and m_transaction.
| void QQmlDelegateModelPrivate::destroyCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 637 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelItem::clearIncubationTask(), QQmlDelegateModelItem::destroyObjectLater(), QQmlDelegateModelItem::dispose(), QQmlDelegateModelItem::incubationTask(), and releaseIncubator().
Referenced by release().
| void QQmlDelegateModelPrivate::disconnectFromAbstractItemModel | ( | ) |
Definition at line 358 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::drainReusableItemsPool | ( | int | maxPoolTime | ) |
Definition at line 1142 of file qqmldelegatemodel.cpp.
Referenced by ~QQmlDelegateModelPrivate().
| void QQmlDelegateModelPrivate::emitChanges | ( | ) |
Definition at line 1955 of file qqmldelegatemodel.cpp.
References m_reset, and m_transaction.
Referenced by addGroups(), delegateChanged(), removeGroups(), and setGroups().
|
inline |
Definition at line 521 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitCreatedPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 915 of file qqmldelegatemodel.cpp.
Referenced by incubatorStatusChanged().
Definition at line 526 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitDestroyingPackage | ( | QQuickPackage * | package | ) |
Definition at line 927 of file qqmldelegatemodel.cpp.
Referenced by incubatorStatusChanged().
|
inline |
Definition at line 523 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitInitPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 921 of file qqmldelegatemodel.cpp.
Referenced by setInitialState().
|
overridevirtual |
Implements QQmlDelegateModelGroupEmitter.
Definition at line 1921 of file qqmldelegatemodel.cpp.
|
inlinestatic |
Definition at line 506 of file qqmldelegatemodel_p_p.h.
|
static |
Definition at line 695 of file qqmldelegatemodel.cpp.
References m_complete, and m_groupCount.
|
static |
Definition at line 716 of file qqmldelegatemodel.cpp.
References m_groupCount.
|
static |
Definition at line 709 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::incubatorStatusChanged | ( | QQDMIncubationTask * | incubationTask, |
| QQmlIncubator::Status | status ) |
Definition at line 1190 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelItem::clearIncubationTask(), QQmlDelegateModelItem::destroyObject(), emitCreatedPackage(), emitDestroyingPackage(), QQDMIncubationTask::incubating, QQmlDelegateModelItem::isObjectReferenced(), QQmlDelegateModelItem::isScriptReferenced(), releaseIncubator(), and removeCacheItem().
| void QQmlDelegateModelPrivate::init | ( | ) |
Definition at line 207 of file qqmldelegatemodel.cpp.
| QQmlDelegateModelPrivate::InsertionResult QQmlDelegateModelPrivate::insert | ( | Compositor::insert_iterator & | before, |
| const QV4::Value & | object, | ||
| int | groups ) |
Definition at line 2187 of file qqmldelegatemodel.cpp.
References Error, Retry, QQmlDelegateModelItem::setGroups(), and Success.
Definition at line 1512 of file qqmldelegatemodel.cpp.
Definition at line 1659 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::itemsInserted | ( | const QList< Compositor::Insert > & | inserts, |
| QVarLengthArray< QList< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedInserts, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1600 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::itemsMoved | ( | const QList< Compositor::Remove > & | removes, |
| const QList< Compositor::Insert > & | inserts ) |
Definition at line 1861 of file qqmldelegatemodel.cpp.
References m_groupCount.
Definition at line 1809 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::itemsRemoved | ( | const QList< Compositor::Remove > & | removes, |
| QVarLengthArray< QList< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedRemoves, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1709 of file qqmldelegatemodel.cpp.
References m_groupCount.
| QObject * QQmlDelegateModelPrivate::object | ( | Compositor::Group | group, |
| int | index, | ||
| QQmlIncubator::IncubationMode | incubationMode ) |
Definition at line 1250 of file qqmldelegatemodel.cpp.
References QQDMIncubationTask::incubating, QQmlDelegateModelItem::incubationTask(), QQmlDelegateModelItem::isScriptReferenced(), m_groupCount, removeCacheItem(), requestMoreIfNecessary(), reuseItem(), QQmlDelegateModelItem::setGroups(), and QQmlDelegateModelItem::setIncubationTask().
| QQmlDelegateModel::ReleaseFlags QQmlDelegateModelPrivate::release | ( | QObject * | object, |
| QQmlInstanceModel::ReusableFlag | reusable = QQmlInstanceModel::NotReusable ) |
Definition at line 615 of file qqmldelegatemodel.cpp.
References destroyCacheItem(), and removeCacheItem().
| void QQmlDelegateModelPrivate::releaseIncubator | ( | QQDMIncubationTask * | incubationTask | ) |
Definition at line 1096 of file qqmldelegatemodel.cpp.
References m_incubatorCleanupScheduled.
Referenced by destroyCacheItem(), and incubatorStatusChanged().
| void QQmlDelegateModelPrivate::removeCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 1180 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 1473 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 1157 of file qqmldelegatemodel.cpp.
References m_delegateChooser.
| void QQmlDelegateModelPrivate::reuseItem | ( | QQmlDelegateModelItem * | item, |
| int | newModelIndex, | ||
| int | newGroups ) |
Definition at line 1108 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelAttached::emitChanges(), QQmlDelegateModelAttached::resetCurrentIndex(), QQmlDelegateModelItem::setGroups(), and QQmlDelegateModelItem::setModelIndex().
Referenced by object().
| void QQmlDelegateModelPrivate::setGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1482 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::setInitialState | ( | QQDMIncubationTask * | incubationTask, |
| QObject * | o ) |
Definition at line 1237 of file qqmldelegatemodel.cpp.
References emitInitPackage(), and QQDMIncubationTask::incubating.
| void QQmlDelegateModelPrivate::updateFilterGroup | ( | ) |
Definition at line 837 of file qqmldelegatemodel.cpp.
References m_groupCount, and m_parts.
| QVariant QQmlDelegateModelPrivate::variantValue | ( | Compositor::Group | group, |
| int | index, | ||
| const QString & | name ) |
Definition at line 1414 of file qqmldelegatemodel.cpp.
| union { ... } QQmlDelegateModelPrivate |
| QQmlAdaptorModel QQmlDelegateModelPrivate::m_adaptorModel |
Definition at line 574 of file qqmldelegatemodel_p_p.h.
| QList<QQmlDelegateModelItem *> QQmlDelegateModelPrivate::m_cache |
Definition at line 584 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_cacheItems |
Definition at line 604 of file qqmldelegatemodel_p_p.h.
| QQmlRefPointer<QQmlDelegateModelItemMetaType> QQmlDelegateModelPrivate::m_cacheMetaType |
Definition at line 579 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_complete |
Definition at line 595 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and group_append().
| QQmlListCompositor QQmlDelegateModelPrivate::m_compositor |
Definition at line 575 of file qqmldelegatemodel_p_p.h.
| QQmlListCompositor::Group QQmlDelegateModelPrivate::m_compositorGroup |
Definition at line 594 of file qqmldelegatemodel_p_p.h.
| QPointer<QQmlContext> QQmlDelegateModelPrivate::m_context |
Definition at line 580 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_count |
Definition at line 591 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate().
| QQmlStrongJSQObjectReference<QQmlComponent> QQmlDelegateModelPrivate::m_delegate |
Definition at line 576 of file qqmldelegatemodel_p_p.h.
| QQmlAbstractDelegateComponent* QQmlDelegateModelPrivate::m_delegateChooser |
Definition at line 577 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and resolveDelegate().
| QMetaObject::Connection QQmlDelegateModelPrivate::m_delegateChooserChanged |
Definition at line 578 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_delegateValidated |
Definition at line 596 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and QQmlPartsModel::object().
| QString QQmlDelegateModelPrivate::m_filterGroup |
Definition at line 589 of file qqmldelegatemodel_p_p.h.
| QList<QQDMIncubationTask *> QQmlDelegateModelPrivate::m_finishedIncubating |
Definition at line 586 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_groupCount |
Definition at line 592 of file qqmldelegatemodel_p_p.h.
Referenced by delegateChanged(), group_append(), group_at(), group_count(), itemsInserted(), itemsMoved(), itemsRemoved(), object(), updateFilterGroup(), and QQmlPartsModel::updateFilterGroup().
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_groups[Compositor::MaximumGroupCount] |
Definition at line 608 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_incubatorCleanupScheduled |
Definition at line 599 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and releaseIncubator().
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_items |
Definition at line 605 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelParts* QQmlDelegateModelPrivate::m_parts |
Definition at line 581 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and updateFilterGroup().
| QQmlDelegateModelGroupEmitterList QQmlDelegateModelPrivate::m_pendingParts |
Definition at line 582 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlPartsModel::QQmlPartsModel().
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_persistedItems |
Definition at line 606 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_reset |
Definition at line 597 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and emitChanges().
| QQmlReusableDelegateModelItemsPool QQmlDelegateModelPrivate::m_reusableItemsPool |
Definition at line 585 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_transaction |
Definition at line 598 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and emitChanges().
| bool QQmlDelegateModelPrivate::m_waitingToFetchMore |
Definition at line 600 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and requestMoreIfNecessary().
| QList<QByteArray> QQmlDelegateModelPrivate::m_watchedRoles |
Definition at line 587 of file qqmldelegatemodel_p_p.h.