FlightMapSettings.h 1.38 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
#pragma once
11 12 13 14 15 16 17 18

#include "SettingsGroup.h"

class FlightMapSettings : public SettingsGroup
{
    Q_OBJECT

public:
19
    FlightMapSettings(QObject* parent = nullptr);
20 21 22 23 24

    // This enum must match the json meta data
    typedef enum {
        mapProviderBing,
        mapProviderGoogle,
Gus Grubba's avatar
Gus Grubba committed
25
        mapProviderStarkart,
26
        mapProviderMapbox,
27
        mapProviderEsri,
28 29
        mapProviderEniro,
        mapProviderVWorld
30 31 32 33 34 35 36 37 38 39
    } MapProvider_t;

    // This enum must match the json meta data
    typedef enum {
        mapTypeStreet,
        mapTypeSatellite,
        mapTypeHybrid,
        mapTypeTerrain
    } MapType_t;

40 41 42
    DEFINE_SETTING_NAME_GROUP()
    DEFINE_SETTINGFACT(mapProvider)
    DEFINE_SETTINGFACT(mapType)
43 44 45 46 47 48 49 50 51

signals:
    void mapTypeChanged(void);

private slots:
    void _newMapProvider(QVariant value);

private:
    void _removeEnumValue(int value, QStringList& enumStrings, QVariantList& enumValues);
Gus Grubba's avatar
Gus Grubba committed
52
    void _excludeProvider(MapProvider_t provider);
53 54 55 56

    QStringList     _savedMapTypeStrings;
    QVariantList    _savedMapTypeValues;
};