|
|
|
@ -98,17 +98,25 @@ Item {
@@ -98,17 +98,25 @@ Item {
|
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
|
|
|
|
|
ButtonGroup { |
|
|
|
|
buttons: viewRow.children |
|
|
|
|
} |
|
|
|
|
// Important Note: Toolbar buttons must manage their checked state manually in order to support |
|
|
|
|
// view switch prevention. There doesn't seem to be a way to make this work if they are in a |
|
|
|
|
// ButtonGroup. |
|
|
|
|
|
|
|
|
|
//--------------------------------------------- |
|
|
|
|
// Toolbar Row |
|
|
|
|
RowLayout { |
|
|
|
|
id: viewRow |
|
|
|
|
id: buttonRow |
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
|
|
function clearAllChecks() { |
|
|
|
|
for (var i=0; i<buttonRow.children.length; i++) { |
|
|
|
|
if (buttonRow.children[i].toString().startsWith("QGCToolBarButton")) { |
|
|
|
|
buttonRow.children[i].checked = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCToolBarButton { |
|
|
|
|
id: settingsButton |
|
|
|
|
Layout.fillHeight: true |
|
|
|
@ -116,6 +124,10 @@ Item {
@@ -116,6 +124,10 @@ Item {
|
|
|
|
|
logo: true |
|
|
|
|
visible: !QGroundControl.corePlugin.options.combineSettingsAndSetup |
|
|
|
|
onClicked: { |
|
|
|
|
if (mainWindow.preventViewSwitch) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
buttonRow.clearAllChecks() |
|
|
|
|
checked = true |
|
|
|
|
mainWindow.showSettingsView() |
|
|
|
|
} |
|
|
|
@ -126,6 +138,10 @@ Item {
@@ -126,6 +138,10 @@ Item {
|
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
icon.source: "/qmlimages/Gears.svg" |
|
|
|
|
onClicked: { |
|
|
|
|
if (mainWindow.preventViewSwitch) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
buttonRow.clearAllChecks() |
|
|
|
|
checked = true |
|
|
|
|
mainWindow.showSetupView() |
|
|
|
|
} |
|
|
|
@ -136,6 +152,10 @@ Item {
@@ -136,6 +152,10 @@ Item {
|
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
icon.source: "/qmlimages/Plan.svg" |
|
|
|
|
onClicked: { |
|
|
|
|
if (mainWindow.preventViewSwitch) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
buttonRow.clearAllChecks() |
|
|
|
|
checked = true |
|
|
|
|
mainWindow.showPlanView() |
|
|
|
|
} |
|
|
|
@ -146,6 +166,10 @@ Item {
@@ -146,6 +166,10 @@ Item {
|
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
icon.source: "/qmlimages/PaperPlane.svg" |
|
|
|
|
onClicked: { |
|
|
|
|
if (mainWindow.preventViewSwitch) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
buttonRow.clearAllChecks() |
|
|
|
|
checked = true |
|
|
|
|
mainWindow.showFlyView() |
|
|
|
|
} |
|
|
|
@ -157,6 +181,10 @@ Item {
@@ -157,6 +181,10 @@ Item {
|
|
|
|
|
icon.source: "/qmlimages/Analyze.svg" |
|
|
|
|
visible: QGroundControl.corePlugin.showAdvancedUI |
|
|
|
|
onClicked: { |
|
|
|
|
if (mainWindow.preventViewSwitch) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
buttonRow.clearAllChecks() |
|
|
|
|
checked = true |
|
|
|
|
mainWindow.showAnalyzeView() |
|
|
|
|
} |
|
|
|
|