7import QGroundControl.Controls
8import QGroundControl.FlyView
11 required property var guidedValueSlider
15 height: ScreenTools.toolbarHeight
17 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
18 property bool _communicationLost: _activeVehicle ? _activeVehicle.vehicleLinkManager.communicationLost : false
19 property color _mainStatusBGColor: qgcPal.brandingPurple
20 property real _leftRightMargin: ScreenTools.defaultFontPixelWidth * 0.75
21 property var _guidedController: globals.guidedControllerFlyView
23 function dropMainStatusIndicatorTool() {
24 mainStatusIndicator.dropMainStatusIndicator();
27 QGCPalette { id: qgcPal }
31 contentWidth: toolBarLayout.width
32 flickableDirection: Flickable.HorizontalFlick
41 width: leftPanelLayout.implicitWidth
44 // Gradient background behind Q button and main status indicator
46 id: gradientBackground
48 width: mainStatusLayout.width
49 opacity: qgcPal.windowTransparent.a
52 orientation: Gradient.Horizontal
53 GradientStop { position: 0; color: _mainStatusBGColor }
54 //GradientStop { position: qgcButton.x + qgcButton.width; color: _mainStatusBGColor }
55 GradientStop { position: 1; color: qgcPal.window }
59 // Standard toolbar background to the right of the gradient
61 anchors.left: gradientBackground.right
62 anchors.right: parent.right
64 color: qgcPal.windowTransparent
70 spacing: ScreenTools.defaultFontPixelWidth * 2
79 Layout.fillHeight: true
80 icon.source: "/res/QGCLogoFull.svg"
82 onClicked: mainWindow.showToolSelectDialog()
86 id: mainStatusIndicator
87 Layout.fillHeight: true
93 text: qsTr("Disconnect")
94 onClicked: _activeVehicle.closeVehicle()
95 visible: _activeVehicle && _communicationLost
99 Layout.fillHeight: true
100 visible: _activeVehicle
106 // center panel takes up all remaining space in toolbar between left and right panels
107 width: Math.max(guidedActionConfirm.visible ? guidedActionConfirm.width : 0, control.width - (leftPanel.width + rightPanel.width))
108 height: parent.height
112 color: qgcPal.windowTransparent
115 GuidedActionConfirm {
116 id: guidedActionConfirm
117 height: parent.height
118 anchors.horizontalCenter: parent.horizontalCenter
119 guidedController: control._guidedController
120 guidedValueSlider: control.guidedValueSlider
121 messageDisplay: guidedActionMessageDisplay
127 width: flyViewIndicators.width
128 height: parent.height
132 color: qgcPal.windowTransparent
135 FlyViewToolBarIndicators {
136 id: flyViewIndicators
137 height: parent.height
143 // The guided action message display is outside of the GuidedActionConfirm control so that it doesn't end up as
144 // part of the Flickable
146 id: guidedActionMessageDisplay
147 anchors.top: control.bottom
148 anchors.topMargin: _margins
149 x: control.mapFromItem(guidedActionConfirm.parent, guidedActionConfirm.x, 0).x + (guidedActionConfirm.width - guidedActionMessageDisplay.width) / 2
150 width: messageLabel.contentWidth + (_margins * 2)
151 height: messageLabel.contentHeight + (_margins * 2)
152 color: qgcPal.windowTransparent
153 radius: ScreenTools.defaultBorderRadius
154 visible: guidedActionConfirm.visible
160 width: ScreenTools.defaultFontPixelWidth * 30
161 wrapMode: Text.WordWrap
162 text: guidedActionConfirm.message
166 id: messageOpacityAnimation
167 target: guidedActionMessageDisplay
177 onTriggered: messageOpacityAnimation.start()
181 ParameterDownloadProgress {