|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <ObjectItemModelBase.h>
Inheritance diagram for ObjectItemModelBase:
Collaboration diagram for ObjectItemModelBase:Signals | |
| void | countChanged (int count) |
| void | dirtyChanged (bool dirty) |
Public Member Functions | |
| ObjectItemModelBase (QObject *parent=nullptr) | |
| ~ObjectItemModelBase () override | |
| int count READ count NOTIFY | countChanged (bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) bool dirty() const |
| void | beginResetModel () |
| Depth-counted beginResetModel — only the outermost call has effect. | |
| void | endResetModel () |
| Depth-counted endResetModel — only the outermost call has effect. | |
| virtual int | count () const =0 |
| virtual bool | isEmpty () const |
| virtual void | setDirty (bool dirty)=0 |
| virtual void | clear ()=0 |
Protected Slots | |
| void | _childDirtyChanged (bool dirty) |
Protected Member Functions | |
| QHash< int, QByteArray > | roleNames () const override |
| void | _signalCountChangedIfNotNested () |
Protected Attributes | |
| bool | _dirty = false |
| uint | _resetModelNestingCount = 0 |
Static Protected Attributes | |
| static constexpr int | ObjectRole = Qt::UserRole |
| static constexpr int | TextRole = Qt::UserRole + 1 |
Common base for QObject*-based item models (flat lists and trees). Provides: dirty tracking, depth-counted begin/endResetModel, shared role constants, roleNames.
Definition at line 20 of file ObjectItemModelBase.h.
|
explicit |
Definition at line 17 of file ObjectItemModelBase.cc.
|
override |
Definition at line 23 of file ObjectItemModelBase.cc.
References _resetModelNestingCount.
|
protectedslot |
Definition at line 38 of file ObjectItemModelBase.cc.
References _dirty, and dirtyChanged().
|
protected |
Definition at line 69 of file ObjectItemModelBase.cc.
References _resetModelNestingCount, count(), and countChanged().
Referenced by QmlObjectTreeModel::insertItem(), QmlObjectListModel::insertRows(), QmlObjectTreeModel::removeChildren(), QmlObjectTreeModel::removeItem(), and QmlObjectListModel::removeRows().
| void ObjectItemModelBase::beginResetModel | ( | ) |
Depth-counted beginResetModel — only the outermost call has effect.
Definition at line 44 of file ObjectItemModelBase.cc.
References _resetModelNestingCount.
Referenced by QGCMapPolygon::beginReset(), QGCMapPolyline::beginReset(), QmlObjectTreeModel::clear(), QmlObjectListModel::clear(), QmlObjectTreeModel::clearAndDeleteContents(), and QmlObjectListModel::swapObjectList().
|
pure virtual |
Implemented in QmlObjectTreeModel, and QmlObjectListModel.
|
pure virtual |
Implemented in QmlObjectTreeModel, and QmlObjectListModel.
Referenced by _signalCountChangedIfNotNested(), and endResetModel().
|
inline |
Definition at line 28 of file ObjectItemModelBase.h.
Referenced by _signalCountChangedIfNotNested(), endResetModel(), GeoFenceController::GeoFenceController(), and RallyPointController::RallyPointController().
|
signal |
|
signal |
| void ObjectItemModelBase::endResetModel | ( | ) |
Depth-counted endResetModel — only the outermost call has effect.
Definition at line 54 of file ObjectItemModelBase.cc.
References _resetModelNestingCount, count(), and countChanged().
Referenced by QmlObjectTreeModel::clear(), QmlObjectListModel::clear(), QmlObjectTreeModel::clearAndDeleteContents(), QGCMapPolygon::endReset(), QGCMapPolyline::endReset(), and QmlObjectListModel::swapObjectList().
|
inlinevirtual |
Reimplemented in QmlObjectListModel.
Definition at line 40 of file ObjectItemModelBase.h.
|
overrideprotected |
Definition at line 30 of file ObjectItemModelBase.cc.
References ObjectRole, and TextRole.
Referenced by QmlObjectTreeModel::roleNames().
|
pure virtual |
Implemented in QmlObjectTreeModel, and QmlObjectListModel.
|
protected |
Definition at line 55 of file ObjectItemModelBase.h.
Referenced by _childDirtyChanged(), QmlObjectTreeModel::setDirty(), and QmlObjectListModel::setDirty().
|
protected |
Definition at line 56 of file ObjectItemModelBase.h.
Referenced by _signalCountChangedIfNotNested(), beginResetModel(), endResetModel(), QmlObjectTreeModel::insertItem(), QmlObjectTreeModel::removeChildren(), and ~ObjectItemModelBase().
|
staticconstexprprotected |
Definition at line 58 of file ObjectItemModelBase.h.
Referenced by QmlObjectListModel::data(), QmlObjectTreeModel::data(), roleNames(), QmlObjectListModel::setData(), and QmlObjectTreeModel::setData().
|
staticconstexprprotected |
Definition at line 59 of file ObjectItemModelBase.h.
Referenced by QmlObjectListModel::data(), QmlObjectTreeModel::data(), and roleNames().