|
QGroundControl
Ground Control Station for MAVLink Drones
|
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of configurable values and user interface. More...
#include <VehicleComponent.h>
Inheritance diagram for VehicleComponent:
Collaboration diagram for VehicleComponent:Signals | |
| void | setupCompleteChanged () |
| void | setupSourceChanged () |
| void | sectionIdsChanged () |
Public Member Functions | |
| VehicleComponent (Vehicle *vehicle, AutoPilotPlugin *autopilot, AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent, QObject *parent=nullptr) | |
| virtual | ~VehicleComponent () |
| virtual QString | name () const =0 |
| virtual QString | description () const |
| virtual QString | iconResource () const =0 |
| virtual bool | requiresSetup () const =0 |
| virtual bool | setupComplete () const =0 |
| virtual QUrl | setupSource () const =0 |
| virtual QUrl | summaryQmlSource () const =0 |
| virtual QString | vehicleConfigJson () const |
| Resource path to a VehicleConfig.json page definition, or empty if none. | |
| virtual QStringList | sectionIds () const |
| virtual Q_INVOKABLE QString | sectionDisplayName (const QString §ionId) const |
| QVariantMap | sectionKeywords () const |
| Search keywords per section, keyed by section ID. Values are original-case translatable terms. | |
| virtual bool | showFirstSectionOnRootClick () const |
| When true, clicking the root component in the tree selects the first section instead of showing all. | |
| virtual Q_INVOKABLE bool | sectionSetupComplete (const QString §ionId) const |
| Returns setup-complete status for a section ID. Default returns true (no per-section tracking). | |
| virtual bool | allowSetupWhileArmed () const |
| virtual bool | allowSetupWhileFlying () const |
| virtual void | addSummaryQmlComponent (QQmlContext *context, QQuickItem *parent) |
| virtual QStringList | setupCompleteChangedTriggerList () const =0 |
| virtual void | setupTriggerSignals () |
| AutoPilotPlugin::KnownVehicleComponent | KnownVehicleComponent () const |
Protected Slots | |
| void | _triggerUpdated (QVariant) |
Protected Attributes | |
| Vehicle * | _vehicle = nullptr |
| AutoPilotPlugin * | _autopilot = nullptr |
| AutoPilotPlugin::KnownVehicleComponent | _KnownVehicleComponent |
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of configurable values and user interface.
Definition at line 18 of file VehicleComponent.h.
|
explicit |
Definition at line 16 of file VehicleComponent.cc.
|
virtual |
Definition at line 29 of file VehicleComponent.cc.
|
inlineprotectedslot |
Definition at line 96 of file VehicleComponent.h.
References setupCompleteChanged().
Referenced by ActuatorComponent::ActuatorComponent(), and setupTriggerSignals().
|
virtual |
Definition at line 234 of file VehicleComponent.cc.
|
inlinevirtual |
Reimplemented in APMAdvancedTuningCopterComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightSafetyComponent, APMFollowComponent, APMHeliComponent, APMLoggingComponent, APMMotorComponent, APMPowerComponent, APMSafetyComponent, APMTuningComponent, PX4FlightBehavior, PX4TuningComponent, PowerComponent, and SafetyComponent.
Definition at line 73 of file VehicleComponent.h.
|
inlinevirtual |
Reimplemented in APMFailsafesComponent, APMFlightSafetyComponent, APMFollowComponent, APMLoggingComponent, APMSafetyComponent, PX4FlightBehavior, PX4TuningComponent, and SafetyComponent.
Definition at line 76 of file VehicleComponent.h.
|
inlinevirtual |
Reimplemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, FlightModesComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
Definition at line 44 of file VehicleComponent.h.
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, FlightModesComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
inline |
Definition at line 88 of file VehicleComponent.h.
References _KnownVehicleComponent.
Referenced by AutoPilotPlugin::findKnownVehicleComponent().
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, FlightModesComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, FlightModesComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
inlinevirtual |
Translated display name for a section ID. Default returns the ID unchanged (JSON-driven components are translated by the view using the JSON filename context).
Reimplemented in FlightModesComponent, and SensorsComponent.
Definition at line 61 of file VehicleComponent.h.
|
virtual |
Untranslated section IDs for sidebar navigation. Auto-populated from vehicleConfigJson() JSON. Repeat sections are expanded by probing vehicle parameters. IDs are stable across locales and are used for section filtering; display uses sectionDisplayName() or the JSON translation context.
Reimplemented in FlightModesComponent, and SensorsComponent.
Definition at line 34 of file VehicleComponent.cc.
References _vehicle, ParameterManager::defaultComponentId, and Vehicle::parameterManager().
|
signal |
Referenced by setupTriggerSignals().
| QVariantMap VehicleComponent::sectionKeywords | ( | ) | const |
Search keywords per section, keyed by section ID. Values are original-case translatable terms.
Definition at line 66 of file VehicleComponent.cc.
|
inlinevirtual |
Returns setup-complete status for a section ID. Default returns true (no per-section tracking).
Reimplemented in SensorsComponent.
Definition at line 70 of file VehicleComponent.h.
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, FlightModesComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
signal |
|
pure virtual |
Returns an list of parameter names for which a change should cause the setupCompleteChanged signal to be emitted.
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, FlightModesComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
Referenced by setupTriggerSignals().
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMMotorComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, ActuatorComponent, AirframeComponent, PX4RadioComponent, FlightModesComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
signal |
|
virtual |
Should be called after the component is created (but not in constructor) to setup the signals which are used to track parameter changes which affect setupComplete state.
Definition at line 257 of file VehicleComponent.cc.
References _triggerUpdated(), _vehicle, ParameterManager::defaultComponentId, ParameterManager::getParameter(), ParameterManager::parameterExists(), Vehicle::parameterManager(), sectionIdsChanged(), setupCompleteChangedTriggerList(), and Fact::valueChanged().
Referenced by GenericAutoPilotPlugin::vehicleComponents(), APMAutoPilotPlugin::vehicleComponents(), and PX4AutoPilotPlugin::vehicleComponents().
|
inlinevirtual |
When true, clicking the root component in the tree selects the first section instead of showing all.
Reimplemented in SensorsComponent.
Definition at line 67 of file VehicleComponent.h.
|
pure virtual |
Implemented in APMAdvancedTuningCopterComponent, APMAirframeComponent, APMAirspeedComponent, APMESCComponent, APMFailsafesComponent, APMFlightModesComponent, APMFlightSafetyComponent, APMFollowComponent, APMGimbalComponent, APMHeliComponent, APMLightsComponent, APMLoggingComponent, APMPowerComponent, APMRadioComponent, APMRemoteSupportComponent, APMSafetyComponent, APMSensorsComponent, APMServoComponent, APMSubFrameComponent, APMTuningComponent, ESP8266Component, JoystickComponent, SyslinkComponent, PX4FlightBehavior, MotorComponent, ScriptingComponent, AirframeComponent, PX4RadioComponent, ActuatorComponent, FlightModesComponent, PX4TuningComponent, PowerComponent, SafetyComponent, and SensorsComponent.
|
inlinevirtual |
Resource path to a VehicleConfig.json page definition, or empty if none.
Reimplemented in APMFailsafesComponent, APMFlightSafetyComponent, APMLoggingComponent, APMPowerComponent, APMSafetyComponent, APMTuningComponent, PowerComponent, and SafetyComponent.
Definition at line 52 of file VehicleComponent.h.
|
protected |
Definition at line 100 of file VehicleComponent.h.
|
protected |
Definition at line 101 of file VehicleComponent.h.
Referenced by KnownVehicleComponent().
|
protected |
Definition at line 99 of file VehicleComponent.h.
Referenced by APMSensorsComponent::accelSetupNeeded(), APMRadioComponent::APMRadioComponent(), APMSensorsComponent::compassSetupNeeded(), APMFailsafesComponent::description(), APMFlightSafetyComponent::description(), APMSafetyComponent::description(), PX4RadioComponent::requiresSetup(), sectionIds(), SensorsComponent::sectionIds(), SensorsComponent::sectionSetupComplete(), SensorsComponent::SensorsComponent(), APMRadioComponent::setupComplete(), AirframeComponent::setupComplete(), PX4RadioComponent::setupComplete(), PowerComponent::setupComplete(), SensorsComponent::setupComplete(), SensorsComponent::setupCompleteChangedTriggerList(), APMAdvancedTuningCopterComponent::setupSource(), APMFailsafesComponent::setupSource(), APMFlightSafetyComponent::setupSource(), APMMotorComponent::setupSource(), APMSafetyComponent::setupSource(), APMTuningComponent::setupSource(), PX4FlightBehavior::setupSource(), PX4TuningComponent::setupSource(), setupTriggerSignals(), APMFailsafesComponent::summaryQmlSource(), APMFlightSafetyComponent::summaryQmlSource(), APMSafetyComponent::summaryQmlSource(), and SensorsComponent::summaryQmlSource().