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

#include <QGroundControlQmlGlobal.h>

+ Inheritance diagram for QGroundControlQmlGlobal:
+ Collaboration diagram for QGroundControlQmlGlobal:

Public Types

enum  AltitudeFrame {
  AltitudeFrameMixed , AltitudeFrameRelative , AltitudeFrameAbsolute , AltitudeFrameCalcAboveTerrain ,
  AltitudeFrameTerrain , AltitudeFrameNone
}
 

Signals

void isMultiplexingEnabledChanged (bool enabled)
 
void mavlinkSystemIDChanged (int id)
 
void flightMapPositionChanged (QGeoCoordinate flightMapPosition)
 
void flightMapZoomChanged (double flightMapZoom)
 
void newStableVersionChanged ()
 
void showMessageDialogRequested (QObject *owner, QString title, QString text, int buttons, QJSValue acceptFunction, QJSValue closeFunction)
 

Public Member Functions

 QGroundControlQmlGlobal (QObject *parent=nullptr)
 
 ~QGroundControlQmlGlobal ()
 
Q_INVOKABLE void saveGlobalSetting (const QString &key, const QString &value)
 
Q_INVOKABLE QString loadGlobalSetting (const QString &key, const QString &defaultValue)
 
Q_INVOKABLE void saveBoolGlobalSetting (const QString &key, bool value)
 
Q_INVOKABLE bool loadBoolGlobalSetting (const QString &key, bool defaultValue)
 
Q_INVOKABLE void startMockLink (const QVariantMap &properties)
 Starts a MockLink whose MockConfiguration properties are set from the map (e.g. { name: "PX4", firmware: 12 })
 
Q_INVOKABLE void stopOneMockLink (void)
 
Q_INVOKABLE bool linesIntersect (QPointF xLine1, QPointF yLine1, QPointF xLine2, QPointF yLine2)
 
Q_INVOKABLE QString altitudeFrameExtraUnits (AltitudeFrame altFrame)
 String shown in the FactTextField.extraUnits ui.
 
Q_INVOKABLE QString altitudeFrameShortDescription (AltitudeFrame altFrame)
 String shown when a user needs to select an altitude frame.
 
Q_INVOKABLE void showMessageDialog (QObject *owner, const QString &title, const QString &text, int buttons=kDefaultMessageDialogButtons, QJSValue acceptFunction=QJSValue(), QJSValue closeFunction=QJSValue())
 
Q_INVOKABLE void testAudioOutput ()
 
QObject * serialPortManager () const
 
LinkManager * linkManager ()
 
MultiVehicleManager * multiVehicleManager ()
 
QGCMapEngineManager * mapEngineManager ()
 
PositionManager * positionManager () const
 
MissionCommandTree * missionCommandTree ()
 
MAVLinkSigningKeys * mavlinkSigningKeys ()
 
VideoManager * videoManager ()
 
QGCCorePlugin * corePlugin ()
 
SettingsManager * settingsManager ()
 
GPSManager * gpsManager () const
 
ADSBVehicleManager * adsbVehicleManager ()
 
QmlUnitsConversion * unitsConversion ()
 
qreal zOrderTopMost ()
 
qreal zOrderWidgets ()
 
qreal zOrderMapItems ()
 
qreal zOrderWaypointIndicators ()
 
qreal zOrderVehicles ()
 
qreal zOrderTrajectoryLines ()
 
qreal zOrderWaypointLines ()
 
QString elevationProviderName ()
 
QString elevationProviderNotice ()
 
bool singleFirmwareSupport ()
 
bool singleVehicleSupport ()
 
bool px4ProFirmwareSupported ()
 
bool apmFirmwareSupported ()
 
void setFlightMapPosition (QGeoCoordinate &coordinate)
 
void setFlightMapZoom (double zoom)
 
QString parameterFileExtension (void) const
 
QString telemetryFileExtension (void) const
 

Static Public Member Functions

static Q_INVOKABLE QString bigSizeToString (quint64 size)
 Byte size with a locale-aware unit, as QGC::bigSizeToString().
 
static Q_INVOKABLE void copyToClipboard (const QString &text)
 Copy text to the system clipboard.
 
static QString appName ()
 
static QGeoCoordinate flightMapPosition ()
 
static double flightMapZoom ()
 
static QString qgcVersion ()
 
static QString qgcAppDate ()
 
static QString newStableVersion ()
 
