AirMapManager.h 1.88 KB
Newer Older
1 2
/****************************************************************************
 *
3
 *   (c) 2017 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
#pragma once
11

Gus Grubba's avatar
Gus Grubba committed
12 13
#include "AirspaceManager.h"

14 15
#include "QGCLoggingCategory.h"

16 17
#include <airmap/qt/logger.h>
#include <airmap/qt/types.h>
18

Gus Grubba's avatar
Gus Grubba committed
19
#include <memory>
20

Gus Grubba's avatar
Gus Grubba committed
21 22 23 24 25 26 27 28
class QGCToolbox;
class AirMapSharedState;
class AirspaceVehicleManager;
class AirspaceRestrictionProvider;
class AirspaceRulesetsProvider;
class AirspaceWeatherInfoProvider;

Q_DECLARE_LOGGING_CATEGORY(AirMapManagerLog)
29

30
//-----------------------------------------------------------------------------
31
/**
32 33
 * @class AirMapManager
 * AirMap implementation of AirspaceManager
34
 */
35

36 37 38 39 40 41
class AirMapManager : public AirspaceManager
{
    Q_OBJECT
    
public:
    AirMapManager(QGCApplication* app, QGCToolbox* toolbox);
42
    virtual ~AirMapManager();
43

44
    void setToolbox (QGCToolbox* toolbox) override;
45

46 47 48 49
    AirspaceVehicleManager*         instantiateVehicle                      (const Vehicle& vehicle) override;
    AirspaceRestrictionProvider*    instantiateRestrictionProvider          () override;
    AirspaceRulesetsProvider*       instantiateRulesetsProvider             () override;
    AirspaceWeatherInfoProvider*    instatiateAirspaceWeatherInfoProvider   () override;
50

51
    QString name            () const override { return "AirMap"; }
52

53
private slots:
54 55
    void _error             (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);
    void _settingsChanged   ();
56 57

private:
58 59 60
    AirMapSharedState                               _shared;
    std::shared_ptr<airmap::qt::Logger>             _logger;
    std::shared_ptr<airmap::qt::DispatchingLogger>  _dispatchingLogger;
61 62
};

63