QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4BatteryComponent Class Reference

#include <PX4BatteryComponent.h>

Inheritance diagram for PX4BatteryComponent:
Collaboration diagram for PX4BatteryComponent:

Public Member Functions

 PX4BatteryComponent (Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
QStringList setupCompleteChangedTriggerList () const final
QString name () const final
QString description () const final
QString iconResource () const final
QStringList searchKeywords () const final
 Translated search terms for the whole component, for pages without vehicleConfigJson() sections.
bool requiresSetup () const final
int setupOrder () const final
bool setupComplete () const final
QUrl setupSource () const final
QUrl summaryQmlSource () const final
QList< VehicleSummaryItem > summaryItems () const final
 Values for this component's card on the Summary page. A component with none falls back to summaryQmlSource().
QStringList summaryChangedTriggerList () const final
 Parameters whose change emits summaryItemsChanged, besides those that change setupComplete.
void setupTriggerSignals () final
bool allowSetupWhileArmed () const final
Public Member Functions inherited from VehicleComponent
 VehicleComponent (Vehicle *vehicle, AutoPilotPlugin *autopilot, AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent, QObject *parent=nullptr)
virtual ~VehicleComponent ()
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 &sectionId) 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 &sectionId) const
 Returns setup-complete status for a section ID. Default returns true (no per-section tracking).
virtual bool allowSetupWhileFlying () const
virtual void addSummaryQmlComponent (QQmlContext *context, QQuickItem *parent)
AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent () const

Additional Inherited Members

Signals inherited from VehicleComponent
void requiresSetupChanged ()
void setupCompleteChanged ()
void summaryItemsChanged ()
void setupSourceChanged ()
void sectionIdsChanged ()
Protected Slots inherited from VehicleComponent
void _triggerUpdated (QVariant)
Protected Member Functions inherited from VehicleComponent
Fact * _parameterFact (const QString &name) const
 Fact of a parameter of the default component, nullptr when the vehicle does not have it.
Static Protected Member Functions inherited from VehicleComponent
static QString _valueWithUnits (const Fact *fact)
 The fact's value followed by its units, when it has any.
Protected Attributes inherited from VehicleComponent
Vehicle * _vehicle = nullptr
AutoPilotPlugin * _autopilot = nullptr
AutoPilotPlugin::KnownVehicleComponent _KnownVehicleComponent

Detailed Description

Definition at line 5 of file PX4BatteryComponent.h.

Constructor & Destructor Documentation

◆ PX4BatteryComponent()

PX4BatteryComponent::PX4BatteryComponent ( Vehicle * vehicle,
AutoPilotPlugin * autopilot,
QObject * parent = nullptr )

Definition at line 7 of file PX4BatteryComponent.cc.

References VehicleComponent::VehicleComponent().

Member Function Documentation

◆ allowSetupWhileArmed()

bool PX4BatteryComponent::allowSetupWhileArmed ( void ) const
inlinefinalvirtual

Reimplemented from VehicleComponent.

Definition at line 37 of file PX4BatteryComponent.h.

References allowSetupWhileArmed().

Referenced by allowSetupWhileArmed().

◆ description()

QString PX4BatteryComponent::description ( void ) const
finalvirtual

Reimplemented from VehicleComponent.

Definition at line 12 of file PX4BatteryComponent.cc.

◆ iconResource()

QString PX4BatteryComponent::iconResource ( void ) const
finalvirtual

Implements VehicleComponent.

Definition at line 17 of file PX4BatteryComponent.cc.

◆ name()

QString PX4BatteryComponent::name ( void ) const
inlinefinalvirtual

Implements VehicleComponent.

Definition at line 15 of file PX4BatteryComponent.h.

◆ requiresSetup()

bool PX4BatteryComponent::requiresSetup ( void ) const
inlinefinalvirtual

Implements VehicleComponent.

Definition at line 21 of file PX4BatteryComponent.h.

References requiresSetup().

Referenced by requiresSetup().

◆ searchKeywords()

QStringList PX4BatteryComponent::searchKeywords ( ) const
finalvirtual

Translated search terms for the whole component, for pages without vehicleConfigJson() sections.

Reimplemented from VehicleComponent.

Definition at line 22 of file PX4BatteryComponent.cc.

◆ setupComplete()

bool PX4BatteryComponent::setupComplete ( void ) const
finalvirtual

◆ setupCompleteChangedTriggerList()

QStringList PX4BatteryComponent::setupCompleteChangedTriggerList ( ) const
finalvirtual

Returns an list of parameter names for which a change should cause the setupCompleteChanged signal to be emitted.

Implements VehicleComponent.

Definition at line 54 of file PX4BatteryComponent.cc.

Referenced by setupTriggerSignals().

◆ setupOrder()

int PX4BatteryComponent::setupOrder ( void ) const
inlinefinalvirtual

Where the component comes in the recommended order of setting up a vehicle, lowest first. Components that do not set one come after those that do.

Reimplemented from VehicleComponent.

Definition at line 23 of file PX4BatteryComponent.h.

◆ setupSource()

QUrl PX4BatteryComponent::setupSource ( void ) const
finalvirtual

Implements VehicleComponent.

Definition at line 59 of file PX4BatteryComponent.cc.

◆ setupTriggerSignals()

void PX4BatteryComponent::setupTriggerSignals ( )
finalvirtual

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.

Reimplemented from VehicleComponent.

Definition at line 76 of file PX4BatteryComponent.cc.

References VehicleComponent::_vehicle, ParameterManager::factAdded(), Fact::name(), setupCompleteChangedTriggerList(), and VehicleComponent::setupTriggerSignals().

◆ summaryChangedTriggerList()

QStringList PX4BatteryComponent::summaryChangedTriggerList ( void ) const
finalvirtual

Parameters whose change emits summaryItemsChanged, besides those that change setupComplete.

Reimplemented from VehicleComponent.

Definition at line 64 of file PX4BatteryComponent.cc.

References VehicleComponent::_parameterFact().

◆ summaryItems()

QList< VehicleSummaryItem > PX4BatteryComponent::summaryItems ( void ) const
finalvirtual

Values for this component's card on the Summary page. A component with none falls back to summaryQmlSource().

Reimplemented from VehicleComponent.

Definition at line 97 of file PX4BatteryComponent.cc.

References VehicleComponent::_parameterFact(), VehicleComponent::_valueWithUnits(), Fact::cookedValueString(), Fact::enumStringValue(), Fact::rawValue(), and setupComplete().

◆ summaryQmlSource()

QUrl PX4BatteryComponent::summaryQmlSource ( void ) const
inlinefinalvirtual

Implements VehicleComponent.

Definition at line 29 of file PX4BatteryComponent.h.

References summaryQmlSource().

Referenced by summaryQmlSource().


The documentation for this class was generated from the following files: