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  AltMode {
  AltitudeModeMixed , AltitudeModeRelative , AltitudeModeAbsolute , AltitudeModeCalcAboveTerrain ,
  AltitudeModeTerrainFrame , AltitudeModeNone
}
 

Signals

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

Public Member Functions

 QGroundControlQmlGlobal (QObject *parent=nullptr)
 
 ~QGroundControlQmlGlobal ()
 
QString appName READ appName CONSTANT (LinkManager *linkManager READ linkManager CONSTANT) 1(MultiVehicleManager *multiVehicleManager READ multiVehicleManager CONSTANT) 1(QGCMapEngineManager *mapEngineManager READ mapEngineManager CONSTANT) 1(QGCPositionManager *qgcPositionManger READ qgcPositionManger CONSTANT) 1(VideoManager *videoManager READ videoManager CONSTANT) 1(SettingsManager *settingsManager READ settingsManager CONSTANT) 1(ADSBVehicleManager *adsbVehicleManager READ adsbVehicleManager CONSTANT) 1(QGCCorePlugin *corePlugin READ corePlugin CONSTANT) 1(MissionCommandTree *missionCommandTree READ missionCommandTree CONSTANT) 1(FactGroup *gpsRtk READ gpsRtkFactGroup CONSTANT) 1(QGCPalette *globalPalette MEMBER _globalPalette CONSTANT) 1(QmlUnitsConversion *unitsConversion READ unitsConversion CONSTANT) 1(bool singleFirmwareSupport READ singleFirmwareSupport CONSTANT) 1(bool singleVehicleSupport READ singleVehicleSupport CONSTANT) 1(bool px4ProFirmwareSupported READ px4ProFirmwareSupported CONSTANT) 1(int apmFirmwareSupported READ apmFirmwareSupported CONSTANT) 1(QGeoCoordinate flightMapPosition READ flightMapPosition WRITE setFlightMapPosition NOTIFY flightMapPositionChanged) 1(double flightMapZoom READ flightMapZoom WRITE setFlightMapZoom NOTIFY flightMapZoomChanged) 1(double flightMapInitialZoom MEMBER _flightMapInitialZoom CONSTANT) 1(QString parameterFileExtension READ parameterFileExtension CONSTANT) 1(QString telemetryFileExtension READ telemetryFileExtension CONSTANT) 1(QString qgcVersion READ qgcVersion CONSTANT) 1(QString qgcAppDate READ qgcAppDate CONSTANT) 1(bool qgcDailyBuild READ qgcDailyBuild CONSTANT) 1(qreal zOrderTopMost READ zOrderTopMost CONSTANT) 1(qreal zOrderWidgets READ zOrderWidgets CONSTANT) 1(qreal zOrderMapItems READ zOrderMapItems CONSTANT) 1(qreal zOrderVehicles READ zOrderVehicles CONSTANT) 1(qreal zOrderWaypointIndicators READ zOrderWaypointIndicators CONSTANT) 1(qreal zOrderTrajectoryLines READ zOrderTrajectoryLines CONSTANT) 1(qreal zOrderWaypointLines READ zOrderWaypointLines CONSTANT) 1(bool hasAPMSupport READ hasAPMSupport CONSTANT) 1(bool hasMAVLinkInspector READ hasMAVLinkInspector CONSTANT) 1(QString elevationProviderName READ elevationProviderName CONSTANT) 1(QString elevationProviderNotice READ elevationProviderNotice CONSTANT) 1 void saveGlobalSetting(const QString &key
 < This palette will always return enabled colors
 
QString loadGlobalSetting (const QString &key, const QString &defaultValue)
 
void saveBoolGlobalSetting (const QString &key, bool value)
 
bool loadBoolGlobalSetting (const QString &key, bool defaultValue)
 
void startPX4MockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void startGenericMockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void startAPMArduCopterMockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void startAPMArduPlaneMockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void startAPMArduSubMockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void startAPMArduRoverMockLink (bool sendStatusText, bool enableCamera, bool enableGimbal)
 
void stopOneMockLink (void)
 
bool linesIntersect (QPointF xLine1, QPointF yLine1, QPointF xLine2, QPointF yLine2)
 
QString altitudeModeExtraUnits (AltMode altMode)
 String shown in the FactTextField.extraUnits ui.
 
QString altitudeModeShortDescription (AltMode altMode)
 String shown when a user needs to select an altitude mode.
 
void showMessageDialog (QObject *owner, const QString &title, const QString &text, int buttons=kDefaultMessageDialogButtons, QJSValue acceptFunction=QJSValue(), QJSValue closeFunction=QJSValue())
 
LinkManagerlinkManager ()
 
MultiVehicleManagermultiVehicleManager ()
 
QGCMapEngineManagermapEngineManager ()
 
QGCPositionManagerqgcPositionManger ()
 
MissionCommandTreemissionCommandTree ()
 
VideoManagervideoManager ()
 
QGCCorePlugincorePlugin ()
 
SettingsManagersettingsManager ()
 
FactGroupgpsRtkFactGroup ()
 
ADSBVehicleManageradsbVehicleManager ()
 
QmlUnitsConversionunitsConversion ()
 
qreal zOrderTopMost ()
 
qreal zOrderWidgets ()
 
qreal zOrderMapItems ()
 
qreal zOrderWaypointIndicators ()
 
qreal zOrderVehicles ()
 
qreal zOrderTrajectoryLines ()
 
qreal zOrderWaypointLines ()
 
bool hasAPMSupport ()
 
bool hasMAVLinkInspector ()
 
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 void deleteAllSettingsNextBoot ()
 
static void clearDeleteAllSettingsNextBoot ()
 
static QmlObjectListModeltreeLoggingCategoriesModel ()
 Returns the hierarchical list of available logging category names.
 
static QmlObjectListModelflatLoggingCategoriesModel ()
 Returns the flat list of available logging category names.
 
static void setCategoryLoggingOn (const QString &category, bool enable)
 Turns on/off logging for the specified category. State is saved in app settings.
 
static bool categoryLoggingOn (const QString &category)
 Returns true if logging is turned on for the specified category.
 
static void disableAllLoggingCategories ()
 
static QString appName ()
 
static QGeoCoordinate flightMapPosition ()
 
static double flightMapZoom ()
 
static QString qgcVersion ()
 
static QString qgcAppDate ()
 
static bool qgcDailyBuild ()
 

Public Attributes

QString appName READ appName const QString & value
 

Static Public Attributes

static constexpr int kDefaultMessageDialogButtons = 0x00000400
 

Detailed Description

Definition at line 40 of file QGroundControlQmlGlobal.h.

Member Enumeration Documentation

◆ AltMode

Enumerator
AltitudeModeMixed 
AltitudeModeRelative 
AltitudeModeAbsolute 
AltitudeModeCalcAboveTerrain 
AltitudeModeTerrainFrame 
AltitudeModeNone 

Definition at line 52 of file QGroundControlQmlGlobal.h.

Constructor & Destructor Documentation

◆ QGroundControlQmlGlobal()

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

◆ ~QGroundControlQmlGlobal()

QGroundControlQmlGlobal::~QGroundControlQmlGlobal ( )

Definition at line 81 of file QGroundControlQmlGlobal.cc.

Member Function Documentation

◆ adsbVehicleManager()

ADSBVehicleManager * QGroundControlQmlGlobal::adsbVehicleManager ( )
inline

Definition at line 175 of file QGroundControlQmlGlobal.h.

◆ altitudeModeExtraUnits()

QString QGroundControlQmlGlobal::altitudeModeExtraUnits ( AltMode  altMode)

String shown in the FactTextField.extraUnits ui.

Definition at line 260 of file QGroundControlQmlGlobal.cc.

References AltitudeModeAbsolute, AltitudeModeCalcAboveTerrain, AltitudeModeMixed, AltitudeModeNone, AltitudeModeRelative, and AltitudeModeTerrainFrame.

◆ altitudeModeShortDescription()

QString QGroundControlQmlGlobal::altitudeModeShortDescription ( AltMode  altMode)

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

Definition at line 283 of file QGroundControlQmlGlobal.cc.

References AltitudeModeAbsolute, AltitudeModeCalcAboveTerrain, AltitudeModeMixed, AltitudeModeNone, AltitudeModeRelative, and AltitudeModeTerrainFrame.

◆ apmFirmwareSupported()

bool QGroundControlQmlGlobal::apmFirmwareSupported ( )

◆ appName()

QString QGroundControlQmlGlobal::appName ( )
static

Definition at line 335 of file QGroundControlQmlGlobal.cc.

◆ categoryLoggingOn()

bool QGroundControlQmlGlobal::categoryLoggingOn ( const QString &  category)
static

Returns true if logging is turned on for the specified category.

Definition at line 365 of file QGroundControlQmlGlobal.cc.

References QGCLoggingCategoryManager::categoryLoggingOn().

◆ clearDeleteAllSettingsNextBoot()

void QGroundControlQmlGlobal::clearDeleteAllSettingsNextBoot ( )
static

◆ CONSTANT()

QString appName READ appName QGroundControlQmlGlobal::CONSTANT ( LinkManager *linkManager READ linkManager  CONSTANT) const &

< This palette will always return enabled colors

< Zoom level to use when either gcs or vehicle shows up for first time < z order for top most items, toolbar, main window sub view < z order value to widgets, for example: zoom controls, hud widgetss

◆ corePlugin()

QGCCorePlugin * QGroundControlQmlGlobal::corePlugin ( )
inline

Definition at line 170 of file QGroundControlQmlGlobal.h.

◆ deleteAllSettingsNextBoot()

void QGroundControlQmlGlobal::deleteAllSettingsNextBoot ( )
static

◆ disableAllLoggingCategories()

void QGroundControlQmlGlobal::disableAllLoggingCategories ( )
static

◆ elevationProviderName()

QString QGroundControlQmlGlobal::elevationProviderName ( )

◆ elevationProviderNotice()

QString QGroundControlQmlGlobal::elevationProviderNotice ( )

◆ flatLoggingCategoriesModel()

QmlObjectListModel * QGroundControlQmlGlobal::flatLoggingCategoriesModel ( )
static

Returns the flat list of available logging category names.

Definition at line 355 of file QGroundControlQmlGlobal.cc.

References QGCLoggingCategoryManager::flatCategoryModel(), and QGCLoggingCategoryManager::instance().

◆ flightMapPosition()

static QGeoCoordinate QGroundControlQmlGlobal::flightMapPosition ( )
inlinestatic

Definition at line 177 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

◆ gpsRtkFactGroup()

FactGroup * QGroundControlQmlGlobal::gpsRtkFactGroup ( )
inline

Definition at line 173 of file QGroundControlQmlGlobal.h.

◆ hasAPMSupport()

bool QGroundControlQmlGlobal::hasAPMSupport ( )
inline

Definition at line 191 of file QGroundControlQmlGlobal.h.

◆ hasMAVLinkInspector()

bool QGroundControlQmlGlobal::hasMAVLinkInspector ( )
inline

Definition at line 197 of file QGroundControlQmlGlobal.h.

◆ isMultiplexingEnabledChanged

void QGroundControlQmlGlobal::isMultiplexingEnabledChanged ( bool  enabled)
signal

◆ linesIntersect()

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

Definition at line 219 of file QGroundControlQmlGlobal.cc.

◆ linkManager()

LinkManager * QGroundControlQmlGlobal::linkManager ( )
inline

Definition at line 164 of file QGroundControlQmlGlobal.h.

◆ loadBoolGlobalSetting()

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

Definition at line 106 of file QGroundControlQmlGlobal.cc.

◆ loadGlobalSetting()

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

Definition at line 92 of file QGroundControlQmlGlobal.cc.

◆ mapEngineManager()

QGCMapEngineManager * QGroundControlQmlGlobal::mapEngineManager ( )
inline

Definition at line 166 of file QGroundControlQmlGlobal.h.

◆ mavlinkSystemIDChanged

void QGroundControlQmlGlobal::mavlinkSystemIDChanged ( int  id)
signal

◆ missionCommandTree()

MissionCommandTree * QGroundControlQmlGlobal::missionCommandTree ( )
inline

Definition at line 168 of file QGroundControlQmlGlobal.h.

◆ multiVehicleManager()

MultiVehicleManager * QGroundControlQmlGlobal::multiVehicleManager ( )
inline

Definition at line 165 of file QGroundControlQmlGlobal.h.

◆ parameterFileExtension()

QString QGroundControlQmlGlobal::parameterFileExtension ( void  ) const

Definition at line 325 of file QGroundControlQmlGlobal.cc.

References AppSettings::parameterFileExtension.

◆ px4ProFirmwareSupported()

bool QGroundControlQmlGlobal::px4ProFirmwareSupported ( )

◆ qgcAppDate()

static QString QGroundControlQmlGlobal::qgcAppDate ( )
inlinestatic

Definition at line 215 of file QGroundControlQmlGlobal.h.

References ObjectListModelBase::index().

◆ qgcDailyBuild()

static bool QGroundControlQmlGlobal::qgcDailyBuild ( )
inlinestatic

Definition at line 219 of file QGroundControlQmlGlobal.h.

◆ qgcPositionManger()

QGCPositionManager * QGroundControlQmlGlobal::qgcPositionManger ( )
inline

Definition at line 167 of file QGroundControlQmlGlobal.h.

◆ qgcVersion()

QString QGroundControlQmlGlobal::qgcVersion ( void  )
static

Definition at line 246 of file QGroundControlQmlGlobal.cc.

◆ saveBoolGlobalSetting()

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

Definition at line 99 of file QGroundControlQmlGlobal.cc.

References value.

◆ setCategoryLoggingOn()

void QGroundControlQmlGlobal::setCategoryLoggingOn ( const QString &  category,
bool  enable 
)
static

Turns on/off logging for the specified category. State is saved in app settings.

Definition at line 360 of file QGroundControlQmlGlobal.cc.

References QGCLoggingCategoryManager::instance(), and QGCLoggingCategoryManager::setCategoryLoggingOn().

◆ setFlightMapPosition()

void QGroundControlQmlGlobal::setFlightMapPosition ( QGeoCoordinate &  coordinate)

Definition at line 229 of file QGroundControlQmlGlobal.cc.

References flightMapPosition(), and flightMapPositionChanged().

◆ setFlightMapZoom()

void QGroundControlQmlGlobal::setFlightMapZoom ( double  zoom)

Definition at line 238 of file QGroundControlQmlGlobal.cc.

References flightMapZoom(), and flightMapZoomChanged().

◆ settingsManager()

SettingsManager * QGroundControlQmlGlobal::settingsManager ( )
inline

Definition at line 171 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 304 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  )

