6#include <QtQml/QQmlContext>
7#include <QtQuick/QQuickItem>
11VehicleComponent::VehicleComponent(
Vehicle *vehicle,
AutoPilotPlugin *autopilot, AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent, QObject *parent)
14 , _autopilot(autopilot)
15 , _KnownVehicleComponent(KnownVehicleComponent)
19 if (!vehicle || !autopilot) {
20 qCWarning(VehicleComponentLog) <<
"Internal error";
24VehicleComponent::~VehicleComponent()
29void VehicleComponent::addSummaryQmlComponent(QQmlContext *context, QQuickItem *parent)
32 qCWarning(VehicleComponentLog) <<
"Internal error";
36 QQmlComponent component =
new QQmlComponent(context->engine(), QUrl::fromUserInput(
"qrc:/qml/VehicleComponentSummaryButton.qml"),
this);
37 if (component.status() == QQmlComponent::Error) {
38 qCWarning(VehicleComponentLog) << component.errors();
42 QQuickItem *
const item = qobject_cast<QQuickItem*>(component.create(context));
44 qCWarning(VehicleComponentLog) <<
"Internal error";
48 item->setParentItem(parent);
49 item->setProperty(
"vehicleComponent", QVariant::fromValue(
this));
52void VehicleComponent::setupTriggerSignals()
55 for (
const QString ¶mName: setupCompleteChangedTriggerList()) {
#define QGC_LOGGING_CATEGORY(name, categoryStr)
A Fact is used to hold a single value within the system.
void valueChanged(const QVariant &value)
This signal is only meant for use by the QT property system. It should not be connected to by client ...
bool parameterExists(int componentId, const QString ¶mName) const
Fact * getParameter(int componentId, const QString ¶mName)
static constexpr int defaultComponentId
void _triggerUpdated(QVariant)
ParameterManager * parameterManager()