Skip to content
AirMapManager.h 1.88 KiB
Newer Older
/****************************************************************************
 *
 *   (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.
 *
 ****************************************************************************/

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

#include "QGCLoggingCategory.h"

#include <airmap/qt/logger.h>
#include <airmap/qt/types.h>
Gus Grubba's avatar
Gus Grubba committed
#include <memory>
Gus Grubba's avatar
Gus Grubba committed
class QGCToolbox;
class AirMapSharedState;
class AirspaceVehicleManager;
class AirspaceRestrictionProvider;
class AirspaceRulesetsProvider;
class AirspaceWeatherInfoProvider;

Q_DECLARE_LOGGING_CATEGORY(AirMapManagerLog)
//-----------------------------------------------------------------------------
 * @class AirMapManager
 * AirMap implementation of AirspaceManager
class AirMapManager : public AirspaceManager
{
    Q_OBJECT
    
public:
    AirMapManager(QGCApplication* app, QGCToolbox* toolbox);
    virtual ~AirMapManager();
    void setToolbox (QGCToolbox* toolbox) override;
    AirspaceVehicleManager*         instantiateVehicle                      (const Vehicle& vehicle) override;
    AirspaceRestrictionProvider*    instantiateRestrictionProvider          () override;
    AirspaceRulesetsProvider*       instantiateRulesetsProvider             () override;
    AirspaceWeatherInfoProvider*    instatiateAirspaceWeatherInfoProvider   () override;
    QString name            () const override { return "AirMap"; }
    void _error             (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);
    void _settingsChanged   ();
    AirMapSharedState                               _shared;
    std::shared_ptr<airmap::qt::Logger>             _logger;
    std::shared_ptr<airmap::qt::DispatchingLogger>  _dispatchingLogger;