|
QGroundControl
Ground Control Station for MAVLink Drones
|
#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 MissionCommandUIInfo & | operator= (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 MissionCmdParamInfo * | getParamInfo (int index, bool &showUI) const |
Friends | |
| class | MissionCommandTree |
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.
| MissionCommandUIInfo::MissionCommandUIInfo | ( | QObject * | parent = nullptr | ) |
Definition at line 46 of file MissionCommandUIInfo.cc.
| MissionCommandUIInfo::MissionCommandUIInfo | ( | const MissionCommandUIInfo & | other, |
| QObject * | parent = nullptr |
||
| ) |
Definition at line 52 of file MissionCommandUIInfo.cc.
| QString MissionCommandUIInfo::category | ( | void | ) | const |
Definition at line 71 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::category(), and MissionCommandTree::getCommandsForCategory().
|
inline |
Definition at line 131 of file MissionCommandUIInfo.h.
| QString MissionCommandUIInfo::description | ( | void | ) | const |
Definition at line 80 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::commandDescription().
| bool MissionCommandUIInfo::friendlyEdit | ( | void | ) | const |
Definition at line 89 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::friendlyEditAllowed().
| QString MissionCommandUIInfo::friendlyName | ( | void | ) | const |
Definition at line 98 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::commandName(), and MissionCommandTree::friendlyName().
| const MissionCmdParamInfo * MissionCommandUIInfo::getParamInfo | ( | int | index, |
| bool & | showUI | ||
| ) | const |
Retruns parameter information for specified parameter
| index | paremeter index to retrieve, 1-7 |
| showUI | true: show parameter in editor, false: hide parameter in editor |
Definition at line 459 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::showLoiterRadius().
|
inline |
Definition at line 145 of file MissionCommandUIInfo.h.
| bool MissionCommandUIInfo::isLandCommand | ( | void | ) | const |
Definition at line 143 of file MissionCommandUIInfo.cc.
Referenced by MissionCommandTree::isLandCommand().
| bool MissionCommandUIInfo::isLoiterCommand | ( | void | ) | const |
Definition at line 161 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::isLoiterItem().
| bool MissionCommandUIInfo::isStandaloneCoordinate | ( | void | ) | const |
Definition at line 116 of file MissionCommandUIInfo.cc.
Referenced by TransectStyleComplexItem::_load(), TransectStyleComplexItem::amslEntryAlt(), TransectStyleComplexItem::amslExitAlt(), MissionManager::generateResumeMission(), MissionCommandTree::getCommandsForCategory(), and SimpleMissionItem::isStandaloneCoordinate().
| bool MissionCommandUIInfo::isTakeoffCommand | ( | void | ) | const |
Definition at line 152 of file MissionCommandUIInfo.cc.
Referenced by MissionManager::generateResumeMission(), and MissionCommandTree::isTakeoffCommand().
| bool MissionCommandUIInfo::loadJsonInfo | ( | const QJsonObject & | jsonObject, |
| bool | requireFullObject, | ||
| QString & | errorString | ||
| ) |
Load the data in the object from the specified json
| jsonObject | Json object to load from |
| requireFullObject | true: not a partial load, false: partial load allowed |
Definition at line 198 of file MissionCommandUIInfo.cc.
References errorString, FactMetaData::kUnknownDecimalPlaces, JsonParsing::possibleNaNJsonValue(), FactMetaData::splitTranslatedList(), JsonParsing::validateKeyTypes(), and JsonParsing::validateRequiredKeys().
| const MissionCommandUIInfo & MissionCommandUIInfo::operator= | ( | const MissionCommandUIInfo & | other | ) |
Definition at line 58 of file MissionCommandUIInfo.cc.
| QString MissionCommandUIInfo::rawName | ( | void | ) | const |
Definition at line 107 of file MissionCommandUIInfo.cc.
Referenced by MissionCommandTree::rawName().
| bool MissionCommandUIInfo::specifiesAltitudeOnly | ( | void | ) | const |
Definition at line 134 of file MissionCommandUIInfo.cc.
Referenced by SimpleMissionItem::applyNewAltitude(), and SimpleMissionItem::specifiesAltitudeOnly().
| bool MissionCommandUIInfo::specifiesCoordinate | ( | void | ) | const |
Definition at line 125 of file MissionCommandUIInfo.cc.
Referenced by LandingComplexItem::_createDoLandStartItem(), TransectStyleComplexItem::_load(), TransectStyleComplexItem::amslEntryAlt(), TransectStyleComplexItem::amslExitAlt(), SimpleMissionItem::applyNewAltitude(), MissionManager::generateResumeMission(), MissionCommandTree::getCommandsForCategory(), and SimpleMissionItem::specifiesCoordinate().
|
friend |
Definition at line 229 of file MissionCommandUIInfo.h.