Skip to content
SettingsManager.h 5.05 KiB
Newer Older
Don Gagne's avatar
Don Gagne committed
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
Don Gagne's avatar
Don Gagne committed
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#ifndef SettingsManager_H
#define SettingsManager_H

#include "QGCLoggingCategory.h"
#include "Joystick.h"
#include "MultiVehicleManager.h"
#include "QGCToolbox.h"
#include "AppSettings.h"
#include "UnitsSettings.h"
#include "AutoConnectSettings.h"
#include "VideoSettings.h"
#include "FlightMapSettings.h"
Don Gagne's avatar
Don Gagne committed
#include "RTKSettings.h"
Don Gagne's avatar
 
Don Gagne committed
#include "FlyViewSettings.h"
#include "PlanViewSettings.h"
#include "BrandImageSettings.h"
Don Gagne's avatar
 
Don Gagne committed
#include "OfflineMapsSettings.h"
Don Gagne's avatar
 
Don Gagne committed
#include "APMMavlinkStreamRateSettings.h"
Don Gagne's avatar
 
Don Gagne committed
#include "FirmwareUpgradeSettings.h"
DonLakeFlyer's avatar
 
DonLakeFlyer committed
#include "ADSBVehicleManagerSettings.h"
#if defined(QGC_AIRMAP_ENABLED)
Don Gagne's avatar
Don Gagne committed
#include <QVariantList>

/// Provides access to all app settings
class SettingsManager : public QGCTool
{
    Q_OBJECT
    
public:
    SettingsManager(QGCApplication* app, QGCToolbox* toolbox);
#if defined(QGC_AIRMAP_ENABLED)
Don Gagne's avatar
 
Don Gagne committed
    Q_PROPERTY(QObject* airMapSettings                  READ airMapSettings                 CONSTANT)
Don Gagne's avatar
 
Don Gagne committed
    Q_PROPERTY(QObject* appSettings                     READ appSettings                    CONSTANT)
    Q_PROPERTY(QObject* unitsSettings                   READ unitsSettings                  CONSTANT)
    Q_PROPERTY(QObject* autoConnectSettings             READ autoConnectSettings            CONSTANT)
    Q_PROPERTY(QObject* videoSettings                   READ videoSettings                  CONSTANT)
    Q_PROPERTY(QObject* flightMapSettings               READ flightMapSettings              CONSTANT)
    Q_PROPERTY(QObject* rtkSettings                     READ rtkSettings                    CONSTANT)
    Q_PROPERTY(QObject* flyViewSettings                 READ flyViewSettings                CONSTANT)
    Q_PROPERTY(QObject* planViewSettings                READ planViewSettings               CONSTANT)
    Q_PROPERTY(QObject* brandImageSettings              READ brandImageSettings             CONSTANT)
Don Gagne's avatar
 
Don Gagne committed
    Q_PROPERTY(QObject* offlineMapsSettings             READ offlineMapsSettings            CONSTANT)
    Q_PROPERTY(QObject* firmwareUpgradeSettings         READ firmwareUpgradeSettings        CONSTANT)
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    Q_PROPERTY(QObject* adsbVehicleManagerSettings      READ adsbVehicleManagerSettings     CONSTANT)
#if !defined(NO_ARDUPILOT_DIALECT)
Don Gagne's avatar
 
Don Gagne committed
    Q_PROPERTY(QObject* apmMavlinkStreamRateSettings    READ apmMavlinkStreamRateSettings   CONSTANT)
Don Gagne's avatar
Don Gagne committed
    // Override from QGCTool
    virtual void setToolbox(QGCToolbox *toolbox);

#if defined(QGC_AIRMAP_ENABLED)
    AirMapSettings*         airMapSettings      (void) { return _airMapSettings; }
Don Gagne's avatar
 
Don Gagne committed
    AppSettings*                    appSettings                 (void) { return _appSettings; }
    UnitsSettings*                  unitsSettings               (void) { return _unitsSettings; }
    AutoConnectSettings*            autoConnectSettings         (void) { return _autoConnectSettings; }
    VideoSettings*                  videoSettings               (void) { return _videoSettings; }
    FlightMapSettings*              flightMapSettings           (void) { return _flightMapSettings; }
    RTKSettings*                    rtkSettings                 (void) { return _rtkSettings; }
    FlyViewSettings*                flyViewSettings             (void) { return _flyViewSettings; }
    PlanViewSettings*               planViewSettings            (void) { return _planViewSettings; }
    BrandImageSettings*             brandImageSettings          (void) { return _brandImageSettings; }
Don Gagne's avatar
 
Don Gagne committed
    OfflineMapsSettings*            offlineMapsSettings         (void) { return _offlineMapsSettings; }
Don Gagne's avatar
 
Don Gagne committed
    FirmwareUpgradeSettings*        firmwareUpgradeSettings     (void) { return _firmwareUpgradeSettings; }
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    ADSBVehicleManagerSettings*     adsbVehicleManagerSettings  (void) { return _adsbVehicleManagerSettings; }
#if !defined(NO_ARDUPILOT_DIALECT)
Don Gagne's avatar
 
Don Gagne committed
    APMMavlinkStreamRateSettings*   apmMavlinkStreamRateSettings(void) { return _apmMavlinkStreamRateSettings; }
Don Gagne's avatar
Don Gagne committed
private:
#if defined(QGC_AIRMAP_ENABLED)
Don Gagne's avatar
 
Don Gagne committed
    AppSettings*                    _appSettings;
    UnitsSettings*                  _unitsSettings;
    AutoConnectSettings*            _autoConnectSettings;
    VideoSettings*                  _videoSettings;
    FlightMapSettings*              _flightMapSettings;
    RTKSettings*                    _rtkSettings;
    FlyViewSettings*                _flyViewSettings;
    PlanViewSettings*               _planViewSettings;
    BrandImageSettings*             _brandImageSettings;
Don Gagne's avatar
 
Don Gagne committed
    OfflineMapsSettings*            _offlineMapsSettings;
Don Gagne's avatar
 
Don Gagne committed
    FirmwareUpgradeSettings*        _firmwareUpgradeSettings;
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    ADSBVehicleManagerSettings*     _adsbVehicleManagerSettings;
#if !defined(NO_ARDUPILOT_DIALECT)
Don Gagne's avatar
 
Don Gagne committed
    APMMavlinkStreamRateSettings*   _apmMavlinkStreamRateSettings;