SettingsManager.h 3.3 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
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"
Don Gagne's avatar
   
Don Gagne committed
23
24
#include "FlyViewSettings.h"
#include "PlanViewSettings.h"
25
#include "BrandImageSettings.h"
26
#if defined(QGC_AIRMAP_ENABLED)
27
#include "AirMapSettings.h"
28
#endif
Don Gagne's avatar
Don Gagne committed
29
30
31
32
33
34
35
36
#include <QVariantList>

/// Provides access to all app settings
class SettingsManager : public QGCTool
{
    Q_OBJECT
    
public:
37
    SettingsManager(QGCApplication* app, QGCToolbox* toolbox);
Don Gagne's avatar
Don Gagne committed
38

39
#if defined(QGC_AIRMAP_ENABLED)
40
    Q_PROPERTY(QObject* airMapSettings      READ airMapSettings         CONSTANT)
41
#endif
Don Gagne's avatar
Don Gagne committed
42
43
44
45
    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)
46
    Q_PROPERTY(QObject* flightMapSettings   READ flightMapSettings      CONSTANT)
Don Gagne's avatar
Don Gagne committed
47
    Q_PROPERTY(QObject* rtkSettings         READ rtkSettings            CONSTANT)
Don Gagne's avatar
   
Don Gagne committed
48
49
    Q_PROPERTY(QObject* flyViewSettings     READ flyViewSettings        CONSTANT)
    Q_PROPERTY(QObject* planViewSettings    READ planViewSettings       CONSTANT)
50
    Q_PROPERTY(QObject* brandImageSettings  READ brandImageSettings     CONSTANT)
Don Gagne's avatar
Don Gagne committed
51
52
53
54

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

55
#if defined(QGC_AIRMAP_ENABLED)
56
    AirMapSettings*         airMapSettings      (void) { return _airMapSettings; }
57
#endif
Don Gagne's avatar
Don Gagne committed
58
59
60
61
    AppSettings*            appSettings         (void) { return _appSettings; }
    UnitsSettings*          unitsSettings       (void) { return _unitsSettings; }
    AutoConnectSettings*    autoConnectSettings (void) { return _autoConnectSettings; }
    VideoSettings*          videoSettings       (void) { return _videoSettings; }
62
    FlightMapSettings*      flightMapSettings   (void) { return _flightMapSettings; }
Don Gagne's avatar
Don Gagne committed
63
    RTKSettings*            rtkSettings         (void) { return _rtkSettings; }
Don Gagne's avatar
   
Don Gagne committed
64
65
    FlyViewSettings*        flyViewSettings     (void) { return _flyViewSettings; }
    PlanViewSettings*       planViewSettings    (void) { return _planViewSettings; }
66
    BrandImageSettings*     brandImageSettings  (void) { return _brandImageSettings; }
Don Gagne's avatar
Don Gagne committed
67
68

private:
69
#if defined(QGC_AIRMAP_ENABLED)
70
    AirMapSettings*         _airMapSettings;
71
#endif
Don Gagne's avatar
Don Gagne committed
72
73
74
75
    AppSettings*            _appSettings;
    UnitsSettings*          _unitsSettings;
    AutoConnectSettings*    _autoConnectSettings;
    VideoSettings*          _videoSettings;
76
    FlightMapSettings*      _flightMapSettings;
Don Gagne's avatar
Don Gagne committed
77
    RTKSettings*            _rtkSettings;
Don Gagne's avatar
   
Don Gagne committed
78
79
    FlyViewSettings*        _flyViewSettings;
    PlanViewSettings*       _planViewSettings;
80
    BrandImageSettings*     _brandImageSettings;
Don Gagne's avatar
Don Gagne committed
81
82
83
};

#endif