AirspaceManager.h 2.33 KB
Newer Older
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 26 27 28
/****************************************************************************
 *
 *   (c) 2017 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.
 *
 ****************************************************************************/

#pragma once

/**
 * @file AirspaceManager.h
 * Dummy file for when airspace management is disabled
 */

#include "QGCToolbox.h"
#include <QGeoCoordinate>

//-----------------------------------------------------------------------------
/**
 * @class AirspaceManager
 * Base class for airspace management. There is one (global) instantiation of this
 */
class AirspaceManager : public QGCTool {
    Q_OBJECT
public:
    AirspaceManager(QGCApplication* app, QGCToolbox* toolbox);
29
    virtual ~AirspaceManager() override;
30 31 32 33 34 35 36 37 38

    Q_PROPERTY(QString                      providerName        READ providerName       CONSTANT)
    Q_PROPERTY(QObject*                     weatherInfo         READ weatherInfo        CONSTANT)
    Q_PROPERTY(QObject*                     advisories          READ advisories         CONSTANT)
    Q_PROPERTY(QObject*                     ruleSets            READ ruleSets           CONSTANT)
    Q_PROPERTY(QObject*                     airspaces           READ airspaces          CONSTANT)
    Q_PROPERTY(QObject*                     flightPlan          READ flightPlan         CONSTANT)
    Q_PROPERTY(bool                         airspaceVisible     READ airspaceVisible    CONSTANT)

39
    Q_INVOKABLE void setROI                     (const QGeoCoordinate& pointNW, const QGeoCoordinate& pointSE, bool planView, bool reset = false);
40 41 42 43 44 45 46 47 48 49 50 51

    QObject*                    weatherInfo    () { return &_dummy; }
    QObject*                    advisories     () { return &_dummy; }
    QObject*                    ruleSets       () { return &_dummy; }
    QObject*                    airspaces      () { return &_dummy; }
    QObject*                    flightPlan     () { return &_dummy; }

    void setToolbox(QGCToolbox* toolbox) override;

    virtual QString             providerName    () const { return QString("None"); }

    virtual bool                airspaceVisible () { return false; }
Gus Grubba's avatar
Gus Grubba committed
52 53 54 55

signals:
    void                airspaceVisibleChanged  ();

56 57 58
private:
    QObject                     _dummy;
};