SettingsManager.h 3.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/****************************************************************************
 *
 *   (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 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"
21
#include "FlightMapSettings.h"
Don Gagne's avatar
Don Gagne committed
22
#include "RTKSettings.h"
23
#include "GuidedSettings.h"
24
#include "BrandImageSettings.h"
25
#if defined(QGC_AIRMAP_ENABLED)
26
#include "AirMapSettings.h"
27
#endif
28 29 30 31 32 33 34 35
#include <QVariantList>

/// Provides access to all app settings
class SettingsManager : public QGCTool
{
    Q_OBJECT
    
public:
36
    SettingsManager(QGCApplication* app, QGCToolbox* toolbox);
37

38
#if defined(QGC_AIRMAP_ENABLED)
39
    Q_PROPERTY(QObject* airMapSettings      READ airMapSettings         CONSTANT)
40
#endif
41 42 43 44
    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)
45
    Q_PROPERTY(QObject* flightMapSettings   READ flightMapSettings      CONSTANT)
46 47
    Q_PROPERTY(QObject* rtkSettings         READ rtkSettings            CONSTANT)
    Q_PROPERTY(QObject* guidedSettings      READ guidedSettings         CONSTANT)
48
    Q_PROPERTY(QObject* brandImageSettings  READ brandImageSettings     CONSTANT)
49 50 51 52

    // Override from QGCTool
    virtual void setToolbox(QGCToolbox *toolbox);

53
#if defined(QGC_AIRMAP_ENABLED)
54
    AirMapSettings*         airMapSettings      (void) { return _airMapSettings; }
55
#endif
56 57 58 59
    AppSettings*            appSettings         (void) { return _appSettings; }
    UnitsSettings*          unitsSettings       (void) { return _unitsSettings; }
    AutoConnectSettings*    autoConnectSettings (void) { return _autoConnectSettings; }
    VideoSettings*          videoSettings       (void) { return _videoSettings; }
60
    FlightMapSettings*      flightMapSettings   (void) { return _flightMapSettings; }
Don Gagne's avatar
Don Gagne committed
61
    RTKSettings*            rtkSettings         (void) { return _rtkSettings; }
62
    GuidedSettings*         guidedSettings      (void) { return _guidedSettings; }
63
    BrandImageSettings*     brandImageSettings  (void) { return _brandImageSettings; }
64 65

private:
66
#if defined(QGC_AIRMAP_ENABLED)
67
    AirMapSettings*         _airMapSettings;
68
#endif
69 70 71 72
    AppSettings*            _appSettings;
    UnitsSettings*          _unitsSettings;
    AutoConnectSettings*    _autoConnectSettings;
    VideoSettings*          _videoSettings;
73
    FlightMapSettings*      _flightMapSettings;
Don Gagne's avatar
Don Gagne committed
74
    RTKSettings*            _rtkSettings;
75
    GuidedSettings*         _guidedSettings;
76
    BrandImageSettings*     _brandImageSettings;
77 78 79
};

#endif