7import QGroundControl.FactControls
8import QGroundControl.Controls
11 property var _settingsManager: QGroundControl.settingsManager
12 property var _appSettings: _settingsManager.appSettings
13 property var _brandImageSettings: _settingsManager.brandImageSettings
14 property Fact _appFontPointSize: _appSettings.appFontPointSize
15 property Fact _userBrandImageIndoor: _brandImageSettings.userBrandImageIndoor
16 property Fact _userBrandImageOutdoor: _brandImageSettings.userBrandImageOutdoor
17 property Fact _appSavePath: _appSettings.savePath
20 Layout.fillWidth: true
21 heading: qsTr("General")
23 LabelledFactComboBox {
24 label: qsTr("Language")
25 fact: _appSettings.qLocaleLanguage
27 visible: _appSettings.qLocaleLanguage.visible
30 LabelledFactComboBox {
31 label: qsTr("Color Scheme")
32 fact: _appSettings.indoorPalette
34 visible: _appSettings.indoorPalette.visible
37 LabelledFactComboBox {
38 label: qsTr("Stream GCS Position")
39 fact: _appSettings.followTarget
41 visible: _appSettings.followTarget.visible
45 Layout.fillWidth: true
46 text: qsTr("Mute all audio output")
48 visible: _audioMuted.visible
49 property Fact _audioMuted: _appSettings.audioMuted
53 Layout.fillWidth: true
54 text: fact.shortDescription
55 fact: _appSettings.androidDontSaveToSDCard
60 Layout.fillWidth: true
61 text: qsTr("Clear all settings on next start")
65 QGroundControl.deleteAllSettingsNextBoot()
67 QGroundControl.clearDeleteAllSettingsNextBoot()
73 Layout.fillWidth: true
74 spacing: ScreenTools.defaultFontPixelWidth * 2
75 visible: _appFontPointSize.visible
78 Layout.fillWidth: true
79 text: qsTr("UI Scaling")
83 spacing: ScreenTools.defaultFontPixelWidth * 2
86 Layout.preferredWidth: height
87 height: baseFontEdit.height * 1.5
90 if (_appFontPointSize.value > _appFontPointSize.min) {
91 _appFontPointSize.value = _appFontPointSize.value - 1
98 width: ScreenTools.defaultFontPixelWidth * 6
99 text: (QGroundControl.settingsManager.appSettings.appFontPointSize.value / ScreenTools.platformFontPointSize * 100).toFixed(0) + "%"
103 Layout.preferredWidth: height
104 height: baseFontEdit.height * 1.5
107 if (_appFontPointSize.value < _appFontPointSize.max) {
108 _appFontPointSize.value = _appFontPointSize.value + 1
116 Layout.fillWidth: true
117 spacing: ScreenTools.defaultFontPixelWidth * 2
118 visible: _appSavePath.visible && !ScreenTools.isMobile
121 Layout.fillWidth: true
124 QGCLabel { text: qsTr("Application Load/Save Path") }
126 Layout.fillWidth: true
127 font.pointSize: ScreenTools.smallFontPointSize
128 text: _appSavePath.rawValue === "" ? qsTr("<default location>") : _appSavePath.value
129 elide: Text.ElideMiddle
135 onClicked: savePathBrowseDialog.openForLoad()
137 id: savePathBrowseDialog
138 title: qsTr("Choose the location to save/load files")
139 folder: _appSavePath.rawValue
141 onAcceptedForLoad: (file) => _appSavePath.rawValue = file
147 SettingsGroupLayout {
148 Layout.fillWidth: true
149 heading: qsTr("Units")
150 visible: QGroundControl.settingsManager.unitsSettings.visible
153 model: [ QGroundControl.settingsManager.unitsSettings.horizontalDistanceUnits, QGroundControl.settingsManager.unitsSettings.verticalDistanceUnits, QGroundControl.settingsManager.unitsSettings.areaUnits, QGroundControl.settingsManager.unitsSettings.speedUnits, QGroundControl.settingsManager.unitsSettings.temperatureUnits ]
155 LabelledFactComboBox {
156 label: modelData.shortDescription
163 SettingsGroupLayout {
164 Layout.fillWidth: true
165 heading: qsTr("Brand Image")
166 visible: _brandImageSettings.visible && !ScreenTools.isMobile
169 Layout.fillWidth: true
170 spacing: ScreenTools.defaultFontPixelWidth * 2
171 visible: _userBrandImageIndoor.visible
174 Layout.fillWidth: true
178 Layout.fillWidth: true
179 text: qsTr("Indoor Image")
182 Layout.fillWidth: true
183 font.pointSize: ScreenTools.smallFontPointSize
184 text: _userBrandImageIndoor.valueString.replace("file:///", "")
185 elide: Text.ElideMiddle
186 visible: _userBrandImageIndoor.valueString.length > 0
192 onClicked: userBrandImageIndoorBrowseDialog.openForLoad()
195 id: userBrandImageIndoorBrowseDialog
196 title: qsTr("Choose custom brand image file")
197 folder: _userBrandImageIndoor.rawValue.replace("file:///", "")
199 onAcceptedForLoad: (file) => _userBrandImageIndoor.rawValue = "file:///" + file
205 Layout.fillWidth: true
206 spacing: ScreenTools.defaultFontPixelWidth * 2
207 visible: _userBrandImageOutdoor.visible
210 Layout.fillWidth: true
214 Layout.fillWidth: true
215 text: qsTr("Outdoor Image")
218 Layout.fillWidth: true
219 font.pointSize: ScreenTools.smallFontPointSize
220 text: _userBrandImageOutdoor.valueString.replace("file:///", "")
221 elide: Text.ElideMiddle
222 visible: _userBrandImageOutdoor.valueString.length > 0
228 onClicked: userBrandImageOutdoorBrowseDialog.openForLoad()
231 id: userBrandImageOutdoorBrowseDialog
232 title: qsTr("Choose custom brand image file")
233 folder: _userBrandImageOutdoor.rawValue.replace("file:///", "")
235 onAcceptedForLoad: (file) => _userBrandImageOutdoor.rawValue = "file:///" + file
241 label: qsTr("Reset Images")
242 buttonText: qsTr("Reset")
244 _userBrandImageIndoor.rawValue = ""
245 _userBrandImageOutdoor.rawValue = ""