5import QGroundControl.Controls
7/// Map provider, type, and elevation provider selection.
8/// Wraps a SettingsGroupLayout with cascading comboboxes driven by QGCMapEngineManager.
10 Layout.fillWidth: true
12 property var _mapEngineManager: QGroundControl.mapEngineManager
13 property Fact _mapProviderFact: QGroundControl.settingsManager.flightMapSettings.mapProvider
14 property Fact _mapTypeFact: QGroundControl.settingsManager.flightMapSettings.mapType
15 property Fact _elevationProviderFact: QGroundControl.settingsManager.flightMapSettings.elevationMapProvider
18 label: qsTr("Provider")
19 model: _mapEngineManager.mapProviderList
21 onActivated: (index) => {
22 _mapProviderFact.rawValue = comboBox.textAt(index)
23 _mapTypeFact.rawValue = _mapEngineManager.mapTypeList(comboBox.textAt(index))[0]
26 Component.onCompleted: {
27 var index = comboBox.find(_mapProviderFact.rawValue)
28 if (index < 0) index = 0
29 comboBox.currentIndex = index
35 model: _mapEngineManager.mapTypeList(_mapProviderFact.rawValue)
37 onActivated: (index) => { _mapTypeFact.rawValue = comboBox.textAt(index) }
39 Component.onCompleted: {
40 var index = comboBox.find(_mapTypeFact.rawValue)
41 if (index < 0) index = 0
42 comboBox.currentIndex = index
47 label: qsTr("Elevation Provider")
48 model: _mapEngineManager.elevationProviderList
50 onActivated: (index) => { _elevationProviderFact.rawValue = comboBox.textAt(index) }
52 Component.onCompleted: {
53 var index = comboBox.find(_elevationProviderFact.rawValue)
54 if (index < 0) index = 0
55 comboBox.currentIndex = index