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>.
Loading...
Searching...
No Matches
QQmlDelegateModelPrivate Class Reference

#include <qqmldelegatemodel_p_p.h>

+ Inheritance diagram for QQmlDelegateModelPrivate:
+ Collaboration diagram for QQmlDelegateModelPrivate:

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>
 

Public Member Functions

 QQmlDelegateModelPrivate (QQmlContext *)
 Encapsulates a model and delegate.
 
 ~QQmlDelegateModelPrivate ()
 
void init ()
 
void connectModel (QQmlAdaptorModel *model)
 
void connectToAbstractItemModel ()
 
void disconnectFromAbstractItemModel ()
 
void requestMoreIfNecessary ()
 
QObjectobject (Compositor::Group group, int index, QQmlIncubator::IncubationMode incubationMode)
 
QQmlDelegateModel::ReleaseFlags release (QObject *object, QQmlInstanceModel::ReusableFlag reusable=QQmlInstanceModel::NotReusable)
 
QVariant variantValue (Compositor::Group group, int index, const QString &name)
 
void emitCreatedPackage (QQDMIncubationTask *incubationTask, QQuickPackage *package)
 
void emitInitPackage (QQDMIncubationTask *incubationTask, QQuickPackage *package)
 
void emitCreatedItem (QQDMIncubationTask *incubationTask, QObject *item)
 
void emitInitItem (QQDMIncubationTask *incubationTask, QObject *item)
 
void emitDestroyingPackage (QQuickPackage *package)
 
void emitDestroyingItem (QObject *item)
 
void addCacheItem (QQmlDelegateModelItem *item, Compositor::iterator it)
 
void removeCacheItem (QQmlDelegateModelItem *cacheItem)
 
void destroyCacheItem (QQmlDelegateModelItem *cacheItem)
 
void updateFilterGroup ()
 
void reuseItem (QQmlDelegateModelItem *item, int newModelIndex, int newGroups)
 
void drainReusableItemsPool (int maxPoolTime)
 
QQmlComponentresolveDelegate (int index)
 
void addGroups (Compositor::iterator from, int count, Compositor::Group group, int groupFlags)
 
void removeGroups (Compositor::iterator from, int count, Compositor::Group group, int groupFlags)
 
void setGroups (Compositor::iterator from, int count, Compositor::Group group, int groupFlags)
 
void itemsInserted (const QVector< Compositor::Insert > &inserts, QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > *translatedInserts, QHash< int, QList< QQmlDelegateModelItem * > > *movedItems=nullptr)
 
void itemsInserted (const QVector< Compositor::Insert > &inserts)
 
void itemsRemoved (const QVector< Compositor::Remove > &removes, QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > *translatedRemoves, QHash< int, QList< QQmlDelegateModelItem * > > *movedItems=nullptr)
 
void itemsRemoved (const QVector< Compositor::Remove > &removes)
 
void itemsMoved (const QVector< Compositor::Remove > &removes, const QVector< Compositor::Insert > &inserts)
 
void itemsChanged (const QVector< Compositor::Change > &changes)
 
void emitChanges ()
 
void emitModelUpdated (const QQmlChangeSet &changeSet, bool reset) override
 
void delegateChanged (bool add=true, bool remove=true)
 
InsertionResult insert (Compositor::insert_iterator &before, const QV4::Value &object, int groups)
 
int adaptorModelCount () const
 
void releaseIncubator (QQDMIncubationTask *incubationTask)
 
void incubatorStatusChanged (QQDMIncubationTask *incubationTask, QQmlIncubator::Status status)
 
void setInitialState (QQDMIncubationTask *incubationTask, QObject *o)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QQmlDelegateModelGroupEmitter
virtual ~QQmlDelegateModelGroupEmitter ()
 
virtual void createdPackage (int, QQuickPackage *)
 
virtual void initPackage (int, QQuickPackage *)
 
virtual void destroyingPackage (QQuickPackage *)
 

Static Public Member Functions

static QQmlDelegateModelPrivateget (QQmlDelegateModel *m)
 
static void group_append (QQmlListProperty< QQmlDelegateModelGroup > *property, QQmlDelegateModelGroup *group)
 