static bool qgcDailyBuild ()
 

Static Public Attributes

static constexpr int kDefaultMessageDialogButtons = 0x00000400
 

Detailed Description

Definition at line 39 of file QGroundControlQmlGlobal.h.

Member Enumeration Documentation

◆ AltitudeFrame

Enumerator
AltitudeFrameMixed 
AltitudeFrameRelative 
AltitudeFrameAbsolute 
AltitudeFrameCalcAboveTerrain 
AltitudeFrameTerrain 
AltitudeFrameNone 

Definition at line 51 of file QGroundControlQmlGlobal.h.

Constructor & Destructor Documentation

◆ QGroundControlQmlGlobal()

QGroundControlQmlGlobal::QGroundControlQmlGlobal ( QObject *  parent = nullptr)
explicit

◆ ~QGroundControlQmlGlobal()

QGroundControlQmlGlobal::~QGroundControlQmlGlobal ( )

Definition at line 89 of file QGroundControlQmlGlobal.cc.

Member Function Documentation

◆ adsbVehicleManager()

ADSBVehicleManager * QGroundControlQmlGlobal::adsbVehicleManager ( )
inline

Definition at line 172 of file QGroundControlQmlGlobal.h.

◆ altitudeFrameExtraUnits()

QString QGroundControlQmlGlobal::altitudeFrameExtraUnits ( AltitudeFrame  altFrame)

◆ altitudeFrameShortDescription()

QString QGroundControlQmlGlobal::altitudeFrameShortDescription ( AltitudeFrame  altFrame)

String shown when a user needs to select an altitude frame.

Definition at line 263 of file QGroundControlQmlGlobal.cc.

References AltitudeFrameAbsolute, AltitudeFrameCalcAboveTerrain, altitudeFrameExtraUnits(), AltitudeFrameMixed, AltitudeFrameNone, AltitudeFrameRelative, and AltitudeFrameTerrain.

◆ apmFirmwareSupported()

bool QGroundControlQmlGlobal::apmFirmwareSupported ( )

◆ appName()

QString QGroundControlQmlGlobal::appName ( )
static

Definition at line 325 of file QGroundControlQmlGlobal.cc.

◆ bigSizeToString()

QString QGroundControlQmlGlobal::bigSizeToString ( quint64  size)
static

Byte size with a locale-aware unit, as QGC::bigSizeToString().

Definition at line 186 of file QGroundControlQmlGlobal.cc.

References QGC::bigSizeToString().

◆ copyToClipboard()

void QGroundControlQmlGlobal::copyToClipboard ( const QString &  text)
static

Copy text to the system clipboard.

Definition at line 300 of file QGroundControlQmlGlobal.cc.

◆ corePlugin()

QGCCorePlugin * QGroundControlQmlGlobal::corePlugin ( )
inline

Definition at line 166 of file QGroundControlQmlGlobal.h.

◆ elevationProviderName()

QString QGroundControlQmlGlobal::elevationProviderName ( )

Definition at line 305 of file QGroundControlQmlGlobal.cc.

References SettingsManager::flightMapSettings().

◆ elevationProviderNotice()

QString QGroundControlQmlGlobal::elevationProviderNotice ( )

Definition at line 310 of file QGroundControlQmlGlobal.cc.

References SettingsManager::flightMapSettings().

◆ flightMapPosition()

static QGeoCoordinate QGroundControlQmlGlobal::flightMapPosition ( )
inlinestatic

Definition at line 176 of file QGroundControlQmlGlobal.h.

Referenced by setFlightMapPosition().

◆ flightMapPositionChanged

void QGroundControlQmlGlobal::flightMapPositionChanged ( QGeoCoordinate  flightMapPosition)
signal

◆ flightMapZoom()

static double QGroundControlQmlGlobal::flightMapZoom ( )
inlinestatic

Definition at line 178 of file QGroundControlQmlGlobal.h.

Referenced by setFlightMapZoom().

◆ flightMapZoomChanged

void QGroundControlQmlGlobal::flightMapZoomChanged ( double  flightMapZoom)
signal

◆ gpsManager()

GPSManager * QGroundControlQmlGlobal::gpsManager ( ) const

Definition at line 93 of file QGroundControlQmlGlobal.cc.

References GPSManager::instance().

◆ isMultiplexingEnabledChanged

void QGroundControlQmlGlobal::isMultiplexingEnabledChanged ( bool  enabled)
signal

