Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlDelegateModelPrivate Class Reference

#include <qqmldelegatemodel_p_p.h>

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

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)
 
bool 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)
 
void _q_reregisterTimers (void *pointer)
 
bool isSender (const QObject *receiver, const char *signal) const
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () 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
 
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 emitModelUpdated (const QQmlChangeSet &changeSet, bool reset)=0
 
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 unused: 21
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 
- Public Attributes inherited from QQmlDelegateModelGroupEmitter
QIntrusiveListNode emitterNode
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData >
 

Detailed Description

Definition at line 247 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 1095 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 1386 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()

void QQmlDelegateModelPrivate::connectToAbstractItemModel ( )

Definition at line 346 of file qqmldelegatemodel.cpp.

References QQmlAdaptorModel::adaptsAim(), QQmlAdaptorModel::aim(), QObject::connect(), m_adaptorModel, QAbstractItemModel::modelAboutToBeReset(), qmlobject_connect, SIGNAL, and SLOT.

+ Here is the call graph for this function:

◆ delegateChanged()

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

Definition at line 1806 of file qqmldelegatemodel.cpp.

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

+ Here is the call graph for this function:

◆ destroyCacheItem()

void QQmlDelegateModelPrivate::destroyCacheItem ( QQmlDelegateModelItem cacheItem)

Definition at line 608 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelItem::destroyObject(), QQmlDelegateModelItem::Dispose(), emitDestroyingItem(), QQmlDelegateModelItem::incubationTask, QQmlDelegateModelItem::object, and releaseIncubator().

Referenced by drainReusableItemsPool(), and release().

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

◆ disconnectFromAbstractItemModel()

void QQmlDelegateModelPrivate::disconnectFromAbstractItemModel ( )

Definition at line 376 of file qqmldelegatemodel.cpp.

References QQmlAdaptorModel::adaptsAim(), QQmlAdaptorModel::aim(), QObject::disconnect(), m_adaptorModel, QAbstractItemModel::modelAboutToBeReset(), SIGNAL, and SLOT.

+ Here is the call graph for this function:

◆ drainReusableItemsPool()

void QQmlDelegateModelPrivate::drainReusableItemsPool ( int  maxPoolTime)

Definition at line 1064 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 1832 of file qqmldelegatemodel.cpp.

References QVarLengthArray< T, Prealloc >::append(), QQmlDelegateModelGroupPrivate::emitChanges(), QQmlDelegateModelGroupPrivate::emitModelUpdated(), 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, m_transaction, and QVarLengthArray< T, Prealloc >::reserve().

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 269 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 886 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::createdPackage(), 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 274 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 898 of file qqmldelegatemodel.cpp.

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

Referenced by incubatorStatusChanged(), itemsRemoved(), and QQmlPartsModel::release().

+ 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 271 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 892 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::get(), i, QQDMIncubationTask::index, QQmlDelegateModelGroupPrivate::initPackage(), 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 1798 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 254 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 666 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 687 of file qqmldelegatemodel.cpp.

References d.

◆ group_count()

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

Definition at line 680 of file qqmldelegatemodel.cpp.

References d.

◆ incubatorStatusChanged()

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

◆ init()

void QQmlDelegateModelPrivate::init ( )

Definition at line 204 of file qqmldelegatemodel.cpp.

References QQmlDelegateModelGroupPrivate::emitters, QQmlDelegateModelGroupPrivate::get(), QIntrusiveList< N, member >::insert(), m_compositor, m_items, m_persistedItems, QStringLiteral, QQmlDelegateModelGroup::setDefaultInclude(), and QQmlListCompositor::setRemoveGroups().

+ Here is the call graph for this function:

◆ insert()

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

Definition at line 2060 of file qqmldelegatemodel.cpp.

References QQmlAdaptorModel::createItem(), engine, QV4::ObjectIterator::EnumerableOnly, QQmlDelegateModelItem::groups, QQmlListCompositor::insert(), QList< T >::insert(), QV4::StaticValue::isNull(), QQmlContext::isValid(), it, itemsInserted(), m_adaptorModel, m_cache, m_cacheMetaType, m_compositor, m_context, o, QQmlDelegateModelItem::setValue(), 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 1434 of file qqmldelegatemodel.cpp.

References QVarLengthArray< T, Prealloc >::append(), QVarLengthArray< T, Prealloc >::at(), QQmlChangeSet::change(), QQmlDelegateModelGroupPrivate::changeSet, 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 1538 of file qqmldelegatemodel.cpp.

References QVarLengthArray< T, Prealloc >::at(), QQmlDelegateModelGroupPrivate::changeSet, QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, QQmlChangeSet::insert(), 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 1479 of file qqmldelegatemodel.cpp.

References QList< T >::at(), QQmlDelegateModelItem::attached, cache, QQmlDelegateModelItem::groups, i, incrementIndexes(), QQmlDelegateModelItem::incubationTask, 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 1738 of file qqmldelegatemodel.cpp.

References QVarLengthArray< T, Prealloc >::at(), QQmlDelegateModelGroupPrivate::changeSet, QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, QHash< Key, T >::isEmpty(), itemsInserted(), itemsRemoved(), m_cache, m_compositor, m_delegate, m_groupCount, m_groups, QQmlChangeSet::move(), 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 1686 of file qqmldelegatemodel.cpp.

References QVarLengthArray< T, Prealloc >::at(), QQmlDelegateModelGroupPrivate::changeSet, QQmlListCompositor::count(), QQmlDelegateModelGroupPrivate::get(), i, itemsRemoved(), m_cache, m_compositor, m_delegate, m_groupCount, m_groups, Q_ASSERT, QQmlChangeSet::remove(), 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 
)

◆ object()

QObject * QQmlDelegateModelPrivate::object ( Compositor::Group  group,
int  index,
QQmlIncubator::IncubationMode  incubationMode 
)

◆ release()

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

◆ releaseIncubator()

void QQmlDelegateModelPrivate::releaseIncubator ( QQDMIncubationTask incubationTask)

Definition at line 1018 of file qqmldelegatemodel.cpp.

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

Referenced by QQmlDelegateModelItem::~QQmlDelegateModelItem(), 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 1102 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 1395 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 1079 of file qqmldelegatemodel.cpp.

References QQmlAbstractDelegateComponent::delegate(), m_adaptorModel, m_delegate, and m_delegateChooser.

Referenced by object().

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

◆ reuseItem()

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

Definition at line 1030 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 1404 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 1157 of file qqmldelegatemodel.cpp.

References emitInitItem(), emitInitPackage(), QQDMIncubationTask::incubating, QQDMIncubationTask::initializeRequiredProperties(), o, and QQmlDelegateModelItem::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 ( )

◆ variantValue()

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

Definition at line 1343 of file qqmldelegatemodel.cpp.

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

Referenced by QQmlPartsModel::variantValue().

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

Member Data Documentation

◆ [union]

union { ... } QQmlDelegateModelPrivate

◆ m_adaptorModel

◆ m_cache

◆ m_cacheItems

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_cacheItems

Definition at line 347 of file qqmldelegatemodel_p_p.h.

◆ m_cacheMetaType

◆ m_complete

bool QQmlDelegateModelPrivate::m_complete

Definition at line 338 of file qqmldelegatemodel_p_p.h.

Referenced by delegateChanged(), and emitChanges().

◆ m_compositor

◆ m_compositorGroup

QQmlListCompositor::Group QQmlDelegateModelPrivate::m_compositorGroup

Definition at line 337 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_context

QPointer<QQmlContext> QQmlDelegateModelPrivate::m_context

Definition at line 323 of file qqmldelegatemodel_p_p.h.

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

◆ m_count

int QQmlDelegateModelPrivate::m_count

Definition at line 334 of file qqmldelegatemodel_p_p.h.

◆ m_delegate

◆ m_delegateChooser

QQmlAbstractDelegateComponent* QQmlDelegateModelPrivate::m_delegateChooser

Definition at line 320 of file qqmldelegatemodel_p_p.h.

Referenced by resolveDelegate().

◆ m_delegateChooserChanged

QMetaObject::Connection QQmlDelegateModelPrivate::m_delegateChooserChanged

Definition at line 321 of file qqmldelegatemodel_p_p.h.

◆ m_delegateValidated

bool QQmlDelegateModelPrivate::m_delegateValidated

Definition at line 339 of file qqmldelegatemodel_p_p.h.

◆ m_filterGroup

QString QQmlDelegateModelPrivate::m_filterGroup

Definition at line 332 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_finishedIncubating

QList<QQDMIncubationTask *> QQmlDelegateModelPrivate::m_finishedIncubating

Definition at line 329 of file qqmldelegatemodel_p_p.h.

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

◆ m_groupCount

◆ m_groups

◆ m_incubatorCleanupScheduled

bool QQmlDelegateModelPrivate::m_incubatorCleanupScheduled

Definition at line 342 of file qqmldelegatemodel_p_p.h.

Referenced by releaseIncubator().

◆ m_items

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_items

Definition at line 348 of file qqmldelegatemodel_p_p.h.

Referenced by init().

◆ m_parts

QQmlDelegateModelParts* QQmlDelegateModelPrivate::m_parts

Definition at line 324 of file qqmldelegatemodel_p_p.h.

Referenced by updateFilterGroup().

◆ m_pendingParts

QQmlDelegateModelGroupEmitterList QQmlDelegateModelPrivate::m_pendingParts

Definition at line 325 of file qqmldelegatemodel_p_p.h.

◆ m_persistedItems

QQmlDelegateModelGroup* QQmlDelegateModelPrivate::m_persistedItems

Definition at line 349 of file qqmldelegatemodel_p_p.h.

Referenced by init().

◆ m_reset

bool QQmlDelegateModelPrivate::m_reset

Definition at line 340 of file qqmldelegatemodel_p_p.h.

Referenced by emitChanges().

◆ m_reusableItemsPool

QQmlReusableDelegateModelItemsPool QQmlDelegateModelPrivate::m_reusableItemsPool

Definition at line 328 of file qqmldelegatemodel_p_p.h.

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

◆ m_transaction

bool QQmlDelegateModelPrivate::m_transaction

Definition at line 341 of file qqmldelegatemodel_p_p.h.

Referenced by delegateChanged(), and emitChanges().

◆ m_waitingToFetchMore

bool QQmlDelegateModelPrivate::m_waitingToFetchMore

Definition at line 343 of file qqmldelegatemodel_p_p.h.

Referenced by requestMoreIfNecessary().

◆ m_watchedRoles

QList<QByteArray> QQmlDelegateModelPrivate::m_watchedRoles

Definition at line 330 of file qqmldelegatemodel_p_p.h.


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