static qsizetype group_count (QQmlListProperty< QQmlDelegateModelGroup > *property)
 
static QQmlDelegateModelGroupgroup_at (QQmlListProperty< QQmlDelegateModelGroup > *property, qsizetype index)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (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

QQmlAdaptorModel m_adaptorModel
 
QQmlListCompositor m_compositor
 
QQmlStrongJSQObjectReference< QQmlComponentm_delegate
 
QQmlAbstractDelegateComponentm_delegateChooser
 
QMetaObject::Connection m_delegateChooserChanged
 
QQmlDelegateModelItemMetaTypem_cacheMetaType
 
QPointer< QQmlContextm_context
 
QQmlDelegateModelPartsm_parts
 
QQmlDelegateModelGroupEmitterList m_pendingParts
 
QList< QQmlDelegateModelItem * > m_cache
 
QQmlReusableDelegateModelItemsPool m_reusableItemsPool
 
QList< QQDMIncubationTask * > m_finishedIncubating
 
QList< QByteArraym_watchedRoles
 
QString m_filterGroup
 
int m_count
 
int m_groupCount
 
QQmlListCompositor::Group m_compositorGroup
 
bool m_complete: 1
 
bool m_delegateValidated: 1
 
bool m_reset: 1
 
bool m_transaction: 1
 
bool m_incubatorCleanupScheduled: 1
 
bool m_waitingToFetchMore: 1
 
union { 
 
   struct { 
 
      QQmlDelegateModelGroup *   m_cacheItems 
 
      QQmlDelegateModelGroup *   m_items 
 
      QQmlDelegateModelGroup *   m_persistedItems 
 
   }  
 
   QQmlDelegateModelGroup *   m_groups [Compositor::MaximumGroupCount] 
 
};  
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
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
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 
- Public Attributes inherited from QQmlDelegateModelGroupEmitter
QIntrusiveListNode emitterNode
 

Detailed Description

Definition at line 248 of file qqmldelegatemodel_p_p.h.

Member Enumeration Documentation

◆ InsertionResult

Enumerator
Success 
Error 
Retry 

Definition at line 306 of file qqmldelegatemodel_p_p.h.

Constructor & Destructor Documentation

◆ QQmlDelegateModelPrivate()

QQmlDelegateModelPrivate::QQmlDelegateModelPrivate ( QQmlContext * ctxt)

Encapsulates a model and delegate.

\qmltype DelegateModel

! \instantiates 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.

import QtQuick
import QtQml.Models
Rectangle {
width: 200; height: 100
DelegateModel {
id: visualModel
model: ListModel {
ListElement { name: "Apple" }
ListElement { name: "Orange" }
}
delegate: Rectangle {
height: 25
width: 100
Text { text: "Name: " + name}
}
}
ListView {
anchors.fill: parent
model: visualModel
}
}

Definition at line 155 of file qqmldelegatemodel.cpp.

◆ ~QQmlDelegateModelPrivate()

QQmlDelegateModelPrivate::~QQmlDelegateModelPrivate ( )

Definition at line 176 of file qqmldelegatemodel.cpp.

References drainReusableItemsPool(), m_cacheMetaType, m_finishedIncubating, qDeleteAll(), and QQmlRefCounted< T >::release().

+ Here is the call graph for this function:

Member Function Documentation

◆ adaptorModelCount()

int QQmlDelegateModelPrivate::adaptorModelCount ( ) const

Definition at line 187 of file qqmldelegatemodel.cpp.

References m_adaptorModel, and QQmlAdaptorModel::rowCount().

+ Here is the call graph for this function:

◆ addCacheItem()

void QQmlDelegateModelPrivate::addCacheItem ( QQmlDelegateModelItem * item,
Compositor::iterator it )

Definition at line 1076 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::count(), QList< T >::insert(), it, item, m_cache, m_compositor, Q_ASSERT, QQmlListCompositor::setFlags(), and QList< T >::size().

Referenced by object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGroups()

void QQmlDelegateModelPrivate::addGroups ( Compositor::iterator from,
int count,
Compositor::Group group,
int groupFlags )

Definition at line 1370 of file qqmldelegatemodel.cpp.

References emitChanges(), itemsInserted(), m_compositor, and QQmlListCompositor::setFlags().

+ Here is the call graph for this function:

◆ connectModel()

void QQmlDelegateModelPrivate::connectModel ( QQmlAdaptorModel * model)

◆ connectToAbstractItemModel()

◆ delegateChanged()

void QQmlDelegateModelPrivate::delegateChanged ( bool add = true,
bool remove = true )

Definition at line 1834 of file qqmldelegatemodel.cpp.

References add(), QQmlListCompositor::count(), emitChanges(), QQmlDelegateModelGroupPrivate::get(), i, m_complete, m_compositor, m_groupCount, m_groups, m_transaction, qmlWarning(), and remove().

+ Here is the call graph for this function:

◆ destroyCacheItem()

void QQmlDelegateModelPrivate::destroyCacheItem ( QQmlDelegateModelItem * cacheItem)

Definition at line 589 of file qqmldelegatemodel.cpp.

References emitDestroyingItem(), and releaseIncubator().

Referenced by drainReusableItemsPool(), and release().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disconnectFromAbstractItemModel()

◆ drainReusableItemsPool()

void QQmlDelegateModelPrivate::drainReusableItemsPool ( int maxPoolTime)

Definition at line 1045 of file qqmldelegatemodel.cpp.

References destroyCacheItem(), QQmlReusableDelegateModelItemsPool::drain(), and m_reusableItemsPool.

Referenced by ~QQmlDelegateModelPrivate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitChanges()

void QQmlDelegateModelPrivate::emitChanges ( )

Definition at line 1860 of file qqmldelegatemodel.cpp.

References engine, QQmlContext::engine(), QQmlDelegateModelGroupPrivate::get(), QJSEngine::handle(), i, QQmlContext::isValid(), QList< T >::length(), m_cache, m_complete, m_context, m_groupCount, m_groups, m_reset, and m_transaction.

Referenced by addGroups(), delegateChanged(), removeGroups(), and setGroups().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitCreatedItem()

void QQmlDelegateModelPrivate::emitCreatedItem ( QQDMIncubationTask * incubationTask,
QObject * item )
inline

Definition at line 270 of file qqmldelegatemodel_p_p.h.

References QQDMIncubationTask::index, item, and Q_EMIT.

Referenced by incubatorStatusChanged().

+ Here is the caller graph for this function:

◆ emitCreatedPackage()

void QQmlDelegateModelPrivate::emitCreatedPackage ( QQDMIncubationTask * incubationTask,
QQuickPackage * package )

Definition at line 867 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), i, QQDMIncubationTask::index, m_groupCount, and m_groups.