◆ linesIntersect()

bool QGroundControlQmlGlobal::linesIntersect ( QPointF  xLine1,
QPointF  yLine1,
QPointF  xLine2,
QPointF  yLine2 
)

Definition at line 191 of file QGroundControlQmlGlobal.cc.

◆ linkManager()

LinkManager * QGroundControlQmlGlobal::linkManager ( )
inline

Definition at line 152 of file QGroundControlQmlGlobal.h.

◆ loadBoolGlobalSetting()

bool QGroundControlQmlGlobal::loadBoolGlobalSetting ( const QString &  key,
bool  defaultValue 
)

Definition at line 124 of file QGroundControlQmlGlobal.cc.

◆ loadGlobalSetting()

QString QGroundControlQmlGlobal::loadGlobalSetting ( const QString &  key,
const QString &  defaultValue 
)

Definition at line 110 of file QGroundControlQmlGlobal.cc.

◆ mapEngineManager()

QGCMapEngineManager * QGroundControlQmlGlobal::mapEngineManager ( )
inline

Definition at line 156 of file QGroundControlQmlGlobal.h.

◆ mavlinkSigningKeys()

MAVLinkSigningKeys * QGroundControlQmlGlobal::mavlinkSigningKeys ( )
inline

Definition at line 162 of file QGroundControlQmlGlobal.h.

◆ mavlinkSystemIDChanged

void QGroundControlQmlGlobal::mavlinkSystemIDChanged ( int  id)
signal

◆ missionCommandTree()

MissionCommandTree * QGroundControlQmlGlobal::missionCommandTree ( )
inline

Definition at line 160 of file QGroundControlQmlGlobal.h.

◆ multiVehicleManager()

MultiVehicleManager * QGroundControlQmlGlobal::multiVehicleManager ( )
inline

Definition at line 154 of file QGroundControlQmlGlobal.h.

◆ newStableVersion()

QString QGroundControlQmlGlobal::newStableVersion ( )
static

◆ newStableVersionChanged

void QGroundControlQmlGlobal::newStableVersionChanged ( )
signal

Referenced by QGroundControlQmlGlobal().

◆ parameterFileExtension()

QString QGroundControlQmlGlobal::parameterFileExtension ( void  ) const

Definition at line 315 of file QGroundControlQmlGlobal.cc.

References AppSettings::parameterFileExtension.

◆ positionManager()

PositionManager * QGroundControlQmlGlobal::positionManager ( ) const

◆ px4ProFirmwareSupported()

bool QGroundControlQmlGlobal::px4ProFirmwareSupported ( )

◆ qgcAppDate()

QString QGroundControlQmlGlobal::qgcAppDate ( )
static

Definition at line 232 of file QGroundControlQmlGlobal.cc.

◆ qgcDailyBuild()

static bool QGroundControlQmlGlobal::qgcDailyBuild ( )
inlinestatic

Definition at line 216 of file QGroundControlQmlGlobal.h.

◆ qgcVersion()

QString QGroundControlQmlGlobal::qgcVersion ( void  )
static

Definition at line 218 of file QGroundControlQmlGlobal.cc.

◆ saveBoolGlobalSetting()

void QGroundControlQmlGlobal::saveBoolGlobalSetting ( const QString &  key,
bool  value 
)

Definition at line 117 of file QGroundControlQmlGlobal.cc.

◆ saveGlobalSetting()

void QGroundControlQmlGlobal::saveGlobalSetting ( const QString &  key,
const QString &  value 
)

Definition at line 103 of file QGroundControlQmlGlobal.cc.

◆ serialPortManager()

QObject * QGroundControlQmlGlobal::serialPortManager ( ) const

Definition at line 330 of file QGroundControlQmlGlobal.cc.

References SerialPortManager::instance().

◆ setFlightMapPosition()

void QGroundControlQmlGlobal::setFlightMapPosition ( QGeoCoordinate &  coordinate)

Definition at line 201 of file QGroundControlQmlGlobal.cc.

References flightMapPosition(), and flightMapPositionChanged().

◆ setFlightMapZoom()

void QGroundControlQmlGlobal::setFlightMapZoom ( double  zoom)

Definition at line 210 of file QGroundControlQmlGlobal.cc.

References flightMapZoom(), and flightMapZoomChanged().

◆ settingsManager()

SettingsManager * QGroundControlQmlGlobal::settingsManager ( )
inline