◆ startAPMArduCopterMockLink()

void QGroundControlQmlGlobal::startAPMArduCopterMockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

◆ startAPMArduPlaneMockLink()

void QGroundControlQmlGlobal::startAPMArduPlaneMockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

Definition at line 146 of file QGroundControlQmlGlobal.cc.

References MockLink::startAPMArduPlaneMockLink().

◆ startAPMArduRoverMockLink()

void QGroundControlQmlGlobal::startAPMArduRoverMockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

Definition at line 168 of file QGroundControlQmlGlobal.cc.

References MockLink::startAPMArduRoverMockLink().

◆ startAPMArduSubMockLink()

void QGroundControlQmlGlobal::startAPMArduSubMockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

Definition at line 157 of file QGroundControlQmlGlobal.cc.

References MockLink::startAPMArduSubMockLink().

◆ startGenericMockLink()

void QGroundControlQmlGlobal::startGenericMockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

Definition at line 124 of file QGroundControlQmlGlobal.cc.

References MockLink::startGenericMockLink().

◆ startPX4MockLink()

void QGroundControlQmlGlobal::startPX4MockLink ( bool  sendStatusText,
bool  enableCamera,
bool  enableGimbal 
)

Definition at line 113 of file QGroundControlQmlGlobal.cc.

References MockLink::startPX4MockLink().

