QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AirframeComponent.cc
Go to the documentation of this file.
1#include "AirframeComponent.h"
2#include "ParameterManager.h"
3#include "Vehicle.h"
4
5AirframeComponent::AirframeComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
6 : VehicleComponent(vehicle, autopilot, AutoPilotPlugin::UnknownVehicleComponent, parent)
7 , _name(tr("Airframe"))
8{
9
10}
11
12QString AirframeComponent::name(void) const
13{
14 return _name;
15}
16
18{
19 return tr("Configure the airframe type and apply default tuning parameters.");
20}
21
23{
24 return "/qmlimages/AirframeComponentIcon.png";
25}
26
28{
29 return true;
30}
31
33{
34 return _vehicle->parameterManager()->getParameter(ParameterManager::defaultComponentId, QStringLiteral("SYS_AUTOSTART"))->rawValue().toInt() != 0;
35}
36
38{
39 return QStringList(QStringLiteral("SYS_AUTOSTART"));
40}
41
43{
44 return QUrl::fromUserInput("qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/AirframeComponent.qml");
45}
46
48{
49 return QUrl::fromUserInput("qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/AirframeComponentSummary.qml");
50}
virtual bool requiresSetup(void) const
virtual QString name(void) const
AirframeComponent(Vehicle *vehicles, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
virtual QUrl summaryQmlSource(void) const
virtual QString iconResource(void) const
virtual QString description(void) const
virtual bool setupComplete(void) const
virtual QUrl setupSource(void) const
virtual QStringList setupCompleteChangedTriggerList(void) const
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
QVariant rawValue() const
Value after translation.
Definition Fact.h:85
Fact * getParameter(int componentId, const QString &paramName)
static constexpr int defaultComponentId
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
ParameterManager * parameterManager()
Definition Vehicle.h:573