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"
120 Layout.alignment: Qt.AlignHCenter
121 Layout.bottomMargin: ScreenTools.defaultFontPixelHeight / 2
124 visible: QGroundControl.newStableVersion !== ""
126 mainWindow.closeIndicatorDrawer()
127 Qt.openUrlExternally(QGroundControl.corePlugin.stableDownloadUrl)
133 Layout.fillWidth: true
134 horizontalAlignment: Text.AlignHCenter
135 text: qsTr("%1 Version").arg(QGroundControl.appName)
136 font.pointSize: ScreenTools.smallFontPointSize
137 wrapMode: QGCLabel.WordWrap
141 Layout.fillWidth: true
142 horizontalAlignment: Text.AlignHCenter
143 text: QGroundControl.qgcVersion
144 font.pointSize: ScreenTools.smallFontPointSize
145 wrapMode: QGCLabel.WrapAnywhere
149 Layout.fillWidth: true
150 horizontalAlignment: Text.AlignHCenter
151 text: QGroundControl.qgcAppDate
152 font.pointSize: ScreenTools.smallFontPointSize
153 wrapMode: QGCLabel.WrapAnywhere
154 visible: QGroundControl.qgcDailyBuild
157 anchors.topMargin: -(parent.y - versionLabel.y)
160 onClicked: (mouse) => {
161 if (mouse.modifiers & Qt.ControlModifier) {
162 QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
163 showTouchAreasNotification.open()
164 } else if (ScreenTools.isMobile || mouse.modifiers & Qt.ShiftModifier) {
165 mainWindow.closeIndicatorDrawer()
166 if (!QGroundControl.corePlugin.showAdvancedUI) {
167 advancedModeOnConfirmation.open()
169 advancedModeOffConfirmation.open()
174 // This allows you to change this on mobile
176 QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
177 showTouchAreasNotification.open()