AirframeComponentAirframes.h 1.21 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

10 11 12 13 14 15 16 17 18 19

/// @file
///     @author Don Gagne <don@thegagnes.com>

#ifndef AIRFRAMECOMPONENTAIRFRAMES_H
#define AIRFRAMECOMPONENTAIRFRAMES_H

#include <QObject>
#include <QQuickItem>
#include <QList>
20
#include <QMap>
21 22 23 24 25 26 27 28 29

#include "UASInterface.h"
#include "AutoPilotPlugin.h"

/// MVC Controller for AirframeComponent.qml.
class AirframeComponentAirframes
{
public:
    typedef struct {
30
        QString name;
31 32 33 34
        int         autostartId;
    } AirframeInfo_t;
    
    typedef struct {
35 36 37
        QString name;
        QString imageResource;
        QList<AirframeInfo_t*> rgAirframeInfo;
38
    } AirframeType_t;
39 40 41

    static QMap<QString, AirframeComponentAirframes::AirframeType_t*>& get();
    static void clear();
42
    static void insert(QString& group, QString& image, QString& name, int id);
43
    
44 45
protected:
    static QMap<QString, AirframeType_t*> rgAirframeTypes;
46 47 48 49 50
    
private:
};

#endif