Referenced by incubatorStatusChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitDestroyingItem()

void QQmlDelegateModelPrivate::emitDestroyingItem ( QObject * item)
inline

Definition at line 275 of file qqmldelegatemodel_p_p.h.

References item, and Q_EMIT.

Referenced by destroyCacheItem(), incubatorStatusChanged(), and itemsRemoved().

+ Here is the caller graph for this function:

◆ emitDestroyingPackage()

void QQmlDelegateModelPrivate::emitDestroyingPackage ( QQuickPackage * package)

Definition at line 879 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), i, m_groupCount, and m_groups.

Referenced by incubatorStatusChanged(), and itemsRemoved().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitInitItem()

void QQmlDelegateModelPrivate::emitInitItem ( QQDMIncubationTask * incubationTask,
QObject * item )
inline

Definition at line 272 of file qqmldelegatemodel_p_p.h.

References QQDMIncubationTask::index, item, and Q_EMIT.

Referenced by setInitialState().

+ Here is the caller graph for this function:

◆ emitInitPackage()

void QQmlDelegateModelPrivate::emitInitPackage ( QQDMIncubationTask * incubationTask,
QQuickPackage * package )

Definition at line 873 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), i, QQDMIncubationTask::index, m_groupCount, and m_groups.

Referenced by setInitialState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitModelUpdated()

void QQmlDelegateModelPrivate::emitModelUpdated ( const QQmlChangeSet & changeSet,
bool reset )
overridevirtual

Implements QQmlDelegateModelGroupEmitter.

