PX4GeoFenceManager.h 1.42 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#ifndef PX4GeoFenceManager_H
#define PX4GeoFenceManager_H

#include "GeoFenceManager.h"
#include "QGCMAVLink.h"
#include "FactSystem.h"

class PX4GeoFenceManager : public GeoFenceManager
{
    Q_OBJECT
    
public:
    PX4GeoFenceManager(Vehicle* vehicle);
    ~PX4GeoFenceManager();

    // Overrides from GeoFenceManager
26 27 28 29 30
    bool            circleEnabled   (void) const final { return _circleEnabled; }
    float           circleRadius    (void) const final;
    QVariantList    params          (void) const final { return _params; }
    QStringList     paramLabels     (void) const final { return _paramLabels; }
    QString         editorQml       (void) const final { return QStringLiteral("qrc:/FirmwarePlugin/PX4/PX4GeoFenceEditor.qml"); }
31
    void            removeAll       (void) final;
Don Gagne's avatar
Don Gagne committed
32 33 34 35 36 37 38 39 40 41

private slots:
    void _circleRadiusRawValueChanged(QVariant value);
    void _parametersReady(void);
    
private:
    bool _firstParamLoadComplete;

    QVariantList    _params;
    QStringList     _paramLabels;
42
    bool            _circleEnabled;
Don Gagne's avatar
Don Gagne committed
43 44 45 46 47

    Fact* _circleRadiusFact;
};

#endif