◆ stopOneMockLink()

void QGroundControlQmlGlobal::stopOneMockLink ( void  )

Definition at line 179 of file QGroundControlQmlGlobal.cc.

References MockLink::disconnect().

◆ telemetryFileExtension()

QString QGroundControlQmlGlobal::telemetryFileExtension ( void  ) const

Definition at line 330 of file QGroundControlQmlGlobal.cc.

References AppSettings::telemetryFileExtension.

◆ treeLoggingCategoriesModel()

QmlObjectListModel * QGroundControlQmlGlobal::treeLoggingCategoriesModel ( )
static

Returns the hierarchical list of available logging category names.

Definition at line 350 of file QGroundControlQmlGlobal.cc.

References QGCLoggingCategoryManager::instance(), and QGCLoggingCategoryManager::treeCategoryModel().

◆ unitsConversion()

QmlUnitsConversion * QGroundControlQmlGlobal::unitsConversion ( )
inline

Definition at line 176 of file QGroundControlQmlGlobal.h.

◆ videoManager()

VideoManager * QGroundControlQmlGlobal::videoManager ( )
inline

Definition at line 169 of file QGroundControlQmlGlobal.h.

◆ zOrderMapItems()

qreal QGroundControlQmlGlobal::zOrderMapItems ( )
inline

