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

#include <MissionCommandUIInfo.h>

+ Inheritance diagram for MissionCommandUIInfo:
+ Collaboration diagram for MissionCommandUIInfo:

Public Member Functions

 MissionCommandUIInfo (QObject *parent=nullptr)
 
 MissionCommandUIInfo (const MissionCommandUIInfo &other, QObject *parent=nullptr)
 
const MissionCommandUIInfooperator= (const MissionCommandUIInfo &other)
 
QString category READ category CONSTANT (QString description READ description CONSTANT) 1(bool friendlyEdit READ friendlyEdit CONSTANT) 1(QString friendlyName READ friendlyName CONSTANT) 1(QString rawName READ rawName CONSTANT) 1(bool isStandaloneCoordinate READ isStandaloneCoordinate CONSTANT) 1(bool specifiesCoordinate READ specifiesCoordinate CONSTANT) 1(bool specifiesAltitudeOnly READ specifiesAltitudeOnly CONSTANT) 1(bool isLandCommand READ isLandCommand CONSTANT) 1(bool isTakeoffCommand READ isTakeoffCommand CONSTANT) 1(bool isLoiterCommand READ isLoiterCommand CONSTANT) 1(int command READ intCommand CONSTANT) MAV_CMD command(void) const
 
int intCommand (void) const
 
QString category (void) const
 
QString description (void) const
 
bool friendlyEdit (void) const
 
QString friendlyName (void) const
 
QString rawName (void) const
 
bool isStandaloneCoordinate (void) const
 
bool specifiesCoordinate (void) const
 
bool specifiesAltitudeOnly (void) const
 
bool isLandCommand (void) const
 
bool isTakeoffCommand (void) const
 
bool isLoiterCommand (void) const
 
bool loadJsonInfo (const QJsonObject &jsonObject, bool requireFullObject, QString &errorString)
 
const MissionCmdParamInfogetParamInfo (int index, bool &showUI) const
 

Friends

class MissionCommandTree
 

Detailed Description

UI Information associated with a mission command (MAV_CMD)

MissionCommandUIInfo is used to automatically generate editing ui for a MAV_CMD. This object also supports the concept of only having a set of partial information for the command. This is used to create overrides of the base command information. For on override just specify the keys you want to modify from the base command ui info. To override param ui info you must specify the entire MissionParamInfo object.

The json format for a MissionCommandUIInfo object is:

Key Type Default Description id int reauired MAV_CMD id comment string Used to add a comment rawName string required MAV_CMD enum name, should only be set of base tree information friendlyName string rawName Short description of command description string Long description of command specifiesCoordinate bool false true: Command specifies a lat/lon/alt coordinate specifiesAltitudeOnly bool false true: Command specifies an altitude only (no coordinate) standaloneCoordinate bool false true: Vehicle does not fly through coordinate associated with command (exampl: ROI) isTakeoffCommand bool false true: Command specifies a takeoff command (TAEKOFF, VTOL_TAKEOFF, ...) isLandCommand bool false true: Command specifies a land command (LAND, VTOL_LAND, ...) friendlyEdit bool false true: Command supports friendly editing dialog, false: Command supports 'Show all values" style editing only category string Advanced Category which this command belongs to paramRemove string Used by an override to remove params, example: "1,3" will remove params 1 and 3 on the override param[1-7] object MissionCommandParamInfo object

Definition at line 122 of file MissionCommandUIInfo.h.

Constructor & Destructor Documentation

◆ MissionCommandUIInfo() [1/2]

MissionCommandUIInfo::MissionCommandUIInfo ( QObject *  parent = nullptr)

Definition at line 46 of file MissionCommandUIInfo.cc.

◆ MissionCommandUIInfo() [2/2]

MissionCommandUIInfo::MissionCommandUIInfo ( const MissionCommandUIInfo other,
QObject *  parent = nullptr 
)

Definition at line 52 of file MissionCommandUIInfo.cc.

Member Function Documentation

◆ category()

QString MissionCommandUIInfo::category ( void  ) const

◆ CONSTANT()

QString category READ category MissionCommandUIInfo::CONSTANT ( QString description READ description  CONSTANT) const
inline

Definition at line 131 of file MissionCommandUIInfo.h.

◆ description()

QString MissionCommandUIInfo::description ( void  ) const

Definition at line 80 of file MissionCommandUIInfo.cc.

Referenced by SimpleMissionItem::commandDescription().

◆ friendlyEdit()

bool MissionCommandUIInfo::friendlyEdit ( void  ) const

Definition at line 89 of file MissionCommandUIInfo.cc.

Referenced by SimpleMissionItem::friendlyEditAllowed().

◆ friendlyName()

QString MissionCommandUIInfo::friendlyName ( void  ) const

◆ getParamInfo()

const MissionCmdParamInfo * MissionCommandUIInfo::getParamInfo ( int  index,
bool &  showUI 
) const

Retruns parameter information for specified parameter

Parameters
indexparemeter index to retrieve, 1-7
showUItrue: show parameter in editor, false: hide parameter in editor
Returns
Param info for index, NULL for none available

Definition at line 459 of file MissionCommandUIInfo.cc.

Referenced by SimpleMissionItem::showLoiterRadius().

◆ intCommand()

int MissionCommandUIInfo::intCommand ( void  ) const
inline

Definition at line 145 of file MissionCommandUIInfo.h.

◆ isLandCommand()

bool MissionCommandUIInfo::isLandCommand ( void  ) const

Definition at line 143 of file MissionCommandUIInfo.cc.

Referenced by MissionCommandTree::isLandCommand().

◆ isLoiterCommand()

bool MissionCommandUIInfo::isLoiterCommand ( void  ) const

Definition at line 161 of file MissionCommandUIInfo.cc.

Referenced by SimpleMissionItem::isLoiterItem().

◆ isStandaloneCoordinate()

◆ isTakeoffCommand()

bool MissionCommandUIInfo::isTakeoffCommand ( void  ) const

◆ loadJsonInfo()

bool MissionCommandUIInfo::loadJsonInfo ( const QJsonObject &  jsonObject,
bool  requireFullObject,
QString &  errorString 
)

Load the data in the object from the specified json

Parameters
jsonObjectJson object to load from
requireFullObjecttrue: not a partial load, false: partial load allowed
Returns
true: success, false: failure, errorString set

Definition at line 198 of file MissionCommandUIInfo.cc.

References errorString, FactMetaData::kUnknownDecimalPlaces, JsonParsing::possibleNaNJsonValue(), FactMetaData::splitTranslatedList(), JsonParsing::validateKeyTypes(), and JsonParsing::validateRequiredKeys().

◆ operator=()

const MissionCommandUIInfo & MissionCommandUIInfo::operator= ( const MissionCommandUIInfo other)

Definition at line 58 of file MissionCommandUIInfo.cc.

◆ rawName()

QString MissionCommandUIInfo::rawName ( void  ) const

Definition at line 107 of file MissionCommandUIInfo.cc.

Referenced by MissionCommandTree::rawName().

◆ specifiesAltitudeOnly()

bool MissionCommandUIInfo::specifiesAltitudeOnly ( void  ) const

◆ specifiesCoordinate()

Friends And Related Symbol Documentation

◆ MissionCommandTree

friend class MissionCommandTree
friend

Definition at line 229 of file MissionCommandUIInfo.h.


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