![]() |
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 353 of file qqmldelegatemodel_p_p.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| Error | |
| Retry | |
Definition at line 411 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 1190 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::addGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1485 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::connectModel | ( | QQmlAdaptorModel * | model | ) |
| void QQmlDelegateModelPrivate::connectToAbstractItemModel | ( | ) |
Definition at line 349 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::delegateChanged | ( | bool | add = true, |
| bool | remove = true ) |
Definition at line 1949 of file qqmldelegatemodel.cpp.
References emitChanges(), m_complete, m_groupCount, and m_transaction.
| void QQmlDelegateModelPrivate::destroyCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 648 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelItem::destroyObject(), QQmlDelegateModelItem::dispose(), QQmlDelegateModelItem::incubationTask, and releaseIncubator().
Referenced by release().
| void QQmlDelegateModelPrivate::disconnectFromAbstractItemModel | ( | ) |
Definition at line 369 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::drainReusableItemsPool | ( | int | maxPoolTime | ) |
Definition at line 1159 of file qqmldelegatemodel.cpp.
Referenced by ~QQmlDelegateModelPrivate().
| void QQmlDelegateModelPrivate::emitChanges | ( | ) |
Definition at line 1975 of file qqmldelegatemodel.cpp.
References m_reset, and m_transaction.
Referenced by addGroups(), delegateChanged(), removeGroups(), and setGroups().
|
inline |
Definition at line 375 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitCreatedPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 929 of file qqmldelegatemodel.cpp.
Referenced by incubatorStatusChanged().
Definition at line 380 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitDestroyingPackage | ( | QQuickPackage * | package | ) |
Definition at line 941 of file qqmldelegatemodel.cpp.
Referenced by incubatorStatusChanged().
|
inline |
Definition at line 377 of file qqmldelegatemodel_p_p.h.
| void QQmlDelegateModelPrivate::emitInitPackage | ( | QQDMIncubationTask * | incubationTask, |
| QQuickPackage * | package ) |
Definition at line 935 of file qqmldelegatemodel.cpp.
Referenced by setInitialState().
|
overridevirtual |
Implements QQmlDelegateModelGroupEmitter.
Definition at line 1941 of file qqmldelegatemodel.cpp.
|
inlinestatic |
Definition at line 360 of file qqmldelegatemodel_p_p.h.
|
static |
Definition at line 709 of file qqmldelegatemodel.cpp.
References m_complete, and m_groupCount.
|
static |
Definition at line 730 of file qqmldelegatemodel.cpp.
References m_groupCount.
|
static |
Definition at line 723 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::incubatorStatusChanged | ( | QQDMIncubationTask * | incubationTask, |
| QQmlIncubator::Status | status ) |
Definition at line 1207 of file qqmldelegatemodel.cpp.
References emitCreatedPackage(), emitDestroyingPackage(), QQDMIncubationTask::incubating, QQmlDelegateModelItem::incubationTask, QQmlDelegateModelItem::isObjectReferenced(), QQmlDelegateModelItem::isReferenced(), QQmlDelegateModelItem::referenceObject(), releaseIncubator(), QQmlDelegateModelItem::releaseObject(), removeCacheItem(), and QQmlDelegateModelItem::scriptRef.
| 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 2208 of file qqmldelegatemodel.cpp.
Definition at line 1533 of file qqmldelegatemodel.cpp.
Definition at line 1681 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::itemsInserted | ( | const QVector< Compositor::Insert > & | inserts, |
| QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedInserts, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1622 of file qqmldelegatemodel.cpp.
References m_groupCount.
| void QQmlDelegateModelPrivate::itemsMoved | ( | const QVector< Compositor::Remove > & | removes, |
| const QVector< Compositor::Insert > & | inserts ) |
Definition at line 1881 of file qqmldelegatemodel.cpp.
References m_groupCount.
Definition at line 1829 of file qqmldelegatemodel.cpp.
| void QQmlDelegateModelPrivate::itemsRemoved | ( | const QVector< Compositor::Remove > & | removes, |
| QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * | translatedRemoves, | ||
| QHash< int, QList< QQmlDelegateModelItem * > > * | movedItems = nullptr ) |
Definition at line 1731 of file qqmldelegatemodel.cpp.
References m_groupCount.
| QObject * QQmlDelegateModelPrivate::object | ( | Compositor::Group | group, |
| int | index, | ||
| QQmlIncubator::IncubationMode | incubationMode ) |
Definition at line 1270 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelItem::groups, QQDMIncubationTask::incubating, QQmlDelegateModelItem::incubationTask, QQmlDelegateModelItem::isReferenced(), m_groupCount, QQmlDelegateModelItem::objectRef, QQmlDelegateModelItem::referenceObject(), QQmlDelegateModelItem::releaseObject(), removeCacheItem(), requestMoreIfNecessary(), reuseItem(), and QQmlDelegateModelItem::scriptRef.
| QQmlDelegateModel::ReleaseFlags QQmlDelegateModelPrivate::release | ( | QObject * | object, |
| QQmlInstanceModel::ReusableFlag | reusable = QQmlInstanceModel::NotReusable ) |
Definition at line 626 of file qqmldelegatemodel.cpp.
References destroyCacheItem(), and removeCacheItem().
| void QQmlDelegateModelPrivate::releaseIncubator | ( | QQDMIncubationTask * | incubationTask | ) |
Definition at line 1113 of file qqmldelegatemodel.cpp.
References m_incubatorCleanupScheduled.
Referenced by destroyCacheItem(), and incubatorStatusChanged().
| void QQmlDelegateModelPrivate::removeCacheItem | ( | QQmlDelegateModelItem * | cacheItem | ) |
Definition at line 1197 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 1494 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 1174 of file qqmldelegatemodel.cpp.
References m_delegateChooser.
| void QQmlDelegateModelPrivate::reuseItem | ( | QQmlDelegateModelItem * | item, |
| int | newModelIndex, | ||
| int | newGroups ) |
Definition at line 1125 of file qqmldelegatemodel.cpp.
References QQmlDelegateModelAttached::emitChanges(), QQmlDelegateModelItem::groups, QQmlDelegateModelAttached::resetCurrentIndex(), and QQmlDelegateModelItem::setModelIndex().
Referenced by object().
| void QQmlDelegateModelPrivate::setGroups | ( | Compositor::iterator | from, |
| int | count, | ||
| Compositor::Group | group, | ||
| int | groupFlags ) |
Definition at line 1503 of file qqmldelegatemodel.cpp.
References emitChanges().
| void QQmlDelegateModelPrivate::setInitialState | ( | QQDMIncubationTask * | incubationTask, |
| QObject * | o ) |
Definition at line 1257 of file qqmldelegatemodel.cpp.
References emitInitPackage(), and QQDMIncubationTask::incubating.
| void QQmlDelegateModelPrivate::updateFilterGroup | ( | ) |
Definition at line 851 of file qqmldelegatemodel.cpp.
References m_groupCount, and m_parts.
| QVariant QQmlDelegateModelPrivate::variantValue | ( | Compositor::Group | group, |
| int | index, | ||
| const QString & | name ) |
Definition at line 1435 of file qqmldelegatemodel.cpp.
| union { ... } QQmlDelegateModelPrivate |
| QQmlAdaptorModel QQmlDelegateModelPrivate::m_adaptorModel |
Definition at line 428 of file qqmldelegatemodel_p_p.h.
| QList<QQmlDelegateModelItem *> QQmlDelegateModelPrivate::m_cache |
Definition at line 438 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_cacheItems |
Definition at line 458 of file qqmldelegatemodel_p_p.h.
| QQmlRefPointer<QQmlDelegateModelItemMetaType> QQmlDelegateModelPrivate::m_cacheMetaType |
Definition at line 433 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_complete |
Definition at line 449 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and group_append().
| QQmlListCompositor QQmlDelegateModelPrivate::m_compositor |
Definition at line 429 of file qqmldelegatemodel_p_p.h.
| QQmlListCompositor::Group QQmlDelegateModelPrivate::m_compositorGroup |
Definition at line 448 of file qqmldelegatemodel_p_p.h.
| QPointer<QQmlContext> QQmlDelegateModelPrivate::m_context |
Definition at line 434 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_count |
Definition at line 445 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate().
| QQmlStrongJSQObjectReference<QQmlComponent> QQmlDelegateModelPrivate::m_delegate |
Definition at line 430 of file qqmldelegatemodel_p_p.h.
| QQmlAbstractDelegateComponent* QQmlDelegateModelPrivate::m_delegateChooser |
Definition at line 431 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and resolveDelegate().
| QMetaObject::Connection QQmlDelegateModelPrivate::m_delegateChooserChanged |
Definition at line 432 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_delegateValidated |
Definition at line 450 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and QQmlPartsModel::object().
| QString QQmlDelegateModelPrivate::m_filterGroup |
Definition at line 443 of file qqmldelegatemodel_p_p.h.
| QList<QQDMIncubationTask *> QQmlDelegateModelPrivate::m_finishedIncubating |
Definition at line 440 of file qqmldelegatemodel_p_p.h.
| int QQmlDelegateModelPrivate::m_groupCount |
Definition at line 446 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 462 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_incubatorCleanupScheduled |
Definition at line 453 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and releaseIncubator().
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_items |
Definition at line 459 of file qqmldelegatemodel_p_p.h.
| QQmlDelegateModelParts* QQmlDelegateModelPrivate::m_parts |
Definition at line 435 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and updateFilterGroup().
| QQmlDelegateModelGroupEmitterList QQmlDelegateModelPrivate::m_pendingParts |
Definition at line 436 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlPartsModel::QQmlPartsModel().
| QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_persistedItems |
Definition at line 460 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_reset |
Definition at line 451 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and emitChanges().
| QQmlReusableDelegateModelItemsPool QQmlDelegateModelPrivate::m_reusableItemsPool |
Definition at line 439 of file qqmldelegatemodel_p_p.h.
| bool QQmlDelegateModelPrivate::m_transaction |
Definition at line 452 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), delegateChanged(), and emitChanges().
| bool QQmlDelegateModelPrivate::m_waitingToFetchMore |
Definition at line 454 of file qqmldelegatemodel_p_p.h.
Referenced by QQmlDelegateModelPrivate(), and requestMoreIfNecessary().
| QList<QByteArray> QQmlDelegateModelPrivate::m_watchedRoles |
Definition at line 441 of file qqmldelegatemodel_p_p.h.