Definition at line 1826 of file qqmldelegatemodel.cpp.

References QQmlChangeSet::difference(), and emit.

+ Here is the call graph for this function:

◆ get()

static QQmlDelegateModelPrivate * QQmlDelegateModelPrivate::get ( QQmlDelegateModel * m)
inlinestatic

Definition at line 255 of file qqmldelegatemodel_p_p.h.

References QObjectPrivate::get().

Referenced by QQmlPartsModel::QQmlPartsModel(), QQmlDelegateModelItem::~QQmlDelegateModelItem(), QQmlDelegateModelGroup::addGroups(), QQmlDelegateModelGroup::count(), QQmlPartsModel::count(), QQmlDelegateModelGroup::create(), QQmlDelegateModelItem::Dispose(), QQmlPartsModel::emitModelUpdated(), QQmlDelegateModelGroup::get(), QQmlDelegateModelItem::groupIndex(), QQmlPartsModel::incubationStatus(), QQmlDelegateModelGroup::insert(), QQmlDelegateModelAttachedMetaObject::metaCall(), QQmlDelegateModelGroup::move(), QQmlPartsModel::object(), QQmlDelegateModelGroupPrivate::parseGroupArgs(), QQmlDelegateModelGroupPrivate::parseIndex(), QQmlPartsModel::release(), QQmlDelegateModelGroup::remove(), QQmlDelegateModelGroup::removeGroups(), QQmlDelegateModelAttached::resetCurrentIndex(), QQmlDelegateModelGroup::resolve(), QQmlDelegateModelItem::set_groups(), QQmlDelegateModelItem::set_member(), QQmlDelegateModelGroup::setDefaultInclude(), QQmlPartsModel::setFilterGroup(), QQmlDelegateModelAttached::setGroups(), QQmlDelegateModelGroup::setGroups(), QQmlPartsModel::setWatchedRoles(), QQmlPartsModel::updateFilterGroup(), QQmlPartsModel::updateFilterGroup(), and QQmlPartsModel::variantValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ group_append()

void QQmlDelegateModelPrivate::group_append ( QQmlListProperty< QQmlDelegateModelGroup > * property,
QQmlDelegateModelGroup * group )
static

Definition at line 647 of file qqmldelegatemodel.cpp.

References d, and qmlWarning().

+ Here is the call graph for this function:

◆ group_at()

QQmlDelegateModelGroup * QQmlDelegateModelPrivate::group_at ( QQmlListProperty< QQmlDelegateModelGroup > * property,
qsizetype index )
static

Definition at line 668 of file qqmldelegatemodel.cpp.

References d, and m_groupCount.

◆ group_count()

qsizetype QQmlDelegateModelPrivate::group_count ( QQmlListProperty< QQmlDelegateModelGroup > * property)
static

Definition at line 661 of file qqmldelegatemodel.cpp.

References d, and m_groupCount.

◆ incubatorStatusChanged()

void QQmlDelegateModelPrivate::incubatorStatusChanged ( QQDMIncubationTask * incubationTask,
QQmlIncubator::Status status )

Definition at line 1093 of file qqmldelegatemodel.cpp.

References emitCreatedItem(), emitCreatedPackage(), emitDestroyingItem(), emitDestroyingPackage(), QQmlIncubator::Error, QQmlComponent::errors(), QQmlIncubator::errors(), QQDMIncubationTask::incubating, QQmlDelegateModelItem::incubationTask, isDoneIncubating(), m_delegate, QQmlIncubator::object(), qmlInfo(), QQmlIncubator::Ready, releaseIncubator(), and removeCacheItem().

Referenced by QQDMIncubationTask::statusChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

void QQmlDelegateModelPrivate::init ( )

Definition at line 204 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), m_compositor, m_items, m_persistedItems, QStringLiteral, QQmlDelegateModelGroup::setDefaultInclude(), and QQmlListCompositor::setRemoveGroups().

+ Here is the call graph for this function:

◆ insert()

QQmlDelegateModelPrivate::InsertionResult QQmlDelegateModelPrivate::insert ( Compositor::insert_iterator & before,
const QV4::Value & object,
int groups )

