6import QGroundControl.Controls
11 property real _toolButtonHeight: ScreenTools.defaultFontPixelHeight * 3
13 contentComponent: Component {
16 columnSpacing: ScreenTools.defaultFontPixelWidth
17 rowSpacing: columnSpacing
20 objectName: "toolbar_viewFly"
21 implicitHeight: root._toolButtonHeight
22 Layout.fillWidth: true
24 imageResource: "/res/FlyingPaperPlane.svg"
26 if (mainWindow.allowViewSwitch()) {
27 mainWindow.closeIndicatorDrawer()
28 mainWindow.showFlyView()
34 objectName: "toolbar_viewPlan"
35 implicitHeight: root._toolButtonHeight
36 Layout.fillWidth: true
38 imageResource: "/qmlimages/Plan.svg"
40 if (mainWindow.allowViewSwitch()) {
41 mainWindow.closeIndicatorDrawer()
42 mainWindow.showPlanView()
48 objectName: "toolbar_viewAnalyze"
49 implicitHeight: root._toolButtonHeight
50 Layout.fillWidth: true
52 imageResource: "/qmlimages/Analyze.svg"
53 visible: QGroundControl.corePlugin.showAdvancedUI
55 if (mainWindow.allowViewSwitch()) {
56 mainWindow.closeIndicatorDrawer()
57 mainWindow.showAnalyzeTool()
64 objectName: "toolbar_viewConfigure"
65 implicitHeight: root._toolButtonHeight
66 Layout.fillWidth: true
67 text: qsTr("Configure")
68 imageResource: "/res/GearWithPaperPlane.svg"
70 if (mainWindow.allowViewSwitch()) {
71 mainWindow.closeIndicatorDrawer()
72 mainWindow.showVehicleConfig()
79 objectName: "toolbar_viewSettings"
80 implicitHeight: root._toolButtonHeight
81 Layout.fillWidth: true
82 text: qsTr("Settings")
83 imageResource: "/res/QGCLogoWhite.svg"
84 visible: !QGroundControl.corePlugin.options.combineSettingsAndSetup
86 if (mainWindow.allowViewSwitch()) {
87 mainWindow.closeIndicatorDrawer()
88 mainWindow.showSettingsTool()
95 objectName: "toolbar_viewClose"
96 implicitHeight: root._toolButtonHeight
97 Layout.fillWidth: true
99 imageResource: "/res/OpenDoor.svg"
101 if (mainWindow.allowViewSwitch()) {
102 mainWindow.closeIndicatorDrawer()
103 // Route through the window close handler so the unsaved
104 // mission / pending parameter / active connection checks
105 // run, matching the desktop window-close behavior.
112 id: versionColumnLayout
113 Layout.fillWidth: true
118 objectName: "toolbar_updateButton"
119 Layout.alignment: Qt.AlignHCenter
120 Layout.bottomMargin: ScreenTools.defaultFontPixelHeight / 2
121 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
123 leftPadding: ScreenTools.defaultFontPixelWidth
124 rightPadding: leftPadding
127 pointSize: ScreenTools.smallFontPointSize
128 visible: QGroundControl.newStableVersion !== ""
130 mainWindow.closeIndicatorDrawer()
131 Qt.openUrlExternally(QGroundControl.corePlugin.stableDownloadUrl)
137 Layout.fillWidth: true
138 horizontalAlignment: Text.AlignHCenter
139 text: qsTr("%1 Version").arg(QGroundControl.appName)
140 font.pointSize: ScreenTools.smallFontPointSize
141 wrapMode: QGCLabel.WordWrap
145 Layout.fillWidth: true
146 horizontalAlignment: Text.AlignHCenter
147 text: QGroundControl.qgcVersion
148 font.pointSize: ScreenTools.smallFontPointSize
149 wrapMode: QGCLabel.WrapAnywhere
153 Layout.fillWidth: true
154 horizontalAlignment: Text.AlignHCenter
155 text: QGroundControl.qgcAppDate
156 font.pointSize: ScreenTools.smallFontPointSize
157 wrapMode: QGCLabel.WrapAnywhere
158 visible: QGroundControl.qgcDailyBuild
161 anchors.topMargin: -(parent.y - versionLabel.y)
164 onClicked: (mouse) => {
165 if (mouse.modifiers & Qt.ControlModifier) {
166 QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
167 showTouchAreasNotification.open()
168 } else if (ScreenTools.isMobile || mouse.modifiers & Qt.ShiftModifier) {
169 mainWindow.closeIndicatorDrawer()
170 if (!QGroundControl.corePlugin.showAdvancedUI) {
171 advancedModeOnConfirmation.open()
173 advancedModeOffConfirmation.open()
178 // This allows you to change this on mobile
180 QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
181 showTouchAreasNotification.open()