|
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. | |
| Q_INVOKABLE 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 | |
| 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 5 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 244 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 239 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(), LinkManager::addConfiguration(), GeoFenceController::addInclusionCircle(), GeoFenceController::addInclusionPolygon(), RallyPointController::addPoint(), ActuatorOutputs::ActuatorOutput::addSubgroup(), ADSBVehicleManager::adsbVehicleUpdate(), FactValueGrid::appendColumn(), FactValueGrid::appendRow(), QGCMapPolygon::appendVertex(), QGCMapPolyline::appendVertex(), QGCMapPolygon::appendVertices(), QGCMapPolyline::appendVertices(), ParameterEditorController::buildDiffFromFile(), VehicleCameraControl::handleVideoStreamInformation(), MissionController::insertTakeoffItem(), GeoFenceController::load(), QGCMapPolygon::loadFromJson(), QGCMapPolyline::loadFromJson(), Mixer::MixerChannel::MixerChannel(), NTRIPSourceTableModel::parseSourceTable(), MultiVehicleManager::selectVehicle(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), QGCMapPolygon::setPath(), QGCMapPolyline::setPath(), Mixer::Mixers::update(), HealthAndArmingCheckReport::update(), and ActuatorTesting::ActuatorTest::updateFunctions().
|
finaloverridevirtual |
Implements ObjectItemModelBase.
Definition at line 180 of file QmlObjectListModel.cc.
References ObjectItemModelBase::beginResetModel(), and ObjectItemModelBase::endResetModel().
Referenced by BatteryFactGroupListModel::_shouldHandleMessage(), EscStatusFactGroupListModel::_shouldHandleMessage(), clearAndDeleteContents(), MultiVehicleManager::deselectAllVehicles(), QGCMapEngineManager::loadTileSets(), and QGCMapEngineManager::~QGCMapEngineManager().
|
finaloverridevirtual |
Clears the list and calls deleteLater on each entry.
Implements ObjectListModelBase.
Definition at line 279 of file QmlObjectListModel.cc.
References clear(), and ObjectListModelBase::index().
Referenced by NTRIPSourceTableModel::clear(), QGCMapPolygon::clear(), QGCMapPolyline::clear(), ParameterEditorController::clearDiff(), OnboardLogController::refresh(), OnboardLogFtpController::refresh(), GeoFenceController::removeAll(), RallyPointController::removeAll(), MAVLinkSigningKeys::removeAllKeys(), 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(), MAVLinkInspectorController::~MAVLinkInspectorController(), MAVLinkLogManager::~MAVLinkLogManager(), QGCMAVLinkMessage::~QGCMAVLinkMessage(), and QGCMAVLinkSystem::~QGCMAVLinkSystem().
Implements ObjectListModelBase.
Definition at line 20 of file QmlObjectListModel.h.
|
finaloverridevirtual |
Implements ObjectItemModelBase.
Definition at line 258 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(), RallyPointController::addPoint(), Mixer::ChannelConfigInstanceVirtualAxis::allInstancesInitialized(), OnboardLogController::allLogsSelected(), QGCMAVLinkSystem::append(), FactValueGrid::appendRow(), MissionController::applyDefaultMissionAltitude(), Mixer::MixerChannel::applyRule(), VehicleCameraControl::autoStream(), MAVLinkLogManager::cancelUpload(), GeoFenceController::clearAllInteractive(), GeoFenceController::containsItems(), MissionController::containsItems(), RallyPointController::containsItems(), NTRIPSourceTableModel::count(), QGCCameraManager::currentCameraInstance(), GeoFenceController::deleteCircle(), FactValueGrid::deleteLastColumn(), FactValueGrid::deleteLastRow(), GeoFenceController::deletePolygon(), QGCMapEngineManager::deleteTileSet(), MultiVehicleManager::deselectVehicle(), QGCMapPolygon::empty(), QGCMapPolyline::empty(), QGCMapEngineManager::exportSets(), QGCMAVLinkSystem::findMessage(), QGCMAVLinkSystem::findMessage(), QGCMapEngineManager::findName(), ActuatorOutputs::ActuatorOutput::forEachOutputFunction(), Mixer::MixerChannel::getFact(), Mixer::Mixers::getFunctions(), Mixer::MixerChannel::getGeometry(), Mixer::Mixers::getSpecificLabelForFunction(), MultiVehicleManager::getVehicleById(), VehicleCameraControl::handleVideoStreamInformation(), Actuators::init(), MotorAssignment::initAssignment(), isEmpty(), GeoFenceController::isEmpty(), MissionController::isEmpty(), RallyPointController::isEmpty(), MissionController::isFirstLandingComplexItem(), QGCMapPolygon::isValid(), QGCMapPolyline::isValid(), QGCMapEngineManager::loadTileSets(), Mixer::MixerChannel::MixerChannel(), move(), QGCMapPolygon::nedPolygon(), MissionController::offsetMission(), ParameterEditorController::ParameterEditorController(), Actuators::parametersChanged(), MissionController::readyForSaveState(), MissionFlightStatusCalculator::recalc(), MAVLinkSigningKeys::removeAllKeys(), RallyPointController::removePoint(), MissionController::removeVisualItem(), MissionController::repositionMission(), MissionController::resumeMissionIndex(), MissionController::rotateMission(), GeoFenceController::save(), MissionController::save(), RallyPointController::save(), MissionSettingsItem::scanForMissionSettings(), CameraSection::scanForSection(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), CameraSection::scanStopTakingVideo(), Actuators::selectActuatorOutput(), QGCMapEngineManager::selectAll(), OnboardLogController::selectAll(), Actuators::selectedActuatorOutput(), OnboardLogController::selectedCount(), QGCMapEngineManager::selectedCount(), QGCMAVLinkSystem::selectedMsg(), QGCMapEngineManager::selectNone(), ParameterEditorController::sendDiff(), MissionController::sendToVehicle(), RallyPointController::sendToVehicle(), QGCCameraManager::setCurrentCamera(), MissionController::setCurrentPlanViewSeqNum(), GeoFenceController::setDirty(), QGCMAVLinkSystem::setSelected(), NTRIPSourceTableModel::sortByDistance(), SubtitleWriter::startCapturingTelemetry(), MAVLinkInspectorController::systemNames(), VehicleCameraControl::thermalStreamInstance(), MAVLinkSigningKeys::tryDetectKey(), Mixer::Mixers::update(), NTRIPSourceTableModel::updateDistances(), QGCMAVLinkMessage::updateFieldSelection(), TerrainProfile::updateSeries(), and MAVLinkLogManager::uploadLog().
|
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 QGCMAVLinkSystem::append(), MAVLinkLogManager::cancelUpload(), MAVLinkLogManager::deleteLog(), QGCMapEngineManager::deleteTileSet(), MultiVehicleManager::deselectVehicle(), QGCMapEngineManager::exportSets(), QGCMAVLinkSystem::findMessage(), QGCMAVLinkSystem::findMessage(), QGCMapEngineManager::findName(), ActuatorOutputs::ActuatorOutput::forEachOutputFunction(), MultiVehicleManager::getVehicleById(), Actuators::init(), MotorAssignment::initAssignment(), MissionController::isFirstLandingComplexItem(), MissionController::offsetMission(), Actuators::parametersChanged(), MissionController::readyForSaveState(), MissionFlightStatusCalculator::recalc(), MissionController::repositionMission(), MissionController::rotateMission(), MissionController::save(), QGCMapEngineManager::selectAll(), QGCMapEngineManager::selectedCount(), QGCMAVLinkSystem::selectedMsg(), QGCMapEngineManager::selectNone(), Joystick::setButtonAction(), MissionController::setCurrentPlanViewSeqNum(), QGCMAVLinkSystem::setSelected(), MAVLinkInspectorController::systemNames(), NTRIPSourceTableModel::updateDistances(), QGCMAVLinkMessage::updateFieldSelection(), and MAVLinkLogManager::uploadLog().
Definition at line 33 of file QmlObjectListModel.h.
Referenced by QGCCameraManager::_checkForLostCameras(), removeOne(), and MissionController::visualItemIndexForObject().
Definition at line 216 of file QmlObjectListModel.cc.
References ObjectListModelBase::_skipDirtyFirstItem, ObjectListModelBase::index(), insertRows(), and setDirty().
Definition at line 200 of file QmlObjectListModel.cc.
References ObjectListModelBase::_skipDirtyFirstItem, ObjectListModelBase::index(), insertRows(), and setDirty().
Referenced by FactGroupListModel::_findOrAddFactGroupById(), LandingComplexItem::_scanForItem(), QGCMAVLinkSystem::append(), 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::_resetModelNestingCount, ObjectItemModelBase::_signalCountChangedIfNotNested(), ObjectListModelBase::index(), and ObjectListModelBase::parent().
|
inlinefinaloverridevirtual |
Reimplemented from ObjectItemModelBase.
Definition at line 16 of file QmlObjectListModel.h.
References count().
Referenced by QGCCameraManager::_checkForLostCameras(), and QGCCameraManager::currentCameraInstance().
Definition at line 148 of file QmlObjectListModel.cc.
References count(), and ObjectListModelBase::index().
|
inline |
Definition at line 36 of file QmlObjectListModel.h.
Referenced by QGCMAVLinkSystem::append(), and NTRIPSourceTableModel::sortByDistance().
| QObject * QmlObjectListModel::operator[] | ( | int | index | ) |
Definition at line 164 of file QmlObjectListModel.cc.
References ObjectListModelBase::index().
| const QObject * QmlObjectListModel::operator[] | ( | int | index | ) | const |
Definition at line 172 of file QmlObjectListModel.cc.
References ObjectListModelBase::index().
| QObject * QmlObjectListModel::removeAt | ( | int | index | ) |
Definition at line 187 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(), MultiVehicleManager::deselectVehicle(), Actuators::init(), removeOne(), QGCMapPolygon::removeVertex(), QGCMapPolyline::removeVertex(), MissionController::removeVisualItem(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), and CameraSection::scanStopTakingVideo().
|
inlinefinaloverridevirtual |
Implements ObjectListModelBase.
Definition at line 19 of file QmlObjectListModel.h.
References indexOf(), and removeAt().
Referenced by MAVLinkSigningKeys::removeKey(), and RallyPointController::removePoint().
|
overrideprotectedvirtual |
Implements ObjectListModelBase.
Definition at line 123 of file QmlObjectListModel.cc.
References ObjectItemModelBase::_resetModelNestingCount, 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 263 of file QmlObjectListModel.cc.
References ObjectItemModelBase::_dirty, 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 249 of file QmlObjectListModel.cc.
References ObjectItemModelBase::beginResetModel(), ObjectItemModelBase::endResetModel(), and ObjectListModelBase::index().
Referenced by RallyPointController::load(), and NTRIPSourceTableModel::sortByDistance().
Definition at line 35 of file QmlObjectListModel.h.
References ObjectListModelBase::index().
Referenced by LandingComplexItem::_scanForItem(), ActuatorOutputs::ActuatorOutputChannel::ActuatorOutputChannel(), QGCMapPolygon::adjustVertex(), QGCMapPolyline::adjustVertex(), Mixer::ChannelConfigInstanceVirtualAxis::allInstancesInitialized(), OnboardLogController::allLogsSelected(), FactValueGrid::appendRow(), MissionController::applyDefaultMissionAltitude(), Mixer::MixerChannel::applyRule(), GeoFenceController::clearAllInteractive(), FactValueGrid::deleteLastRow(), QGCCorePlugin::factValueGridCreateDefaultSettings(), Mixer::MixerChannel::getFact(), Mixer::Mixers::getFunctions(), Mixer::MixerChannel::getGeometry(), Mixer::Mixers::getSpecificLabelForFunction(), MAVLinkSigningKeys::keyAt(), Mixer::MixerChannel::MixerChannel(), ParameterEditorController::ParameterEditorController(), MissionController::removeVisualItem(), MissionController::resumeMissionIndex(), GeoFenceController::save(), MissionController::save(), SpeedSection::scanForSection(), CameraSection::scanStopTakingPhotos(), CameraSection::scanStopTakingVideo(), OnboardLogController::selectAll(), Actuators::selectedActuatorOutput(), OnboardLogController::selectedCount(), ParameterEditorController::sendDiff(), setData(), GeoFenceController::setDirty(), SubtitleWriter::startCapturingTelemetry(), Mixer::Mixers::update(), and TerrainProfile::updateSeries().