Definition at line 2089 of file qqmldelegatemodel.cpp.

References QQmlAdaptorModel::createItem(), engine, QV4::ObjectIterator::EnumerableOnly, Error, QQmlListCompositor::insert(), QList< T >::insert(), QV4::StaticValue::isNull(), QList< T >::isSharedWith(), QQmlContext::isValid(), it, itemsInserted(), m_adaptorModel, m_cache, m_cacheMetaType, m_compositor, m_context, o, Retry, Success, QV4::Value::toQStringNoThrow(), and QV4::ExecutionEngine::toVariant().

Referenced by itemsInserted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemsChanged()

void QQmlDelegateModelPrivate::itemsChanged ( const QVector< Compositor::Change > & changes)

Definition at line 1418 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), i, m_delegate, m_groupCount, and m_groups.

+ Here is the call graph for this function:

◆ itemsInserted() [1/2]

void QQmlDelegateModelPrivate::itemsInserted ( const QVector< Compositor::Insert > & inserts)

Definition at line 1566 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, itemsInserted(), m_cache, m_compositor, m_delegate, m_groupCount, m_groups, Q_ASSERT, and QList< T >::size().

+ Here is the call graph for this function:

◆ itemsInserted() [2/2]

void QQmlDelegateModelPrivate::itemsInserted ( const QVector< Compositor::Insert > & inserts,
QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * translatedInserts,
QHash< int, QList< QQmlDelegateModelItem * > > * movedItems = nullptr )

Definition at line 1507 of file qqmldelegatemodel.cpp.

References QList< T >::at(), cache, QQmlDelegateModelItem::groups, i, incrementIndexes(), insert(), items, m_cache, m_groupCount, QList< T >::mid(), Q_ASSERT, and QList< T >::size().

Referenced by addGroups(), insert(), itemsInserted(), itemsMoved(), and setGroups().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemsMoved()

void QQmlDelegateModelPrivate::itemsMoved ( const QVector< Compositor::Remove > & removes,
const QVector< Compositor::Insert > & inserts )

Definition at line 1766 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, itemsInserted(), itemsRemoved(), m_cache, m_compositor, m_delegate, m_groupCount, m_groups, Q_ASSERT, and QList< T >::size().

+ Here is the call graph for this function:

◆ itemsRemoved() [1/2]

void QQmlDelegateModelPrivate::itemsRemoved ( const QVector< Compositor::Remove > & removes)

Definition at line 1714 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, itemsRemoved(), m_cache, m_compositor, m_delegate, m_groupCount, m_groups, Q_ASSERT, and QList< T >::size().

+ Here is the call graph for this function:

◆ itemsRemoved() [2/2]

void QQmlDelegateModelPrivate::itemsRemoved ( const QVector< Compositor::Remove > & removes,
QVarLengthArray< QVector< QQmlChangeSet::Change >, Compositor::MaximumGroupCount > * translatedRemoves,
QHash< int, QList< QQmlDelegateModelItem * > > * movedItems = nullptr )

Definition at line 1616 of file qqmldelegatemodel.cpp.

References QList< T >::at(), begin(), cache, QQmlListCompositor::clearFlags(), QList< T >::constBegin(), QQmlListCompositor::count(), emitDestroyingItem(), emitDestroyingPackage(), QList< T >::erase(), i, incrementIndexes(), m_cache, m_compositor, m_groupCount, QList< T >::mid(), Q_ASSERT, releaseIncubator(), remove(), QList< T >::removeAt(), and QList< T >::size().

Referenced by itemsMoved(), itemsRemoved(), removeGroups(), and setGroups().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ object()

◆ release()

QQmlDelegateModel::ReleaseFlags QQmlDelegateModelPrivate::release ( QObject * object,
QQmlInstanceModel::ReusableFlag reusable = QQmlInstanceModel::NotReusable )

Definition at line 566 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelItem::dataForObject(), destroyCacheItem(), QQmlInstanceModel::Destroyed, emit, QQmlReusableDelegateModelItemsPool::insertItem(), m_reusableItemsPool, QQmlInstanceModel::Pooled, QQmlInstanceModel::Referenced, removeCacheItem(), and QQmlInstanceModel::Reusable.

