5import QGroundControl.Controls
7/// Provides UI for parameter download progress. This is overlayed on top of the FlyViewToolBar.
12 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
14 // Small parameter download progress bar
16 anchors.bottom: parent.bottom
17 height: control.height * 0.05
18 width: _activeVehicle ? _activeVehicle.loadProgress * parent.width : 0
19 color: QGroundControl.globalPalette.colorGreen
20 visible: !largeProgressBar.visible
23 // Large parameter download progress bar
26 anchors.bottom: parent.bottom
27 anchors.left: parent.left
28 anchors.right: parent.right
30 color: QGroundControl.globalPalette.window
31 visible: _showLargeProgress
33 property bool _initialDownloadComplete: _activeVehicle ? _activeVehicle.initialConnectComplete : true
34 property bool _userHide: false
35 property bool _showLargeProgress: !_initialDownloadComplete && !_userHide && QGroundControl.globalPalette.globalTheme === QGCPalette.Light
38 target: QGroundControl.multiVehicleManager
39 function onActiveVehicleChanged(activeVehicle) { largeProgressBar._userHide = false }
43 anchors.top: parent.top
44 anchors.bottom: parent.bottom
45 width: _activeVehicle ? _activeVehicle.loadProgress * parent.width : 0
46 color: QGroundControl.globalPalette.colorGreen
50 anchors.centerIn: parent
51 text: qsTr("Downloading")
52 font.pointSize: ScreenTools.largeFontPointSize
56 anchors.margins: _margin
57 anchors.right: parent.right
58 anchors.bottom: parent.bottom
59 text: qsTr("Click anywhere to hide")
61 property real _margin: ScreenTools.defaultFontPixelWidth / 2
66 onClicked: parent._userHide = true