diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro
index f371173a8b4475a53dc14b529b3353275fc8f2e8..78037695819f366ea3643bdd2e23086d77cbcfa8 100644
--- a/qgroundcontrol.pro
+++ b/qgroundcontrol.pro
@@ -31,6 +31,8 @@ DebugBuild {
DESTDIR = $${OUT_PWD}/release
}
+QML_IMPORT_PATH += $$PWD/src/QmlControls
+
#
# OS Specific settings
#
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index 40a41ca643983a3cf6ea431fe1ee388c378fa2fa..f09018a2005a91eb65b9e6aebfe89a8cc884c1c1 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -3,13 +3,13 @@
src/FactSystem/FactSystemTest.qml
- src/ui/toolbar/MainToolBar.qml
src/ui/toolbar/ArmedIndicator.qml
src/ui/toolbar/BatteryIndicator.qml
src/ui/toolbar/GPSIndicator.qml
src/ui/toolbar/GPSRTKIndicator.qml
src/ui/toolbar/JoystickIndicator.qml
src/ui/toolbar/LinkIndicator.qml
+ src/ui/toolbar/MainToolBar.qml
src/ui/toolbar/MainToolBarIndicators.qml
src/ui/toolbar/MessageIndicator.qml
src/ui/toolbar/ModeIndicator.qml
@@ -19,21 +19,11 @@
src/ui/toolbar/VTOLModeIndicator.qml
- src/PlanView/CorridorScanEditor.qml
- src/QmlControls/QGCViewDialogContainer.qml
- src/PlanView/PlanToolBar.qml
- src/PlanView/PlanToolBarIndicators.qml
- src/PlanView/CameraCalc.qml
- src/PlanView/CorridorScanMapVisual.qml
- src/QmlControls/EditPositionDialog.qml
- src/QmlControls/FileButton.qml
- src/MissionManager/QGCMapCircleVisuals.qml
- src/MissionManager/QGCMapPolylineVisuals.qml
- src/PlanView/StructureScanMapVisual.qml
src/AnalyzeView/AnalyzeView.qml
src/ui/AppSettings.qml
src/ui/preferences/BluetoothSettings.qml
src/FlightMap/Widgets/CameraPageWidget.qml
+ src/PlanView/CorridorScanEditor.qml
src/ViewWidgets/CustomCommandWidget.qml
src/ui/preferences/DebugWindow.qml
src/AutoPilotPlugins/Common/ESP8266Component.qml
@@ -53,24 +43,32 @@
src/ui/MainRootWindow.qml
src/AnalyzeView/MavlinkConsolePage.qml
src/ui/preferences/MavlinkSettings.qml
+ src/Microhard/MicrohardSettings.qml
src/PlanView/MissionSettingsEditor.qml
src/ui/preferences/MockLink.qml
src/ui/preferences/MockLinkSettings.qml
src/AutoPilotPlugins/Common/MotorComponent.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+ src/PlanView/PlanToolBar.qml
+ src/PlanView/PlanToolBarIndicators.qml
src/PlanView/PlanView.qml
src/VehicleSetup/PX4FlowSensor.qml
src/FlightMap/Widgets/QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+ src/QmlControls/QGCViewDialogContainer.qml
src/AnalyzeView/AnalyzePage.qml
src/QmlControls/AppMessages.qml
+ src/PlanView/CameraCalc.qml
src/PlanView/CameraSection.qml
src/QmlControls/ClickableColor.qml
+ src/PlanView/CorridorScanMapVisual.qml
src/QmlControls/DeadMouseArea.qml
src/QmlControls/DropButton.qml
src/QmlControls/DropPanel.qml
+ src/QmlControls/EditPositionDialog.qml
src/QmlControls/ExclusiveGroupItem.qml
src/QmlControls/FactSliderPanel.qml
+ src/QmlControls/FileButton.qml
src/QmlControls/FlightModeDropdown.qml
src/QmlControls/FlightModeMenu.qml
src/PlanView/FWLandingPatternMapVisual.qml
@@ -103,10 +101,13 @@
src/QmlControls/QGCFlickableHorizontalIndicator.qml
src/QmlControls/QGCFlickableVerticalIndicator.qml
src/QmlControls/QGCGroupBox.qml
+ src/QmlControls/QGCHoverButton.qml
src/QmlControls/QGCLabel.qml
src/QmlControls/QGCListView.qml
+ src/MissionManager/QGCMapCircleVisuals.qml
src/QmlControls/QGCMapLabel.qml
src/MissionManager/QGCMapPolygonVisuals.qml
+ src/MissionManager/QGCMapPolylineVisuals.qml
src/QmlControls/QGCMouseArea.qml
src/QmlControls/QGCMovableItem.qml
src/QmlControls/QGCPipable.qml
@@ -117,7 +118,7 @@
src/QmlControls/QGCToolBarButton.qml
src/QmlControls/QGCViewDialog.qml
src/QmlControls/QGCViewMessage.qml
- src/QmlControls/QGroundControl.Controls.qmldir
+ src/QmlControls/QGroundControl/Controls/qmldir
src/PlanView/RallyPointEditorHeader.qml
src/PlanView/RallyPointItemEditor.qml
src/PlanView/RallyPointMapVisuals.qml
@@ -128,10 +129,11 @@
src/ui/toolbar/SignalStrength.qml
src/PlanView/SimpleItemMapVisual.qml
src/QmlControls/SliderSwitch.qml
+ src/PlanView/StructureScanMapVisual.qml
src/QmlControls/SubMenuButton.qml
src/PlanView/SurveyMapVisual.qml
- src/PlanView/TransectStyleComplexItemStats.qml
src/QmlControls/ToolStrip.qml
+ src/PlanView/TransectStyleComplexItemStats.qml
src/QmlControls/VehicleRotationCal.qml
src/QmlControls/VehicleSummaryRow.qml
src/ViewWidgets/ViewWidget.qml
@@ -143,9 +145,10 @@
src/FactSystem/FactControls/FactTextField.qml
src/FactSystem/FactControls/FactTextFieldGrid.qml
src/FactSystem/FactControls/FactTextFieldRow.qml
- src/FactSystem/FactControls/FactValueSlider.qml
src/FactSystem/FactControls/FactTextFieldSlider.qml
- src/FactSystem/FactControls/qmldir
+ src/FactSystem/FactControls/FactValueSlider.qml
+ src/QmlControls/QGroundControl/FactControls/qmldir
+ src/FlightDisplay/BuiltInPreFlightCheckModel.qml
src/FlightDisplay/FlightDisplayView.qml
src/FlightDisplay/FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
@@ -156,12 +159,11 @@
src/FlightDisplay/GuidedAltitudeSlider.qml
src/FlightDisplay/MultiVehicleList.qml
src/FlightDisplay/PreFlightBatteryCheck.qml
- src/FlightDisplay/BuiltInPreFlightCheckModel.qml
src/FlightDisplay/PreFlightGPSCheck.qml
src/FlightDisplay/PreFlightRCCheck.qml
src/FlightDisplay/PreFlightSensorsHealthCheck.qml
src/FlightDisplay/PreFlightSoundCheck.qml
- src/FlightDisplay/qmldir
+ src/QmlControls/QGroundControl/FlightDisplay/qmldir
src/FlightMap/MapItems/CameraTriggerIndicator.qml
src/FlightMap/Widgets/CenterMapDropButton.qml
src/FlightMap/Widgets/CenterMapDropPanel.qml
@@ -183,11 +185,10 @@
src/FlightMap/Widgets/QGCCompassWidget.qml
src/FlightMap/Widgets/QGCPitchIndicator.qml
src/FlightMap/QGCVideoBackground.qml
- src/FlightMap/qmldir
+ src/QmlControls/QGroundControl/FlightMap/qmldir
src/FlightMap/MapItems/VehicleMapItem.qml
- src/QmlControls/QGroundControl.ScreenTools.qmldir
+ src/QmlControls/QGroundControl/ScreenTools/qmldir
src/QmlControls/ScreenTools.qml
- src/QmlControls/QGCHoverButton.qml
src/QmlControls/QmlTest.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
src/ui/preferences/SerialSettings.qml
@@ -197,9 +198,8 @@
src/PlanView/StructureScanEditor.qml
src/PlanView/SurveyItemEditor.qml
src/AutoPilotPlugins/Common/SyslinkComponent.qml
- src/ui/preferences/TcpSettings.qml
src/Taisync/TaisyncSettings.qml
- src/Microhard/MicrohardSettings.qml
+ src/ui/preferences/TcpSettings.qml
src/test.qml
src/ui/preferences/UdpSettings.qml
src/FlightMap/Widgets/ValuePageWidget.qml
@@ -209,24 +209,21 @@
src/FlightDisplay/VirtualJoystick.qml
- src/Settings/APMMavlinkStreamRate.SettingsGroup.json
- src/MissionManager/BreachReturn.FactMetaData.json
- src/MissionManager/CameraCalc.FactMetaData.json
- src/MissionManager/CameraSpec.FactMetaData.json
- src/MissionManager/CorridorScan.SettingsGroup.json
- src/QmlControls/EditPositionDialog.FactMetaData.json
- src/MissionManager/QGCMapCircle.Facts.json
- src/MissionManager/StructureScan.SettingsGroup.json
- src/MissionManager/TransectStyle.SettingsGroup.json
+ src/Settings/APMMavlinkStreamRate.SettingsGroup.json
+ src/MissionManager/BreachReturn.FactMetaData.json
+ src/Settings/OfflineMaps.SettingsGroup.json
+ src/Settings/PlanView.SettingsGroup.json
src/Settings/App.SettingsGroup.json
src/Settings/AutoConnect.SettingsGroup.json
src/Settings/BrandImage.SettingsGroup.json
+ src/MissionManager/CameraCalc.FactMetaData.json
src/MissionManager/CameraSection.FactMetaData.json
+ src/MissionManager/CameraSpec.FactMetaData.json
+ src/MissionManager/CorridorScan.SettingsGroup.json
+ src/QmlControls/EditPositionDialog.FactMetaData.json
src/Settings/FlightMap.SettingsGroup.json
- src/MissionManager/FWLandingPattern.FactMetaData.json
src/Settings/FlyView.SettingsGroup.json
- src/Settings/OfflineMaps.SettingsGroup.json
- src/Settings/PlanView.SettingsGroup.json
+ src/MissionManager/FWLandingPattern.FactMetaData.json
src/MissionManager/MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoFixedWing.json
src/MissionManager/MavCmdInfoMultiRotor.json
@@ -234,10 +231,13 @@
src/MissionManager/MavCmdInfoSub.json
src/MissionManager/MavCmdInfoVTOL.json
src/MissionManager/MissionSettings.FactMetaData.json
+ src/MissionManager/QGCMapCircle.Facts.json
src/MissionManager/RallyPoint.FactMetaData.json
src/Settings/RTK.SettingsGroup.json
src/MissionManager/SpeedSection.FactMetaData.json
+ src/MissionManager/StructureScan.SettingsGroup.json
src/MissionManager/Survey.SettingsGroup.json
+ src/MissionManager/TransectStyle.SettingsGroup.json
src/Settings/Units.SettingsGroup.json
src/comm/USBBoardInfo.json
src/Vehicle/BatteryFact.json
diff --git a/src/Airmap/airmap.qrc b/src/Airmap/airmap.qrc
index 4e3f47a73e8490d7567c445bb1cc0743f73c0119..07e71bf282aa075bd213fd891a17bb1a09458850 100644
--- a/src/Airmap/airmap.qrc
+++ b/src/Airmap/airmap.qrc
@@ -8,7 +8,7 @@
FlightBrief.qml
FlightDetails.qml
FlightFeature.qml
- QGroundControl.Airmap.qmldir
+ ../QmlControls/QGroundControl/Airmap/qmldir
RuleSelector.qml
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml b/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
index d48eaf78c59683c9c93db6bcc7ee3567c8033a37..40f31f39a0954d6d36e0c5e5b48c42a08a70af69 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
@@ -9,7 +9,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
APMAirframeComponentController {
diff --git a/src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml b/src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
index 985946f32a4037e7ae219701e77fce694851a2b3..a64ba37858a532c2e61994ba04bee832be004864 100644
--- a/src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
@@ -8,7 +8,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/APM/APMFlightModesComponentSummary.qml b/src/AutoPilotPlugins/APM/APMFlightModesComponentSummary.qml
index 23204a04ee3e6cc24ce89a657134002356253ad3..86e696c3d508706c9810ad6d15352bcc19247a47 100644
--- a/src/AutoPilotPlugins/APM/APMFlightModesComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMFlightModesComponentSummary.qml
@@ -8,7 +8,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml b/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
index 1a1a6321060b2038de36957adb48c5268ace5c7e..cd5657b694be5da5cbfcf479ff9c73f98473ba46 100644
--- a/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
@@ -8,7 +8,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSummary.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSummary.qml
index 679f1c1a1674c2a30c0fa5851646a2aedded3876..bdeeedf49b10490cc7cff4447cc0a519474d1b84 100644
--- a/src/AutoPilotPlugins/APM/APMSafetyComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSummary.qml
@@ -8,7 +8,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
index 48859b766ab79566349c1f45c58404a4fcaa8bca..23a5350ae2bb56693005f5abdb0ce6ce3454fa2c 100644
--- a/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
@@ -9,7 +9,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
property bool _firmware34: activeVehicle.versionCompare(3, 5, 0) < 0
diff --git a/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml b/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml
index fe3b35df4f0ae442099d950d22770d0a7bb28a99..b04f8903337a11db4068d143c22c0d1c07939bce 100644
--- a/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml
@@ -9,7 +9,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml b/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
index b7dd51fed816f478c68a2204492851d9c545f4c0..657f5cbd1cab2f1af710ce183c26a5813d959c88 100644
--- a/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
+++ b/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
@@ -9,7 +9,6 @@ import QGroundControl.Controllers 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml b/src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
index 65bfeb73abf7448617eb7ab58c8fdebc5e4f3ae7..50c0f8a92aa5e1ad301b5ea0e5f8ec394cc75eb5 100644
--- a/src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
+++ b/src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
@@ -12,7 +12,6 @@ import QGroundControl.Palette 1.0
Item {
anchors.fill: parent
- color: qgcPal.windowShadeDark
FactPanelController { id: controller; }
diff --git a/src/FirmwarePlugin/PX4/PX4Resources.qrc b/src/FirmwarePlugin/PX4/PX4Resources.qrc
index d77d11cf99c2724fc7cff3c163ced55b894df6db..2418d5ab7d96858d8de53b623512ee2f5e3f3a88 100644
--- a/src/FirmwarePlugin/PX4/PX4Resources.qrc
+++ b/src/FirmwarePlugin/PX4/PX4Resources.qrc
@@ -20,7 +20,7 @@
../../AutoPilotPlugins/PX4/SensorsComponentSummary.qml
../../AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
../../AutoPilotPlugins/PX4/SensorsSetup.qml
- QGroundControl.PX4.qmldir
+ ../../QmlControls/QGroundControl/PX4/qmldir
MavCmdInfoCommon.json
diff --git a/src/Airmap/QGroundControl.Airmap.qmldir b/src/QmlControls/QGroundControl/Airmap/qmldir
similarity index 100%
rename from src/Airmap/QGroundControl.Airmap.qmldir
rename to src/QmlControls/QGroundControl/Airmap/qmldir
diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl/Controls/qmldir
similarity index 100%
rename from src/QmlControls/QGroundControl.Controls.qmldir
rename to src/QmlControls/QGroundControl/Controls/qmldir
diff --git a/src/FactSystem/FactControls/qmldir b/src/QmlControls/QGroundControl/FactControls/qmldir
similarity index 100%
rename from src/FactSystem/FactControls/qmldir
rename to src/QmlControls/QGroundControl/FactControls/qmldir
diff --git a/src/QmlControls/QGroundControl/FactSystem/qmldir b/src/QmlControls/QGroundControl/FactSystem/qmldir
new file mode 100644
index 0000000000000000000000000000000000000000..b47a6beece5b83c864b25bf323d274aac9fc26cb
--- /dev/null
+++ b/src/QmlControls/QGroundControl/FactSystem/qmldir
@@ -0,0 +1 @@
+Module QGroundControl.FactSystem
diff --git a/src/FlightDisplay/qmldir b/src/QmlControls/QGroundControl/FlightDisplay/qmldir
similarity index 99%
rename from src/FlightDisplay/qmldir
rename to src/QmlControls/QGroundControl/FlightDisplay/qmldir
index f37894a8b7de3e97cf3a70eb14bd974b818c5000..69dca169e302c1a02243b3d0b9140be19a458770 100644
--- a/src/FlightDisplay/qmldir
+++ b/src/QmlControls/QGroundControl/FlightDisplay/qmldir
@@ -1,18 +1,17 @@
Module QGroundControl.FlightDisplay
+BuiltInPreFlightCheckModel 1.0 BuiltInPreFlightCheckModel.qml
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
GuidedActionConfirm 1.0 GuidedActionConfirm.qml
-GuidedActionsController 1.0 GuidedActionsController.qml
GuidedActionList 1.0 GuidedActionList.qml
+GuidedActionsController 1.0 GuidedActionsController.qml
GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml
MultiVehicleList 1.0 MultiVehicleList.qml
PreFlightBatteryCheck 1.0 PreFlightBatteryCheck.qml
-BuiltInPreFlightCheckModel 1.0 BuiltInPreFlightCheckModel.qml
PreFlightGPSCheck 1.0 PreFlightGPSCheck.qml
PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
-
diff --git a/src/FlightMap/qmldir b/src/QmlControls/QGroundControl/FlightMap/qmldir
similarity index 100%
rename from src/FlightMap/qmldir
rename to src/QmlControls/QGroundControl/FlightMap/qmldir
diff --git a/src/FirmwarePlugin/PX4/QGroundControl.PX4.qmldir b/src/QmlControls/QGroundControl/PX4/qmldir
similarity index 100%
rename from src/FirmwarePlugin/PX4/QGroundControl.PX4.qmldir
rename to src/QmlControls/QGroundControl/PX4/qmldir
diff --git a/src/QmlControls/QGroundControl.ScreenTools.qmldir b/src/QmlControls/QGroundControl/ScreenTools/qmldir
similarity index 100%
rename from src/QmlControls/QGroundControl.ScreenTools.qmldir
rename to src/QmlControls/QGroundControl/ScreenTools/qmldir
diff --git a/src/QmlControls/QGroundControl/Vehicle/qmldir b/src/QmlControls/QGroundControl/Vehicle/qmldir
new file mode 100644
index 0000000000000000000000000000000000000000..082da4bc1f3afe5ceaddd876188a66be4923576c
--- /dev/null
+++ b/src/QmlControls/QGroundControl/Vehicle/qmldir
@@ -0,0 +1 @@
+Module QGroundControl.Vehicle
diff --git a/src/QtLocationPlugin/QMLControl/OfflineMap.qml b/src/QtLocationPlugin/QMLControl/OfflineMap.qml
index 140808579f744b5b9e74695187304b42b335fa52..9cf1cfe150c40af53685d318550acb4f215217df 100644
--- a/src/QtLocationPlugin/QMLControl/OfflineMap.qml
+++ b/src/QtLocationPlugin/QMLControl/OfflineMap.qml
@@ -38,7 +38,7 @@ Item {
property Fact _mapboxFact: _settingsManager ? _settingsManager.appSettings.mapboxToken : null
property Fact _esriFact: _settingsManager ? _settingsManager.appSettings.esriToken : null
- property string mapType: _fmSettings.mapProvider.enumStringValue + " " + _fmSettings.mapType.enumStringValue
+ property string mapType: _fmSettings ? (_fmSettings.mapProvider.enumStringValue + " " + _fmSettings.mapType.enumStringValue) : ""
property bool isMapInteractive: false
property var savedCenter: undefined
property real savedZoom: 3
@@ -59,7 +59,7 @@ Item {
readonly property real maxZoomLevel: 20
readonly property real sliderTouchArea: ScreenTools.defaultFontPixelWidth * (ScreenTools.isTinyScreen ? 5 : (ScreenTools.isMobile ? 6 : 3))
- readonly property int _maxTilesForDownload: _settings.maxTilesForDownload.rawValue
+ readonly property int _maxTilesForDownload: _settings ? _settings.maxTilesForDownload.rawValue : 0
QGCPalette { id: qgcPal }
diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml
index b1ae742538bd7a93463ce20c61187a71567794cd..a751dca1a04a8177880723ca3312407380e99b37 100644
--- a/src/VehicleSetup/JoystickConfig.qml
+++ b/src/VehicleSetup/JoystickConfig.qml
@@ -32,7 +32,7 @@ SetupPage {
Connections {
target: joystickManager
onAvailableJoysticksChanged: {
- if( joystickManager.joysticks.length == 0 ) {
+ if( joystickManager.joysticks.length === 0 ) {
summaryButton.checked = true
setupView.showSummaryPanel()
}
@@ -387,7 +387,7 @@ SetupPage {
Component.onCompleted: {
var index = joystickCombo.find(joystickManager.activeJoystickName)
- if (index == -1) {
+ if (index === -1) {
console.warn(qsTr("Active joystick name not in combo"), joystickManager.activeJoystickName)
} else {
joystickCombo.currentIndex = index
@@ -412,7 +412,7 @@ SetupPage {
QGCRadioButton {
text: qsTr("Center stick is zero throttle")
- checked: _activeJoystick ? _activeJoystick.throttleMode == 0 : false
+ checked: _activeJoystick ? _activeJoystick.throttleMode === 0 : false
onClicked: _activeJoystick.throttleMode = 0
}
@@ -421,7 +421,7 @@ SetupPage {
x: 20
width: parent.width
spacing: ScreenTools.defaultFontPixelWidth
- visible: _activeJoystick ? _activeJoystick.throttleMode == 0 : false
+ visible: _activeJoystick ? _activeJoystick.throttleMode === 0 : false
QGCCheckBox {
id: accumulator
@@ -434,7 +434,7 @@ SetupPage {
QGCRadioButton {
text: qsTr("Full down stick is zero throttle")
- checked: _activeJoystick ? _activeJoystick.throttleMode == 1 : false
+ checked: _activeJoystick ? _activeJoystick.throttleMode === 1 : false
onClicked: _activeJoystick.throttleMode = 1
}
@@ -476,7 +476,7 @@ SetupPage {
QGCCheckBox {
id: advancedSettings
- checked: activeVehicle.joystickMode != 0
+ checked: activeVehicle.joystickMode !== 0
text: qsTr("Advanced settings (careful!)")
onClicked: {
@@ -531,7 +531,7 @@ SetupPage {
visible: advancedSettings.checked
QGCCheckBox {
id: joystickCircleCorrection
- checked: activeVehicle.joystickMode != 0
+ checked: activeVehicle.joystickMode !== 0
text: qsTr("Enable circle correction")
Component.onCompleted: checked = _activeJoystick.circleCorrection
@@ -608,7 +608,7 @@ SetupPage {
QGCCheckBox {
anchors.verticalCenter: parent.verticalCenter
- checked: _activeJoystick ? _activeJoystick.buttonActions[modelData] != "" : false
+ checked: _activeJoystick ? _activeJoystick.buttonActions[modelData] !== "" : false
onClicked: _activeJoystick.setButtonAction(modelData, checked ? buttonActionCombo.textAt(buttonActionCombo.currentIndex) : "")
}
diff --git a/src/ViewWidgets/CustomCommandWidget.qml b/src/ViewWidgets/CustomCommandWidget.qml
index 077cb4bf0dbdfa8b0066275d2e620d4f556581ee..d79a9776007cdd7a9659466bdb77fcda07fdc71d 100644
--- a/src/ViewWidgets/CustomCommandWidget.qml
+++ b/src/ViewWidgets/CustomCommandWidget.qml
@@ -50,7 +50,7 @@ Item {
loader.visible = false
textOutput.text = _noVehicleText
if (_activeVehicle) {
- if (controller.customQmlFile == "") {
+ if (controller.customQmlFile === "") {
textOutput.text = _assignQmlFile
} else {
loader.source = controller.customQmlFile
diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml
index 20041380c008a3dba7d2e0094dda33ed026869e2..4ac6fc4980619462e6da9c76fa24d11ce92a86e0 100644
--- a/src/ui/preferences/GeneralSettings.qml
+++ b/src/ui/preferences/GeneralSettings.qml
@@ -642,7 +642,7 @@ Rectangle {
QGCRadioButton {
text: qsTr("Perform Survey-In")
visible: rtkGrid.rtkSettings.useFixedBasePosition.visible
- checked: rtkGrid.rtkSettings.useFixedBasePosition.value == false
+ checked: rtkGrid.rtkSettings.useFixedBasePosition.value === false
onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = false
Layout.columnSpan: 3
}
@@ -676,7 +676,7 @@ Rectangle {
QGCRadioButton {
text: qsTr("Use Specified Base Position")
visible: rtkGrid.rtkSettings.useFixedBasePosition.visible
- checked: rtkGrid.rtkSettings.useFixedBasePosition.value == true
+ checked: rtkGrid.rtkSettings.useFixedBasePosition.value === true
onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = true
Layout.columnSpan: 3
}
diff --git a/src/ui/toolbar/BatteryIndicator.qml b/src/ui/toolbar/BatteryIndicator.qml
index 7ed8b2ca81890e105f85cc03169e9cb20a07a0a9..497e10096ca8d2be770798db834775ac34f4c214 100644
--- a/src/ui/toolbar/BatteryIndicator.qml
+++ b/src/ui/toolbar/BatteryIndicator.qml
@@ -86,9 +86,9 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { text: qsTr("Voltage:") }
- QGCLabel { text: (activeVehicle && activeVehicle.battery.voltage.value != -1) ? (activeVehicle.battery.voltage.valueString + " " + activeVehicle.battery.voltage.units) : "N/A" }
+ QGCLabel { text: (activeVehicle && activeVehicle.battery.voltage.value !== -1) ? (activeVehicle.battery.voltage.valueString + " " + activeVehicle.battery.voltage.units) : "N/A" }
QGCLabel { text: qsTr("Accumulated Consumption:") }
- QGCLabel { text: (activeVehicle && activeVehicle.battery.mahConsumed.value != -1) ? (activeVehicle.battery.mahConsumed.valueString + " " + activeVehicle.battery.mahConsumed.units) : "N/A" }
+ QGCLabel { text: (activeVehicle && activeVehicle.battery.mahConsumed.value !== -1) ? (activeVehicle.battery.mahConsumed.valueString + " " + activeVehicle.battery.mahConsumed.units) : "N/A" }
}
}
}
diff --git a/src/ui/toolbar/LinkIndicator.qml b/src/ui/toolbar/LinkIndicator.qml
index 4d49d7869124d5c1aa5d93b22c22e768bfa41b8d..e88a49373f2804268985d10e351ff8d46222e0e8 100644
--- a/src/ui/toolbar/LinkIndicator.qml
+++ b/src/ui/toolbar/LinkIndicator.qml
@@ -47,7 +47,8 @@ Item {
function updatelinkSelectionMenu() {
if (activeVehicle) {
// Remove old menu items
- for (var i = 0; i < linkSelectionMenuItems.length; i++) {
+ var i
+ for (i = 0; i < linkSelectionMenuItems.length; i++) {
linkSelectionMenu.removeItem(linkSelectionMenuItems[i])
}
linkSelectionMenuItems.length = 0
@@ -55,7 +56,7 @@ Item {
// Add new items
var has_hl = false;
var links = activeVehicle.links
- for (var i = 0; i < links.length; i++) {
+ for (i = 0; i < links.length; i++) {
var menuItem = linkSelectionMenuItemComponent.createObject(null, { "text": links[i].getName(), "enabled": links[i].link_active(activeVehicle.id)})
linkSelectionMenuItems.push(menuItem)
linkSelectionMenu.insertItem(i, menuItem)
diff --git a/src/ui/toolbar/ModeIndicator.qml b/src/ui/toolbar/ModeIndicator.qml
index 618bafd2d17fe1cbbef1a14add26e2640e37d6a2..de181304f517b716788ee2e8b151b81bc2b69fb4 100644
--- a/src/ui/toolbar/ModeIndicator.qml
+++ b/src/ui/toolbar/ModeIndicator.qml
@@ -47,12 +47,13 @@ Item {
function updateFlightModesMenu() {
if (activeVehicle && activeVehicle.flightModeSetAvailable) {
// Remove old menu items
- for (var i = 0; i < flightModesMenuItems.length; i++) {
+ var i
+ for (i = 0; i < flightModesMenuItems.length; i++) {
flightModesMenu.removeItem(flightModesMenuItems[i])
}
flightModesMenuItems.length = 0
// Add new items
- for (var i = 0; i < _flightModes.length; i++) {
+ for (i = 0; i < _flightModes.length; i++) {
var menuItem = flightModeMenuItemComponent.createObject(null, { "text": _flightModes[i] })
flightModesMenuItems.push(menuItem)
flightModesMenu.insertItem(i, menuItem)
diff --git a/src/ui/toolbar/RCRSSIIndicator.qml b/src/ui/toolbar/RCRSSIIndicator.qml
index 11ce9b3567f6b0cb27a4b0e5557d3cdea920c391..7c80246a0598563104dc3dc2162d9ec2a28d58bb 100644
--- a/src/ui/toolbar/RCRSSIIndicator.qml
+++ b/src/ui/toolbar/RCRSSIIndicator.qml
@@ -46,7 +46,7 @@ Item {
QGCLabel {
id: rssiLabel
- text: activeVehicle ? (activeVehicle.rcRSSI != 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data available")
+ text: activeVehicle ? (activeVehicle.rcRSSI !== 255 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data available")
font.family: ScreenTools.demiboldFontFamily
anchors.horizontalCenter: parent.horizontalCenter
}