5#include <QtCore/QLoggingCategory>
7#include <QtCore/QObject>
8#include <QtCore/QVariantList>
9#include <QtQmlIntegration/QtQmlIntegration>
12class MissionCommandTreeTest;
40 Q_MOC_INCLUDE(
"Vehicle.h")
42#ifdef QGC_UNITTEST_BUILD
43 friend class MissionCommandTreeTest;
68 QString
rawName(MAV_CMD command)
const;
81 void _collapseHierarchy(
const MissionCommandList *cmdList, QMap<MAV_CMD, MissionCommandUIInfo*> &collapsedTree)
const;
83 QStringList _availableCategoriesForVehicle(
Vehicle *vehicle);
86 const QString _allCommandsCategory = tr(
"All commands");
89 QMap<QGCMAVLink::FirmwareClass_t, QMap<QGCMAVLink::VehicleClass_t, MissionCommandList*>> _staticCommandTree;
92 QMap<QGCMAVLink::FirmwareClass_t, QMap<QGCMAVLink::VehicleClass_t, QMap<MAV_CMD, MissionCommandUIInfo*>>> _allCommands;
Maintains a list of MissionCommandUIInfo objects loaded from a json file.
bool isTakeoffCommand(MAV_CMD command) const
bool isLandCommand(MAV_CMD command) const
~MissionCommandTree()
Destructor for the MissionCommandTree class.
const QList< MAV_CMD > & allCommandIds() const
static MissionCommandTree * instance()
QString rawName(MAV_CMD command) const
Returns the raw name for the specified command.
QVariantList getCommandsForCategory(Vehicle *vehicle, const QString &category, bool showFlyThroughCommands)
QString friendlyName(MAV_CMD command) const
Returns the friendly name for the specified command.
QStringList categoriesForVehicle(Vehicle *vehicle)
const MissionCommandUIInfo * getUIInfo(Vehicle *vehicle, QGCMAVLink::VehicleClass_t vtolMode, MAV_CMD command)