QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MissionCommandList.h
Go to the documentation of this file.
1#pragma once
2
3#include "QGCMAVLink.h"
4
5#include <QtCore/QObject>
6#include <QtCore/QString>
7#include <QtCore/QMap>
8
10
13class MissionCommandList : public QObject
14{
15 Q_OBJECT
16
17public:
19 MissionCommandList(const QString& jsonFilename, bool baseCommandList, QObject* parent = nullptr);
20
22 QStringList& categories(void) { return _categories; }
23
25 MissionCommandUIInfo* getUIInfo(MAV_CMD command) const;
26
27 const QList<MAV_CMD>& commandIds(void) const { return _ids; }
28
29 static constexpr const char* qgcFileType = "MavCmdInfo";
30
31private:
32 void _loadMavCmdInfoJson(const QString& jsonFilename, bool baseCommandList);
33
34 QMap<MAV_CMD, MissionCommandUIInfo*> _infoMap;
35 QList<MAV_CMD> _ids;
36 QStringList _categories;
37
38 static constexpr const char* _versionJsonKey = "version";
39 static constexpr const char* _mavCmdInfoJsonKey = "mavCmdInfo";
40};
Maintains a list of MissionCommandUIInfo objects loaded from a json file.
QStringList & categories(void)
Returns list of categories in this list.
const QList< MAV_CMD > & commandIds(void) const
MissionCommandUIInfo * getUIInfo(MAV_CMD command) const
Returns the ui info for specified command, NULL if command not found.
static constexpr const char * qgcFileType
UI Information associated with a mission command (MAV_CMD)