|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <QmlObjectListModel.h>
Inheritance diagram for QmlObjectListModel:
Collaboration diagram for QmlObjectListModel:Public Member Functions | |
| QmlObjectListModel (QObject *parent=nullptr) | |
| int | count () const override final |
| bool | isEmpty () const override final |
| void | setDirty (bool dirty) override final |
| void | clear () override final |
| QObject * | removeOne (const QObject *object) override final |
| bool | contains (const QObject *object) override final |
| void | clearAndDeleteContents () override final |
| Clears the list and calls deleteLater on each entry. | |
| QObject * | get (int index) |
| QObject * | operator[] (int index) |
| const QObject * | operator[] (int index) const |
| void | append (QObject *object) |
| Caller maintains responsibility for object ownership and deletion. | |
| void | append (QList< QObject * > objects) |
| Caller maintains responsibility for object ownership and deletion. | |
| QObjectList | swapObjectList (const QObjectList &newlist) |
| QObject * | removeAt (int index) |
| void | insert (int index, QObject *object) |
| void | insert (int index, QList< QObject * > objects) |
| int | indexOf (const QObject *object) |
| void | move (int from, int to) |
| template<class T > | |
| T | value (int index) const |
| QList< QObject * > * | objectList () |
Public Member Functions inherited from ObjectListModelBase | |
| ObjectListModelBase (QObject *parent=nullptr) | |
| ~ObjectListModelBase () override | |
| QModelIndex | index (int row, int column=0, const QModelIndex &parent=QModelIndex()) const override |
| QModelIndex | parent (const QModelIndex &child) const override |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| bool | hasChildren (const QModelIndex &parent=QModelIndex()) const override |
Public Member Functions inherited from ObjectItemModelBase | |
| 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. | |
Protected Member Functions | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) override |
| bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
Protected Member Functions inherited from ObjectItemModelBase | |
| QHash< int, QByteArray > | roleNames () const override |
| void | _signalCountChangedIfNotNested () |
Additional Inherited Members | |
Signals inherited from ObjectItemModelBase | |
| void | countChanged (int count) |
| void | dirtyChanged (bool dirty) |
Protected Slots inherited from ObjectItemModelBase | |
| void | _childDirtyChanged (bool dirty) |
Protected Attributes inherited from ObjectListModelBase | |
| bool | _skipDirtyFirstItem = false |
Protected Attributes inherited from ObjectItemModelBase | |
| bool | _dirty = false |
| uint | _resetModelNestingCount = 0 |
Static Protected Attributes inherited from ObjectItemModelBase | |
| static constexpr int | ObjectRole = Qt::UserRole |
| static constexpr int | TextRole = Qt::UserRole + 1 |
Definition at line 9 of file QmlObjectListModel.h.
| QmlObjectListModel::QmlObjectListModel | ( | QObject * | parent = nullptr | ) |
Definition at line 53 of file QmlObjectListModel.cc.
Caller maintains responsibility for object ownership and deletion.
Definition at line 238 of file QmlObjectListModel.cc.
References ObjectListModelBase::index(), and insert().
| void QmlObjectListModel::append | ( | QObject * | object | ) |
Caller maintains responsibility for object ownership and deletion.
Definition at line 233 of file QmlObjectListModel.cc.
References insert().
Referenced by ComplexMissionItem::_appendFlightPathSegment(), ActuatorOutputs::ActuatorOutputChannel::ActuatorOutputChannel(), ActuatorActions::ActionGroup::addAction(), ActuatorOutputs::ActuatorOutputSubgroup::addChannel(), Mixer::MixerConfigGroup::addChannel(), ActuatorOutputs::ActuatorOutputSubgroup::addChannelConfig(), Mixer::MixerConfigGroup::addChannelConfig(), ActuatorOutputs::ActuatorOutputSubgroup::addConfigParam(), ActuatorOutputs::ActuatorOutput::addConfigParam(), Mixer::MixerConfigGroup::addConfigParam(), GeoFenceController::addInclusionCircle(), ActuatorOutputs::ActuatorOutput::addSubgroup(), ADSBVehicleManager::adsbVehicleUpdate(), FactValueGrid::appendColumn(), FactValueGrid::appendRow(), QGCMapPolygon::appendVertex(), QGCMapPolyline::appendVertex(), QGCMapPolygon::appendVertices(), QGCMapPolyline::appendVertices(), VehicleCameraControl::handleVideoStreamInformation(), MissionController::insertTakeoffItem(), GeoFenceController::load(), QGCMapPolygon::loadFromJson(), QGCMapPolyline::loadFromJson(), JsonHelper::loadPolygon(), Mixer::MixerChannel::MixerChannel(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), Mixer::Mixers::update(), HealthAndArmingCheckReport::update(), and ActuatorTesting::ActuatorTest::updateFunctions().
|
finaloverridevirtual |
Implements ObjectItemModelBase.
Definition at line 174 of file QmlObjectListModel.cc.
References ObjectItemModelBase::beginResetModel(), and ObjectItemModelBase::endResetModel().
Referenced by BatteryFactGroupListModel::_shouldHandleMessage(), EscStatusFactGroupListModel::_shouldHandleMessage(), and clearAndDeleteContents().
|
finaloverridevirtual |
Clears the list and calls deleteLater on each entry.
Implements ObjectListModelBase.
Definition at line 273 of file QmlObjectListModel.cc.
References clear(), and ObjectListModelBase::index().
Referenced by JsonHelper::loadPolygon(), LogDownloadController::refresh(), GeoFenceController::removeAll(), MissionController::removeAll(), RallyPointController::removeAll(), Mixer::Mixers::reset(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), Mixer::Mixers::update(), HealthAndArmingCheckReport::update(), ActuatorTesting::ActuatorTest::updateFunctions(), ActuatorTesting::ActuatorTest::~ActuatorTest(), HealthAndArmingCheckReport::~HealthAndArmingCheckReport(), Joystick::~Joystick(), and MAVLinkInspectorController::~MAVLinkInspectorController().
Implements ObjectListModelBase.
Definition at line 24 of file QmlObjectListModel.h.
|
finaloverridevirtual |
Implements ObjectItemModelBase.
Definition at line 252 of file QmlObjectListModel.cc.
References rowCount().
Referenced by FactGroupListModel::_findOrAddFactGroupById(), VehicleCameraControl::_findStream(), VehicleCameraControl::_findStream(), LandingComplexItem::_scanForItem(), LandingComplexItem::_scanForItems(), QGCCameraManager::_stepCamera(), QGCCameraManager::_stepStream(), VehicleCameraControl::_streamInfoTimeout(), ActuatorOutputs::ActuatorOutputChannel::ActuatorOutputChannel(), Mixer::ChannelConfigInstanceVirtualAxis::allInstancesInitialized(), FactValueGrid::appendRow(), MissionController::applyDefaultMissionAltitude(), Mixer::MixerChannel::applyRule(), VehicleCameraControl::autoStream(), GeoFenceController::clearAllInteractive(), GeoFenceController::containsItems(), MissionController::containsItems(), RallyPointController::containsItems(), GeoFenceController::deleteCircle(), FactValueGrid::deleteLastColumn(), FactValueGrid::deleteLastRow(), GeoFenceController::deletePolygon(), QGCLoggingCategoryManager::disableAllCategories(), QGCMapPolygon::empty(), QGCMapPolyline::empty(), ActuatorOutputs::ActuatorOutput::forEachOutputFunction(), Mixer::MixerChannel::getFact(), Mixer::Mixers::getFunctions(), Mixer::MixerChannel::getGeometry(), Mixer::Mixers::getSpecificLabelForFunction(), VehicleCameraControl::handleVideoStreamInformation(), Actuators::init(), MotorAssignment::initAssignment(), GeoFenceController::isEmpty(), MissionController::isEmpty(), RallyPointController::isEmpty(), MissionController::isFirstLandingComplexItem(), QGCMapPolygon::isValid(), QGCMapPolyline::isValid(), Mixer::MixerChannel::MixerChannel(), move(), QGCMapPolygon::nedPolygon(), MissionController::offsetMission(), Actuators::parametersChanged(), MissionController::readyForSaveState(), RallyPointController::removePoint(), MissionController::repositionMission(), MissionController::resumeMissionIndex(), MissionController::rotateMission(), GeoFenceController::save(), MissionController::save(), RallyPointController::save(), JsonHelper::savePolygon(), MissionSettingsItem::scanForMissionSettings(), CameraSection::scanForSection(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), CameraSection::scanStopTakingVideo(), Actuators::selectedActuatorOutput(), MissionController::sendToVehicle(), RallyPointController::sendToVehicle(), MissionController::setCurrentPlanViewSeqNum(), GeoFenceController::setDirty(), SubtitleWriter::startCapturingTelemetry(), VehicleCameraControl::thermalStreamInstance(), Mixer::Mixers::update(), and TerrainProfile::updatePaintNode().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 75 of file QmlObjectListModel.cc.
References ObjectListModelBase::index(), ObjectItemModelBase::ObjectRole, and ObjectItemModelBase::TextRole.
| QObject * QmlObjectListModel::get | ( | int | index | ) |
Definition at line 59 of file QmlObjectListModel.cc.
References ObjectListModelBase::index().
Referenced by QGCLoggingCategoryManager::disableAllCategories(), ActuatorOutputs::ActuatorOutput::forEachOutputFunction(), Actuators::init(), MotorAssignment::initAssignment(), MissionController::isFirstLandingComplexItem(), MissionController::offsetMission(), Actuators::parametersChanged(), MissionController::readyForSaveState(), MissionController::repositionMission(), MissionController::rotateMission(), MissionController::save(), Joystick::setButtonAction(), and MissionController::setCurrentPlanViewSeqNum().
Definition at line 37 of file QmlObjectListModel.h.
Referenced by QGCCameraManager::_checkForLostCameras(), and QGCLoggingCategoryManager::registerCategory().
Definition at line 210 of file QmlObjectListModel.cc.
References ObjectListModelBase::_skipDirtyFirstItem, ObjectListModelBase::index(), insertRows(), and setDirty().
Definition at line 194 of file QmlObjectListModel.cc.
References ObjectListModelBase::_skipDirtyFirstItem, ObjectListModelBase::index(), insertRows(), and setDirty().
Referenced by FactGroupListModel::_findOrAddFactGroupById(), LandingComplexItem::_scanForItem(), append(), append(), MissionController::insertTakeoffItem(), QGCMapPolygon::splitPolygonSegment(), QGCMapPolyline::splitSegment(), and Mixer::Mixers::update().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 105 of file QmlObjectListModel.cc.
References ObjectItemModelBase::_signalCountChangedIfNotNested(), ObjectListModelBase::index(), and ObjectListModelBase::parent().
|
inlinefinaloverridevirtual |
Reimplemented from ObjectItemModelBase.
Definition at line 20 of file QmlObjectListModel.h.
Referenced by QGCCameraManager::_checkForLostCameras().
Definition at line 142 of file QmlObjectListModel.cc.
References count(), and ObjectListModelBase::index().
|
inline |
Definition at line 40 of file QmlObjectListModel.h.
| QObject * QmlObjectListModel::operator[] | ( | int | index | ) |
Definition at line 158 of file QmlObjectListModel.cc.
References ObjectListModelBase::index().
| const QObject * QmlObjectListModel::operator[] | ( | int | index | ) | const |
Definition at line 166 of file QmlObjectListModel.cc.
References ObjectListModelBase::index().
| QObject * QmlObjectListModel::removeAt | ( | int | index | ) |
Definition at line 181 of file QmlObjectListModel.cc.
References ObjectListModelBase::_skipDirtyFirstItem, ObjectListModelBase::index(), removeRows(), and setDirty().
Referenced by QGCCameraManager::_checkForLostCameras(), LandingComplexItem::_scanForItem(), GeoFenceController::deleteCircle(), FactValueGrid::deleteLastColumn(), FactValueGrid::deleteLastRow(), GeoFenceController::deletePolygon(), Actuators::init(), QGCMapPolygon::removeVertex(), QGCMapPolyline::removeVertex(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), and CameraSection::scanStopTakingVideo().
|
inlinefinaloverridevirtual |
Implements ObjectListModelBase.
Definition at line 23 of file QmlObjectListModel.h.
Referenced by RallyPointController::removePoint().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 121 of file QmlObjectListModel.cc.
References ObjectItemModelBase::_signalCountChangedIfNotNested(), ObjectListModelBase::index(), and ObjectListModelBase::parent().
Referenced by removeAt().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 68 of file QmlObjectListModel.cc.
References ObjectListModelBase::index(), and ObjectListModelBase::parent().
Referenced by count().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 94 of file QmlObjectListModel.cc.
References ObjectListModelBase::index(), ObjectItemModelBase::ObjectRole, and value().
Implements ObjectItemModelBase.
Definition at line 257 of file QmlObjectListModel.cc.
References ObjectItemModelBase::_dirty, ObjectItemModelBase::dirtyChanged(), and ObjectListModelBase::index().
Referenced by insert(), insert(), removeAt(), QGCMapPolygon::setDirty(), QGCMapPolyline::setDirty(), and MissionController::setDirty().
| QObjectList QmlObjectListModel::swapObjectList | ( | const QObjectList & | newlist | ) |
Definition at line 243 of file QmlObjectListModel.cc.
References ObjectItemModelBase::beginResetModel(), ObjectItemModelBase::endResetModel(), and ObjectListModelBase::index().
Referenced by RallyPointController::load().
Definition at line 39 of file QmlObjectListModel.h.
Referenced by LandingComplexItem::_scanForItem(), ActuatorOutputs::ActuatorOutputChannel::ActuatorOutputChannel(), QGCMapPolygon::adjustVertex(), QGCMapPolyline::adjustVertex(), Mixer::ChannelConfigInstanceVirtualAxis::allInstancesInitialized(), FactValueGrid::appendRow(), MissionController::applyDefaultMissionAltitude(), Mixer::MixerChannel::applyRule(), GeoFenceController::clearAllInteractive(), FactValueGrid::deleteLastRow(), Mixer::MixerChannel::getFact(), Mixer::Mixers::getFunctions(), Mixer::MixerChannel::getGeometry(), Mixer::Mixers::getSpecificLabelForFunction(), Mixer::MixerChannel::MixerChannel(), MissionController::resumeMissionIndex(), GeoFenceController::save(), MissionController::save(), JsonHelper::savePolygon(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), CameraSection::scanStopTakingVideo(), Actuators::selectedActuatorOutput(), setData(), GeoFenceController::setDirty(), SubtitleWriter::startCapturingTelemetry(), Mixer::Mixers::update(), and TerrainProfile::updatePaintNode().