Definition at line 168 of file QGroundControlQmlGlobal.h.

◆ showMessageDialog()

void QGroundControlQmlGlobal::showMessageDialog ( QObject *  owner,
const QString &  title,
const QString &  text,
int  buttons = kDefaultMessageDialogButtons,
QJSValue  acceptFunction = QJSValue(),
QJSValue  closeFunction = QJSValue() 
)

Shows a simple message dialog. The dialog is parented to owner and will automatically close if the owner is destroyed, preventing orphaned dialogs that can cause crashes.

Parameters
ownerThe QML item that owns this dialog. The dialog will be destroyed when this item is destroyed. Typically mainWindow should not be used as the owner, instead use a more specific item such as the one that triggered the dialog to ensure proper cleanup.
titleDialog title
textDialog message text
buttonsDialog button flags (e.g. Dialog.Ok, Dialog.Yes | Dialog.No)
acceptFunctionOptional callback invoked when the dialog is accepted
closeFunctionOptional callback invoked when the dialog is closed

Definition at line 284 of file QGroundControlQmlGlobal.cc.

References showMessageDialogRequested().

◆ showMessageDialogRequested

void QGroundControlQmlGlobal::showMessageDialogRequested ( QObject *  owner,
QString  title,
QString  text,
int  buttons,
QJSValue  acceptFunction,
QJSValue  closeFunction 
)
signal

Referenced by showMessageDialog().

◆ singleFirmwareSupport()

bool QGroundControlQmlGlobal::singleFirmwareSupport ( void  )

◆ singleVehicleSupport()

bool QGroundControlQmlGlobal::singleVehicleSupport ( void  )

◆ startMockLink()

void QGroundControlQmlGlobal::startMockLink ( const QVariantMap &  properties)

Starts a MockLink whose MockConfiguration properties are set from the map (e.g. { name: "PX4", firmware: 12 })

Definition at line 135 of file QGroundControlQmlGlobal.cc.

References properties, and MockLink::startMockLink().

◆ stopOneMockLink()

void QGroundControlQmlGlobal::stopOneMockLink ( void  )

◆ telemetryFileExtension()

QString QGroundControlQmlGlobal::telemetryFileExtension ( void  ) const

Definition at line 320 of file QGroundControlQmlGlobal.cc.

References AppSettings::telemetryFileExtension.

◆ testAudioOutput()

void QGroundControlQmlGlobal::testAudioOutput ( )

◆ unitsConversion()

QmlUnitsConversion * QGroundControlQmlGlobal::unitsConversion ( )
inline

Definition at line 174 of file QGroundControlQmlGlobal.h.

◆ videoManager()

VideoManager * QGroundControlQmlGlobal::videoManager ( )
inline

Definition at line 164 of file QGroundControlQmlGlobal.h.

◆ zOrderMapItems()

qreal QGroundControlQmlGlobal::zOrderMapItems ( )
inline

Definition at line 190 of file QGroundControlQmlGlobal.h.

◆ zOrderTopMost()

qreal QGroundControlQmlGlobal::zOrderTopMost ( )
inline

Definition at line 188 of file QGroundControlQmlGlobal.h.

◆ zOrderTrajectoryLines()

qreal QGroundControlQmlGlobal::zOrderTrajectoryLines ( )
inline

Definition at line 193 of file QGroundControlQmlGlobal.h.

◆ zOrderVehicles()

qreal QGroundControlQmlGlobal::zOrderVehicles ( )
inline

Definition at line 192 of file QGroundControlQmlGlobal.h.

◆ zOrderWaypointIndicators()

qreal QGroundControlQmlGlobal::zOrderWaypointIndicators ( )
inline

Definition at line 191 of file QGroundControlQmlGlobal.h.

◆ zOrderWaypointLines()

qreal QGroundControlQmlGlobal::zOrderWaypointLines ( )
inline

Definition at line 194 of file QGroundControlQmlGlobal.h.

◆ zOrderWidgets()

qreal QGroundControlQmlGlobal::zOrderWidgets ( )
inline

Definition at line 189 of file QGroundControlQmlGlobal.h.

Member Data Documentation

◆ kDefaultMessageDialogButtons

constexpr int QGroundControlQmlGlobal::kDefaultMessageDialogButtons = 0x00000400
staticconstexpr

Definition at line 46 of file QGroundControlQmlGlobal.h.


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