Unverified Commit 0a24a90f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8977 from DonLakeFlyer/ViewsAndTools

Split into Views and Tools
parents 8cdaa3c2 1d264a8e
......@@ -82,15 +82,6 @@ Rectangle {
}
}
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Analyze")
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
visible: !ScreenTools.isShortScreen
}
Repeater {
id: buttonRepeater
model: QGroundControl.corePlugin ? QGroundControl.corePlugin.analyzePages : []
......
......@@ -18,6 +18,11 @@ ToolStripActionList {
signal displayPreFlightChecklist
model: [
ToolStripAction {
text: qsTr("Plan")
iconSource: "/qmlimages/Plan.svg"
onTriggered: mainWindow.showPlanView()
},
PreFlightCheckListShowAction { onTriggered: displayPreFlightChecklist() },
GuidedActionTakeoff { },
GuidedActionLand { },
......
......@@ -624,14 +624,14 @@ Item {
maxHeight: parent.height - toolStrip.y
title: qsTr("Plan")
//readonly property int flyButtonIndex: 0
readonly property int fileButtonIndex: 0
readonly property int takeoffButtonIndex: 1
readonly property int waypointButtonIndex: 2
readonly property int roiButtonIndex: 3
readonly property int patternButtonIndex: 4
readonly property int landButtonIndex: 5
readonly property int centerButtonIndex: 6
readonly property int flyButtonIndex: 0
readonly property int fileButtonIndex: 1
readonly property int takeoffButtonIndex: 2
readonly property int waypointButtonIndex: 3
readonly property int roiButtonIndex: 4
readonly property int patternButtonIndex: 5
readonly property int landButtonIndex: 6
readonly property int centerButtonIndex: 7
property bool _isRallyLayer: _editingLayer == _layerRallyPoints
property bool _isMissionLayer: _editingLayer == _layerMission
......@@ -639,6 +639,11 @@ Item {
ToolStripActionList {
id: toolStripActionList
model: [
ToolStripAction {
text: qsTr("Fly")
iconSource: "/qmlimages/PaperPlane.svg"
onTriggered: mainWindow.showFlyView()
},
ToolStripAction {
text: qsTr("File")
enabled: !_planMasterController.syncInProgress
......
......@@ -205,14 +205,6 @@ Rectangle {
id: buttonColumn
spacing: _defaultTextHeight / 2
QGCLabel {
Layout.fillWidth: true
text: qsTr("Vehicle Setup")
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
visible: !ScreenTools.isShortScreen
}
Repeater {
model: _corePlugin ? _corePlugin.settingsPages : []
visible: _corePlugin && _corePlugin.options.combineSettingsAndSetup
......
......@@ -57,14 +57,6 @@ Rectangle {
property real _maxButtonWidth: 0
QGCLabel {
Layout.fillWidth: true
text: qsTr("Application Settings")
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
visible: !ScreenTools.isShortScreen
}
Repeater {
model: QGroundControl.corePlugin.settingsPages
QGCButton {
......
This diff is collapsed.
......@@ -33,28 +33,6 @@ Rectangle {
property bool _communicationLost: _activeVehicle ? _activeVehicle.connectionLost : false
property color _mainStatusBGColor: qgcPal.brandingPurple
Component.onCompleted: toolbar.viewButtonClicked(flyButton)
function viewButtonClicked(button) {
if (mainWindow.preventViewSwitch()) {
return false
}
viewSelectDrawer.visible = false
currentButton.icon.source = button.imageResource
currentButton.logo = button.imageColor == "transparent"
return true
}
//-- Setup can be invoked from c++ side
Connections {
target: setupWindow
onVisibleChanged: {
if (setupWindow.visible) {
toolbar.viewButtonClicked(setupButton)
}
}
}
QGCPalette { id: qgcPal }
/// Bottom single pixel divider
......@@ -89,7 +67,9 @@ Rectangle {
QGCToolBarButton {
id: currentButton
Layout.preferredHeight: viewButtonRow.height
onClicked: viewSelectDrawer.visible = true
icon.source: "/res/QGCLogoFull"
logo: true
onClicked: toolSelectDrawer.visible = true
}
MainStatusIndicator {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment