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
QQmlAdaptorModel Class Reference

#include <qqmladaptormodel_p.h>

+ Inheritance diagram for QQmlAdaptorModel:
+ Collaboration diagram for QQmlAdaptorModel:

Classes

class  Accessors
 

Public Member Functions

 QQmlAdaptorModel ()
 
 ~QQmlAdaptorModel ()
 
QVariant model () const
 
void setModel (const QVariant &variant)
 
void invalidateModel ()
 
bool isValid () const
 
int count () const
 
int rowCount () const
 
int columnCount () const
 
int rowAt (int index) const
 
int columnAt (int index) const
 
int indexAt (int row, int column) const
 
void useImportVersion (QTypeRevision revision)
 
bool adaptsAim () const
 
QAbstractItemModelaim ()
 
const QAbstractItemModelaim () const
 
QVariant value (int index, const QString &role) const
 
QQmlDelegateModelItemcreateItem (const QQmlRefPointer< QQmlDelegateModelItemMetaType > &metaType, int index)
 
bool hasProxyObject () const
 
bool notify (const QList< QQmlDelegateModelItem * > &items, int index, int count, const QVector< int > &roles) const
 
void replaceWatchedRoles (const QList< QByteArray > &oldRoles, const QList< QByteArray > &newRoles)
 
QVariant modelIndex (int index) const
 
QVariant parentModelIndex () const
 
bool canFetchMore () const
 
void fetchMore ()
 
- Public Member Functions inherited from QQmlGuard< QObject >
Q_NODISCARD_CTOR QQmlGuard ()
 
Q_NODISCARD_CTOR QQmlGuard (ObjectDestroyedFn objectDestroyed, QObject *)
 
Q_NODISCARD_CTOR QQmlGuard (QObject *)
 
Q_NODISCARD_CTOR QQmlGuard (const QQmlGuard< QObject > &)
 
QQmlGuard< QObject > & operator= (const QQmlGuard< QObject > &o)
 
QQmlGuard< QObject > & operator= (QObject *)
 
QObjectobject () const noexcept
 
void setObject (QObject *g)
 
QObjectoperator-> () const noexcept
 
QObjectoperator* () const
 
 operator QObject * () const noexcept
 
QObjectdata () const noexcept
 
bool isNull () const noexcept
 

Public Attributes

Accessorsaccessors
 
QPersistentModelIndex rootIndex
 
QQmlListAccessor list
 
QV4::PersistentValue modelStrongReference
 
QTypeRevision modelItemRevision = QTypeRevision::zero()
 

Additional Inherited Members

- Protected Types inherited from QQmlGuardImpl
using ObjectDestroyedFn = void(*)(QQmlGuardImpl *)
 
- Protected Member Functions inherited from QQmlGuardImpl
 ~QQmlGuardImpl ()
 
 QQmlGuardImpl ()
 
 QQmlGuardImpl (QObject *)
 
 QQmlGuardImpl (const QQmlGuardImpl &)
 
void addGuard ()
 
void remGuard ()
 
void setObject (QObject *g)
 
bool isNull () const noexcept
 
- Protected Attributes inherited from QQmlGuardImpl
QObjecto = nullptr
 
QQmlGuardImplnext = nullptr
 
QQmlGuardImpl ** prev = nullptr
 
ObjectDestroyedFn objectDestroyed = nullptr
 

Detailed Description

Definition at line 37 of file qqmladaptormodel_p.h.

Constructor & Destructor Documentation

◆ QQmlAdaptorModel()

QQmlAdaptorModel::QQmlAdaptorModel ( )

Definition at line 16 of file qqmladaptormodel.cpp.

◆ ~QQmlAdaptorModel()

QQmlAdaptorModel::~QQmlAdaptorModel ( )

Definition at line 22 of file qqmladaptormodel.cpp.

References accessors, and QQmlAdaptorModel::Accessors::cleanup().

+ Here is the call graph for this function:

Member Function Documentation

◆ adaptsAim()

bool QQmlAdaptorModel::adaptsAim ( ) const
inline

Definition at line 105 of file qqmladaptormodel_p.h.

Referenced by QQmlTableInstanceModel::abstractItemModel(), QQmlDelegateModelPrivate::connectToAbstractItemModel(), and QQmlDelegateModelPrivate::disconnectFromAbstractItemModel().

+ Here is the caller graph for this function:

◆ aim() [1/2]

◆ aim() [2/2]

const QAbstractItemModel * QQmlAdaptorModel::aim ( ) const
inline

Definition at line 107 of file qqmladaptormodel_p.h.

◆ canFetchMore()

bool QQmlAdaptorModel::canFetchMore ( ) const
inline

Definition at line 134 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::canFetchMore().

Referenced by QQmlDelegateModelPrivate::requestMoreIfNecessary().

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

◆ columnAt()

int QQmlAdaptorModel::columnAt ( int index) const

Definition at line 97 of file qqmladaptormodel.cpp.

References count(), and rowCount().

Referenced by VDMAbstractItemModelDataType::modelIndex(), QQmlTableInstanceModel::reuseItem(), and VDMAbstractItemModelDataType::value().

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

◆ columnCount()

int QQmlAdaptorModel::columnCount ( ) const

Definition at line 86 of file qqmladaptormodel.cpp.

References accessors, QQmlAdaptorModel::Accessors::columnCount(), and qMax().

Referenced by count().

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

◆ count()

int QQmlAdaptorModel::count ( ) const

Definition at line 76 of file qqmladaptormodel.cpp.

References columnCount(), and rowCount().

Referenced by columnAt(), QQmlTableInstanceModel::object(), and rowAt().

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

◆ createItem()

QQmlDelegateModelItem * QQmlAdaptorModel::createItem ( const QQmlRefPointer< QQmlDelegateModelItemMetaType > & metaType,
int index )
inline

Definition at line 111 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::createItem().

Referenced by QQmlDelegateModelPrivate::insert(), and QQmlDelegateModelPrivate::object().

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

◆ fetchMore()

void QQmlAdaptorModel::fetchMore ( )
inline

Definition at line 135 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::fetchMore().

+ Here is the call graph for this function:

◆ hasProxyObject()

bool QQmlAdaptorModel::hasProxyObject ( ) const
inline

Definition at line 116 of file qqmladaptormodel_p.h.

References QQmlListAccessor::Instance, list, QQmlListAccessor::ListProperty, and QQmlListAccessor::ObjectList.

Referenced by QQmlDelegateModelPrivate::object().

+ Here is the caller graph for this function:

◆ indexAt()

int QQmlAdaptorModel::indexAt ( int row,
int column ) const

Definition at line 103 of file qqmladaptormodel.cpp.

References rowCount().

+ Here is the call graph for this function:

◆ invalidateModel()

void QQmlAdaptorModel::invalidateModel ( )

Definition at line 63 of file qqmladaptormodel.cpp.

References accessors, and QQmlAdaptorModel::Accessors::cleanup().

+ Here is the call graph for this function:

◆ isValid()

bool QQmlAdaptorModel::isValid ( ) const

Definition at line 71 of file qqmladaptormodel.cpp.

References accessors.

◆ model()

QVariant QQmlAdaptorModel::model ( ) const
inline

Definition at line 91 of file qqmladaptormodel_p.h.

References list.

Referenced by QQmlTableInstanceModel::model().

+ Here is the caller graph for this function:

◆ modelIndex()

QVariant QQmlAdaptorModel::modelIndex ( int index) const
inline

Definition at line 132 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::modelIndex().

+ Here is the call graph for this function:

◆ notify()

bool QQmlAdaptorModel::notify ( const QList< QQmlDelegateModelItem * > & items,
int index,
int count,
const QVector< int > & roles ) const
inline

Definition at line 122 of file qqmladaptormodel_p.h.

References items, and QQmlAdaptorModel::Accessors::notify().

Referenced by QQmlTableInstanceModel::reuseItem(), and QQmlDelegateModelPrivate::reuseItem().

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

◆ parentModelIndex()

QVariant QQmlAdaptorModel::parentModelIndex ( ) const
inline

Definition at line 133 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::parentModelIndex().

+ Here is the call graph for this function:

◆ replaceWatchedRoles()

void QQmlAdaptorModel::replaceWatchedRoles ( const QList< QByteArray > & oldRoles,
const QList< QByteArray > & newRoles )
inline

Definition at line 128 of file qqmladaptormodel_p.h.

References oldRoles, and QQmlAdaptorModel::Accessors::replaceWatchedRoles().

+ Here is the call graph for this function:

◆ rowAt()

int QQmlAdaptorModel::rowAt ( int index) const

Definition at line 91 of file qqmladaptormodel.cpp.

References count(), and rowCount().

Referenced by VDMAbstractItemModelDataType::modelIndex(), QQmlTableInstanceModel::reuseItem(), and VDMAbstractItemModelDataType::value().

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

◆ rowCount()

int QQmlAdaptorModel::rowCount ( ) const

Definition at line 81 of file qqmladaptormodel.cpp.

References accessors, qMax(), and QQmlAdaptorModel::Accessors::rowCount().

Referenced by QQmlDelegateModelPrivate::adaptorModelCount(), columnAt(), count(), indexAt(), and rowAt().

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

◆ setModel()

void QQmlAdaptorModel::setModel ( const QVariant & variant)

Definition at line 27 of file qqmladaptormodel.cpp.

References accessors, QQmlAdaptorModel::Accessors::cleanup(), QV4::PersistentValue::clear(), QVariant::constData(), QQmlData::get(), QQmlListAccessor::Instance, QQmlListAccessor::Invalid, list, QQmlListAccessor::list(), QQmlListAccessor::ListProperty, modelStrongReference, QQmlListAccessor::ObjectList, QQmlListAccessor::setList(), QQmlGuard< QObject >::setObject(), QQmlListAccessor::type(), and variant.

Referenced by QQmlTableInstanceModel::setModel().

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

◆ useImportVersion()

void QQmlAdaptorModel::useImportVersion ( QTypeRevision revision)

Definition at line 108 of file qqmladaptormodel.cpp.

References modelItemRevision.

Referenced by QQmlTableInstanceModel::useImportVersion().

+ Here is the caller graph for this function:

◆ value()

QVariant QQmlAdaptorModel::value ( int index,
const QString & role ) const
inline

Definition at line 109 of file qqmladaptormodel_p.h.

References QQmlAdaptorModel::Accessors::value().

+ Here is the call graph for this function:

Member Data Documentation

◆ accessors

Accessors* QQmlAdaptorModel::accessors

◆ list

◆ modelItemRevision

◆ modelStrongReference

QV4::PersistentValue QQmlAdaptorModel::modelStrongReference

Definition at line 84 of file qqmladaptormodel_p.h.

Referenced by setModel().

◆ rootIndex


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