AppSettings.h 4.39 KB
Newer Older
1 2 3 4 5 6 7 8 9
/****************************************************************************
 *
 *   (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.
 *
 ****************************************************************************/

10 11
#ifndef AppSettings_H
#define AppSettings_H
12

13
#include "SettingsGroup.h"
14

15
class AppSettings : public SettingsGroup
16 17 18 19
{
    Q_OBJECT
    
public:
20
    AppSettings(QObject* parent = NULL);
21

22 23 24 25 26 27 28
    Q_PROPERTY(Fact* offlineEditingFirmwareType         READ offlineEditingFirmwareType         CONSTANT)
    Q_PROPERTY(Fact* offlineEditingVehicleType          READ offlineEditingVehicleType          CONSTANT)
    Q_PROPERTY(Fact* offlineEditingCruiseSpeed          READ offlineEditingCruiseSpeed          CONSTANT)
    Q_PROPERTY(Fact* offlineEditingHoverSpeed           READ offlineEditingHoverSpeed           CONSTANT)
    Q_PROPERTY(Fact* batteryPercentRemainingAnnounce    READ batteryPercentRemainingAnnounce    CONSTANT)
    Q_PROPERTY(Fact* defaultMissionItemAltitude         READ defaultMissionItemAltitude         CONSTANT)
    Q_PROPERTY(Fact* missionAutoLoadDir                 READ missionAutoLoadDir                 CONSTANT)
29 30
    Q_PROPERTY(Fact* telemetrySave                      READ telemetrySave                      CONSTANT)
    Q_PROPERTY(Fact* telemetrySaveNotArmed              READ telemetrySaveNotArmed              CONSTANT)
31
    Q_PROPERTY(Fact* audioMuted                         READ audioMuted                         CONSTANT)
32 33 34
    Q_PROPERTY(Fact* virtualJoystick                    READ virtualJoystick                    CONSTANT)
    Q_PROPERTY(Fact* appFontPointSize                   READ appFontPointSize                   CONSTANT)
    Q_PROPERTY(Fact* indoorPalette                      READ indoorPalette                      CONSTANT)
35
    Q_PROPERTY(Fact* showLargeCompass                   READ showLargeCompass                   CONSTANT)
36
    Q_PROPERTY(Fact* telemetrySavePath                  READ telemetrySavePath                  CONSTANT)
37 38 39 40 41 42 43 44

    Fact* offlineEditingFirmwareType        (void);
    Fact* offlineEditingVehicleType         (void);
    Fact* offlineEditingCruiseSpeed         (void);
    Fact* offlineEditingHoverSpeed          (void);
    Fact* batteryPercentRemainingAnnounce   (void);
    Fact* defaultMissionItemAltitude        (void);
    Fact* missionAutoLoadDir                (void);
45 46
    Fact* telemetrySave                     (void);
    Fact* telemetrySaveNotArmed             (void);
47 48 49 50
    Fact* audioMuted                        (void);
    Fact* virtualJoystick                   (void);
    Fact* appFontPointSize                  (void);
    Fact* indoorPalette                     (void);
51
    Fact* showLargeCompass                  (void);
52
    Fact* telemetrySavePath                 (void);
53

54
    static const char* appSettingsGroupName;
55 56 57 58 59 60 61

    static const char* offlineEditingFirmwareTypeSettingsName;
    static const char* offlineEditingVehicleTypeSettingsName;
    static const char* offlineEditingCruiseSpeedSettingsName;
    static const char* offlineEditingHoverSpeedSettingsName;
    static const char* batteryPercentRemainingAnnounceSettingsName;
    static const char* defaultMissionItemAltitudeSettingsName;
62
    static const char* missionAutoLoadDirSettingsName;
63 64
    static const char* telemetrySaveName;
    static const char* telemetrySaveNotArmedName;
65
    static const char* audioMutedName;
66 67 68
    static const char* virtualJoystickName;
    static const char* appFontPointSizeName;
    static const char* indoorPaletteName;
69
    static const char* showLargeCompassName;
70
    static const char* telemetrySavePathName;
71 72 73

private slots:
    void _indoorPaletteChanged(void);
74 75 76 77 78 79 80 81

private:
    SettingsFact* _offlineEditingFirmwareTypeFact;
    SettingsFact* _offlineEditingVehicleTypeFact;
    SettingsFact* _offlineEditingCruiseSpeedFact;
    SettingsFact* _offlineEditingHoverSpeedFact;
    SettingsFact* _batteryPercentRemainingAnnounceFact;
    SettingsFact* _defaultMissionItemAltitudeFact;
82
    SettingsFact* _missionAutoLoadDirFact;
83 84
    SettingsFact* _telemetrySaveFact;
    SettingsFact* _telemetrySaveNotArmedFact;
85 86 87 88
    SettingsFact* _audioMutedFact;
    SettingsFact* _virtualJoystickFact;
    SettingsFact* _appFontPointSizeFact;
    SettingsFact* _indoorPaletteFact;
89
    SettingsFact* _showLargeCompassFact;
90
    SettingsFact* _telemetrySavePathFact;
91 92 93
};

#endif