+ Here is the call graph for this function:

◆ releaseIncubator()

void QQmlDelegateModelPrivate::releaseIncubator ( QQDMIncubationTask * incubationTask)

Definition at line 999 of file qqmldelegatemodel.cpp.

References QList< T >::append(), QQmlIncubator::clear(), QQmlIncubator::isError(), m_finishedIncubating, m_incubatorCleanupScheduled, QCoreApplication::postEvent(), and QEvent::User.

Referenced by destroyCacheItem(), incubatorStatusChanged(), and itemsRemoved().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeCacheItem()

void QQmlDelegateModelPrivate::removeCacheItem ( QQmlDelegateModelItem * cacheItem)

Definition at line 1083 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::clearFlags(), QQmlListCompositor::count(), QListSpecialMethodsBase< T >::lastIndexOf(), m_cache, m_compositor, Q_ASSERT, QList< T >::removeAt(), and QList< T >::size().

Referenced by incubatorStatusChanged(), object(), and release().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeGroups()

void QQmlDelegateModelPrivate::removeGroups ( Compositor::iterator from,
int count,
Compositor::Group group,
int groupFlags )

Definition at line 1379 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::clearFlags(), emitChanges(), itemsRemoved(), and m_compositor.

+ Here is the call graph for this function:

◆ requestMoreIfNecessary()

void QQmlDelegateModelPrivate::requestMoreIfNecessary ( )

Definition at line 195 of file qqmldelegatemodel.cpp.

References QQmlAdaptorModel::canFetchMore(), m_adaptorModel, m_waitingToFetchMore, QCoreApplication::postEvent(), and QEvent::UpdateRequest.

Referenced by object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveDelegate()

QQmlComponent * QQmlDelegateModelPrivate::resolveDelegate ( int index)

Definition at line 1060 of file qqmldelegatemodel.cpp.

References m_adaptorModel, m_delegate, and m_delegateChooser.

Referenced by object().

+ Here is the caller graph for this function:

◆ reuseItem()

void QQmlDelegateModelPrivate::reuseItem ( QQmlDelegateModelItem * item,
int newModelIndex,
int newGroups )

Definition at line 1011 of file qqmldelegatemodel.cpp.

References emit, item, m_adaptorModel, QQmlAdaptorModel::notify(), and Q_ASSERT.

Referenced by object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGroups()

void QQmlDelegateModelPrivate::setGroups ( Compositor::iterator from,
int count,
Compositor::Group group,
int groupFlags )

Definition at line 1388 of file qqmldelegatemodel.cpp.

References QQmlListCompositor::clearFlags(), emitChanges(), QQmlListCompositor::find(), itemsInserted(), itemsRemoved(), m_compositor, and QQmlListCompositor::setFlags().

+ Here is the call graph for this function:

◆ setInitialState()

void QQmlDelegateModelPrivate::setInitialState ( QQDMIncubationTask * incubationTask,
QObject * o )

Definition at line 1138 of file qqmldelegatemodel.cpp.

References emitInitItem(), emitInitPackage(), QQDMIncubationTask::incubating, QQDMIncubationTask::initializeRequiredProperties(), o, and QQmlIncubator::object().

Referenced by QQDMIncubationTask::setInitialState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateFilterGroup()

void QQmlDelegateModelPrivate::updateFilterGroup ( )

Definition at line 789 of file qqmldelegatemodel.cpp.

References QQmlChangeSet::difference(), emit, QQmlDelegateModelGroupPrivate::get(), QQmlDelegateModelItemMetaType::groupNames, i, m_cacheMetaType, m_compositor, m_compositorGroup, m_filterGroup, m_groupCount, m_groups, m_parts, model, QQmlDelegateModelParts::models, QQmlChangeSet::move(), and QQmlListCompositor::transition().

+ Here is the call graph for this function:

◆ variantValue()

QVariant QQmlDelegateModelPrivate::variantValue ( Compositor::Group group,
int index,
const QString & name )

Definition at line 1327 of file qqmldelegatemodel.cpp.

References dot(), QQmlListCompositor::find(), it, QString::left(), m_compositor, QStringView::mid(), and model.

