Base class for flat QObject* list models. Inherits common dirty/reset/role handling from ObjectItemModelBase and adds flat-list index()/parent() overrides.
More...
#include <ObjectListModelBase.h>
|
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override=0 |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override=0 |
| bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) override=0 |
| bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) override=0 |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override=0 |
| QHash< int, QByteArray > | roleNames () const override |
| void | _signalCountChangedIfNotNested () |
Base class for flat QObject* list models. Inherits common dirty/reset/role handling from ObjectItemModelBase and adds flat-list index()/parent() overrides.
Definition at line 8 of file ObjectListModelBase.h.
◆ ObjectListModelBase()
| ObjectListModelBase::ObjectListModelBase |
( |
QObject * | parent = nullptr | ) |
|
◆ ~ObjectListModelBase()
| ObjectListModelBase::~ObjectListModelBase |
( |
| ) |
|
|
override |
◆ clearAndDeleteContents()
| virtual void ObjectListModelBase::clearAndDeleteContents |
( |
| ) |
|
|
pure virtual |
◆ columnCount()
| int ObjectListModelBase::columnCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ contains()
| virtual bool ObjectListModelBase::contains |
( |
const QObject * | object | ) |
|
|
pure virtual |
◆ data()
| QVariant ObjectListModelBase::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
overrideprotectedpure virtual |
◆ hasChildren()
| bool ObjectListModelBase::hasChildren |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ index()
| QModelIndex ObjectListModelBase::index |
( |
int | row, |
|
|
int | column = 0, |
|
|
const QModelIndex & | parent = QModelIndex() ) const |
|
override |
Definition at line 26 of file ObjectListModelBase.cc.
References parent(), and rowCount().
Referenced by EscStatusFactGroupListModel::_shouldHandleMessage(), data(), QmlObjectListModel::data(), QmlObjectListModel::get(), insertRows(), QmlObjectListModel::operator[](), QmlObjectListModel::operator[](), removeRows(), setData(), QmlObjectListModel::setData(), and QmlObjectListModel::value().
◆ insertRows()
| bool ObjectListModelBase::insertRows |
( |
int | position, |
|
|
int | rows, |
|
|
const QModelIndex & | index = QModelIndex() ) |
|
overrideprotectedpure virtual |
◆ parent()
| QModelIndex ObjectListModelBase::parent |
( |
const QModelIndex & | child | ) |
const |
|
override |
Definition at line 34 of file ObjectListModelBase.cc.
Referenced by BatteryFactGroupListModel::BatteryFactGroupListModel(), columnCount(), contains(), EscStatusFactGroupListModel::EscStatusFactGroupListModel(), FactGroupListModel::FactGroupListModel(), hasChildren(), index(), QmlObjectListModel::insertRows(), ObjectListModelBase(), QmlObjectListModel::QmlObjectListModel(), QmlObjectListModel::removeRows(), rowCount(), and QmlObjectListModel::rowCount().
◆ removeOne()
| virtual QObject * ObjectListModelBase::removeOne |
( |
const QObject * | object | ) |
|
|
pure virtual |
◆ removeRows()
| bool ObjectListModelBase::removeRows |
( |
int | position, |
|
|
int | rows, |
|
|
const QModelIndex & | index = QModelIndex() ) |
|
overrideprotectedpure virtual |
◆ rowCount()
| int ObjectListModelBase::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
overrideprotectedpure virtual |
◆ setData()
| bool ObjectListModelBase::setData |
( |
const QModelIndex & | index, |
|
|
const QVariant & | value, |
|
|
int | role = Qt::EditRole ) |
|
overrideprotectedpure virtual |
◆ _skipDirtyFirstItem
| bool ObjectListModelBase::_skipDirtyFirstItem = false |
|
protected |
The documentation for this class was generated from the following files: