![]() |
Qt 6.x
The Qt SDK
|
#include <qqmllistmodel_p_p.h>
Public Types | |
enum class | SetElement { WasJustInserted , IsCurrentlyUpdated } |
Static Public Member Functions | |
static bool | sync (ListModel *src, ListModel *target) |
Friends | |
class | ListElement |
class | QQmlListModelWorkerAgent |
class | QQmlListModelParser |
Definition at line 314 of file qqmllistmodel_p_p.h.
|
strong |
Enumerator | |
---|---|
WasJustInserted | |
IsCurrentlyUpdated |
Definition at line 356 of file qqmllistmodel_p_p.h.
ListModel::ListModel | ( | ListLayout * | layout, |
QQmlListModel * | modelCache | ||
) |
Definition at line 472 of file qqmllistmodel.cpp.
|
inline |
Definition at line 319 of file qqmllistmodel_p_p.h.
int ListModel::append | ( | QV4::Object * | object | ) |
Definition at line 769 of file qqmllistmodel.cpp.
References appendElement(), set, and WasJustInserted.
Referenced by QQmlListModel::append(), set(), and set().
int ListModel::appendElement | ( | ) |
Definition at line 487 of file qqmllistmodel.cpp.
References QPODVector< T, Increment >::count().
Referenced by append().
void ListModel::destroy | ( | ) |
Definition at line 476 of file qqmllistmodel.cpp.
References QPODVector< T, Increment >::count(), and remove().
Referenced by QQmlListModel::~QQmlListModel().
|
inline |
Definition at line 351 of file qqmllistmodel_p_p.h.
References QPODVector< T, Increment >::count().
Referenced by QQmlListModel::append(), and QQmlListModel::count().
|
inline |
Definition at line 336 of file qqmllistmodel_p_p.h.
References ListLayout::getExistingRole().
Referenced by QV4::ModelObjectOwnPropertyKeyIterator::next(), QQmlListModel::roleNames(), QQmlListModel::setData(), ModelNodeMetaObject::updateValues(), and ModelNodeMetaObject::updateValues().
|
inline |
Definition at line 341 of file qqmllistmodel_p_p.h.
References ListLayout::getExistingRole().
ListModel * ListModel::getListProperty | ( | int | elementIndex, |
const ListLayout::Role & | role | ||
) |
Definition at line 551 of file qqmllistmodel.cpp.
References e.
Referenced by ListElement::sync().
|
inline |
Definition at line 346 of file qqmllistmodel_p_p.h.
References ListLayout::getRoleOrCreate(), and ListLayout::Role::List.
QObject * ListModel::getOrCreateModelObject | ( | QQmlListModel * | model, |
int | elementIndex | ||
) |
Definition at line 315 of file qqmllistmodel.cpp.
References QObjectPrivate::declarativeData, QQmlData::DoesNotOwnMemory, e, elements, QObjectPrivate::get(), model, Q_ASSERT, and void.
Referenced by QQmlListModel::get().
QVariant ListModel::getProperty | ( | int | elementIndex, |
int | roleIndex, | ||
const QQmlListModel * | owner, | ||
QV4::ExecutionEngine * | eng | ||
) |
Definition at line 542 of file qqmllistmodel.cpp.
References e, ListLayout::getExistingRole(), and ListLayout::roleCount().
Referenced by QQmlListModel::data().
void ListModel::insert | ( | int | elementIndex, |
QV4::Object * | object | ||
) |
Definition at line 763 of file qqmllistmodel.cpp.
References insertElement(), set, and WasJustInserted.
Referenced by QQmlListModel::insert(), and QQmlListModel::set().
void ListModel::insertElement | ( | int | index | ) |
Definition at line 494 of file qqmllistmodel.cpp.
Referenced by insert().
void ListModel::move | ( | int | from, |
int | to, | ||
int | n | ||
) |
Definition at line 500 of file qqmllistmodel.cpp.
References QPODVector< T, Increment >::append(), QPODVector< T, Increment >::count(), and i.
Referenced by QQmlListModel::move().
Definition at line 747 of file qqmllistmodel.cpp.
References QPODVector< T, Increment >::append(), i, layout, QPODVector< T, Increment >::remove(), and void.
Referenced by destroy().
|
inline |
Definition at line 331 of file qqmllistmodel_p_p.h.
References ListLayout::roleCount().
Referenced by QQmlListModel::roleNames(), and ModelNodeMetaObject::updateValues().
void ListModel::set | ( | int | elementIndex, |
QV4::Object * | object, | ||
QVector< int > * | roles | ||
) |
Definition at line 568 of file qqmllistmodel.cpp.
References QList< T >::append(), append(), arrayLength(), QV4::Value::as(), QV4::StaticValue::asDouble(), ListLayout::Role::Bool, QV4::StaticValue::booleanValue(), ListLayout::Role::DateTime, e, QV4::ObjectIterator::EnumerableOnly, ListLayout::Role::Function, ListLayout::getExistingRole(), ListLayout::getRoleOrCreate(), QV4::StaticValue::isBoolean(), QV4::StaticValue::isNullOrUndefined(), QV4::StaticValue::isNumber(), it, j, ListLayout::Role::List, mo, ListLayout::Role::Number, o, ListLayout::Role::QObject, QJSValuePrivate::setValue(), ListLayout::Role::String, QV4::ExecutionEngine::toVariant(), ListLayout::Role::type, url, ListLayout::Role::Url, ListLayout::Role::VariantMap, and wrapper().
Referenced by QQmlListModel::set().
void ListModel::set | ( | int | elementIndex, |
QV4::Object * | object, | ||
ListModel::SetElement | reason = SetElement::IsCurrentlyUpdated |
||
) |
Definition at line 654 of file qqmllistmodel.cpp.
References append(), arg, arrayLength(), QV4::Value::as(), QV4::StaticValue::asDouble(), ListLayout::Role::Bool, QV4::StaticValue::booleanValue(), date, ListLayout::Role::DateTime, e, QV4::ObjectIterator::EnumerableOnly, QString::fromLatin1(), ListLayout::getExistingRole(), ListLayout::getRoleOrCreate(), QV4::StaticValue::isBoolean(), QV4::StaticValue::isNull(), QV4::StaticValue::isNullOrUndefined(), QV4::StaticValue::isNumber(), it, j, ListLayout::Role::List, QVariant::metaType(), ListLayout::Role::Number, o, qmlWarning(), ListLayout::Role::QObject, QQmlError::setDescription(), ListLayout::Role::String, QV4::Value::stringValue(), QVariant::toUrl(), QV4::ExecutionEngine::toVariant(), ListLayout::Role::type, url, ListLayout::Role::Url, ListLayout::Role::VariantMap, WasJustInserted, and wrapper().
int ListModel::setExistingProperty | ( | int | uid, |
const QString & | key, | ||
const QV4::Value & | data, | ||
QV4::ExecutionEngine * | eng | ||
) |
Definition at line 797 of file qqmllistmodel.cpp.
References QPODVector< T, Increment >::count(), e, and ListLayout::getExistingRole().
Referenced by ModelNodeMetaObject::propertyWritten().
Definition at line 776 of file qqmllistmodel.cpp.
References cache, QPODVector< T, Increment >::count(), e, and ListLayout::getRoleOrCreate().
Referenced by QQmlListModel::setData(), and QQmlListModel::setProperty().
Definition at line 333 of file qqmllistmodel.cpp.
References QAbstractItemModel::beginInsertRows(), QAbstractItemModel::beginMoveRows(), QAbstractItemModel::beginRemoveRows(), QAbstractItemModel::createIndex(), QAbstractItemModel::dataChanged(), e, QHash< Key, T >::end(), QAbstractItemModel::endInsertRows(), QAbstractItemModel::endMoveRows(), QAbstractItemModel::endRemoveRows(), QHash< Key, T >::find(), i, QHash< Key, T >::insert(), it, j, mo, Q_ASSERT, ListElement::sync(), ListLayout::sync(), and QHash< Key, T >::iterator::value().
Referenced by QQmlListModelWorkerAgent::event(), and ListElement::sync().
void ListModel::updateTranslations | ( | ) |
Definition at line 557 of file qqmllistmodel.cpp.
References cache, QPODVector< T, Increment >::count(), and e.
|
friend |
Definition at line 394 of file qqmllistmodel_p_p.h.
|
friend |
Definition at line 396 of file qqmllistmodel_p_p.h.
|
friend |
Definition at line 395 of file qqmllistmodel_p_p.h.