Definition at line 182 of file QGroundControlQmlGlobal.h.

◆ zOrderTopMost()

qreal QGroundControlQmlGlobal::zOrderTopMost ( )
inline

Definition at line 180 of file QGroundControlQmlGlobal.h.

◆ zOrderTrajectoryLines()

qreal QGroundControlQmlGlobal::zOrderTrajectoryLines ( )
inline

Definition at line 185 of file QGroundControlQmlGlobal.h.

◆ zOrderVehicles()

qreal QGroundControlQmlGlobal::zOrderVehicles ( )
inline

Definition at line 184 of file QGroundControlQmlGlobal.h.

◆ zOrderWaypointIndicators()

qreal QGroundControlQmlGlobal::zOrderWaypointIndicators ( )
inline

Definition at line 183 of file QGroundControlQmlGlobal.h.

◆ zOrderWaypointLines()

qreal QGroundControlQmlGlobal::zOrderWaypointLines ( )
inline

Definition at line 186 of file QGroundControlQmlGlobal.h.

◆ zOrderWidgets()

qreal QGroundControlQmlGlobal::zOrderWidgets ( )
inline

Definition at line 181 of file QGroundControlQmlGlobal.h.

Member Data Documentation

◆ kDefaultMessageDialogButtons

constexpr int QGroundControlQmlGlobal::kDefaultMessageDialogButtons = 0x00000400
staticconstexpr

Definition at line 47 of file QGroundControlQmlGlobal.h.

◆ value

QString appName READ appName const QString& QGroundControlQmlGlobal::value

Definition at line 108 of file QGroundControlQmlGlobal.h.

Referenced by QGroundControlQmlGlobal(), and saveBoolGlobalSetting().


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