+ Here is the call graph for this function:

Member Data Documentation

◆ [union]

union { ... } QQmlDelegateModelPrivate

◆ m_adaptorModel

◆ m_cache

◆ m_cacheItems

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_cacheItems

Definition at line 353 of file qqmldelegatemodel_p_p.h.

◆ m_cacheMetaType

QQmlDelegateModelItemMetaType* QQmlDelegateModelPrivate::m_cacheMetaType

◆ m_complete

bool QQmlDelegateModelPrivate::m_complete

Definition at line 344 of file qqmldelegatemodel_p_p.h.

Referenced by delegateChanged(), and emitChanges().

◆ m_compositor

◆ m_compositorGroup

QQmlListCompositor::Group QQmlDelegateModelPrivate::m_compositorGroup

Definition at line 343 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_context

QPointer<QQmlContext> QQmlDelegateModelPrivate::m_context

Definition at line 329 of file qqmldelegatemodel_p_p.h.

Referenced by emitChanges(), insert(), and object().

◆ m_count

int QQmlDelegateModelPrivate::m_count

Definition at line 340 of file qqmldelegatemodel_p_p.h.

◆ m_delegate

◆ m_delegateChooser

QQmlAbstractDelegateComponent* QQmlDelegateModelPrivate::m_delegateChooser

Definition at line 326 of file qqmldelegatemodel_p_p.h.

Referenced by resolveDelegate().

◆ m_delegateChooserChanged

QMetaObject::Connection QQmlDelegateModelPrivate::m_delegateChooserChanged

Definition at line 327 of file qqmldelegatemodel_p_p.h.

◆ m_delegateValidated

bool QQmlDelegateModelPrivate::m_delegateValidated

Definition at line 345 of file qqmldelegatemodel_p_p.h.

◆ m_filterGroup

QString QQmlDelegateModelPrivate::m_filterGroup

Definition at line 338 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_finishedIncubating

QList<QQDMIncubationTask *> QQmlDelegateModelPrivate::m_finishedIncubating

Definition at line 335 of file qqmldelegatemodel_p_p.h.

Referenced by ~QQmlDelegateModelPrivate(), and releaseIncubator().

◆ m_groupCount

◆ m_groups

◆ m_incubatorCleanupScheduled

bool QQmlDelegateModelPrivate::m_incubatorCleanupScheduled

Definition at line 348 of file qqmldelegatemodel_p_p.h.

Referenced by releaseIncubator().

◆ m_items

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_items

Definition at line 354 of file qqmldelegatemodel_p_p.h.

Referenced by init().

◆ m_parts

QQmlDelegateModelParts* QQmlDelegateModelPrivate::m_parts

Definition at line 330 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_pendingParts

QQmlDelegateModelGroupEmitterList QQmlDelegateModelPrivate::m_pendingParts

Definition at line 331 of file qqmldelegatemodel_p_p.h.

◆ m_persistedItems

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_persistedItems

Definition at line 355 of file qqmldelegatemodel_p_p.h.

Referenced by init().

◆ m_reset

bool QQmlDelegateModelPrivate::m_reset

Definition at line 346 of file qqmldelegatemodel_p_p.h.

Referenced by emitChanges().

◆ m_reusableItemsPool

QQmlReusableDelegateModelItemsPool QQmlDelegateModelPrivate::m_reusableItemsPool

Definition at line 334 of file qqmldelegatemodel_p_p.h.

Referenced by drainReusableItemsPool(), object(), and release().

◆ m_transaction

bool QQmlDelegateModelPrivate::m_transaction

Definition at line 347 of file qqmldelegatemodel_p_p.h.

Referenced by delegateChanged(), and emitChanges().

◆ m_waitingToFetchMore

bool QQmlDelegateModelPrivate::m_waitingToFetchMore

Definition at line 349 of file qqmldelegatemodel_p_p.h.

Referenced by requestMoreIfNecessary().

◆ m_watchedRoles

QList<QByteArray> QQmlDelegateModelPrivate::m_watchedRoles

Definition at line 336 of file qqmldelegatemodel_p_p.h.


The documentation for this class was generated from the following files: