Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f2440337
Commit
f2440337
authored
Dec 12, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
72fd8342
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
13 deletions
+33
-13
SetupView.qml
src/VehicleSetup/SetupView.qml
+3
-3
AppSettings.qml
src/ui/AppSettings.qml
+1
-1
MainRootWindow.qml
src/ui/MainRootWindow.qml
+24
-4
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+5
-5
No files found.
src/VehicleSetup/SetupView.qml
View file @
f2440337
...
@@ -41,7 +41,7 @@ Rectangle {
...
@@ -41,7 +41,7 @@ Rectangle {
function
showSummaryPanel
()
function
showSummaryPanel
()
{
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
if
(
_fullParameterVehicleAvailable
)
{
if
(
_fullParameterVehicleAvailable
)
{
...
@@ -58,7 +58,7 @@ Rectangle {
...
@@ -58,7 +58,7 @@ Rectangle {
}
}
function
showPanel
(
button
,
qmlSource
)
{
function
showPanel
(
button
,
qmlSource
)
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
button
.
checked
=
true
button
.
checked
=
true
...
@@ -67,7 +67,7 @@ Rectangle {
...
@@ -67,7 +67,7 @@ Rectangle {
function
showVehicleComponentPanel
(
vehicleComponent
)
function
showVehicleComponentPanel
(
vehicleComponent
)
{
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
var
autopilotPlugin
=
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
var
autopilotPlugin
=
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
...
...
src/ui/AppSettings.qml
View file @
f2440337
...
@@ -74,7 +74,7 @@ Rectangle {
...
@@ -74,7 +74,7 @@ Rectangle {
Layout.fillWidth
:
true
Layout.fillWidth
:
true
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
if
(
__rightPanel
.
source
!==
modelData
.
url
)
{
if
(
__rightPanel
.
source
!==
modelData
.
url
)
{
...
...
src/ui/MainRootWindow.qml
View file @
f2440337
...
@@ -38,6 +38,9 @@ ApplicationWindow {
...
@@ -38,6 +38,9 @@ ApplicationWindow {
}
}
}
}
property
var
_rgPreventViewSwitch
:
[
false
]
readonly
property
real
_topBottomMargins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_topBottomMargins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
string
_mainToolbar
:
QGroundControl
.
corePlugin
.
options
.
mainToolbarUrl
readonly
property
string
_mainToolbar
:
QGroundControl
.
corePlugin
.
options
.
mainToolbarUrl
readonly
property
string
_planToolbar
:
QGroundControl
.
corePlugin
.
options
.
planToolbarUrl
readonly
property
string
_planToolbar
:
QGroundControl
.
corePlugin
.
options
.
planToolbarUrl
...
@@ -49,7 +52,6 @@ ApplicationWindow {
...
@@ -49,7 +52,6 @@ ApplicationWindow {
property
bool
communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
bool
communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
string
formatedMessage
:
activeVehicle
?
activeVehicle
.
formatedMessage
:
""
property
string
formatedMessage
:
activeVehicle
?
activeVehicle
.
formatedMessage
:
""
property
real
availableHeight
:
mainWindow
.
height
-
mainWindow
.
header
.
height
-
mainWindow
.
footer
.
height
property
real
availableHeight
:
mainWindow
.
height
-
mainWindow
.
header
.
height
-
mainWindow
.
footer
.
height
property
bool
preventViewSwitch
:
false
property
var
currentPlanMissionItem
:
planMasterControllerPlan
?
planMasterControllerPlan
.
missionController
.
currentPlanViewItem
:
null
property
var
currentPlanMissionItem
:
planMasterControllerPlan
?
planMasterControllerPlan
.
missionController
.
currentPlanViewItem
:
null
property
var
planMasterControllerPlan
:
null
property
var
planMasterControllerPlan
:
null
...
@@ -73,6 +75,25 @@ ApplicationWindow {
...
@@ -73,6 +75,25 @@ ApplicationWindow {
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Global Scope Functions
//-- Global Scope Functions
/// Prevent view switching
function
pushPreventViewSwitch
()
{
_rgPreventViewSwitch
.
push
(
true
)
}
/// Allow view switching
function
popPreventViewSwitch
()
{
if
(
_rgPreventViewSwitch
.
length
==
1
)
{
console
.
warning
(
"
mainWindow.popPreventViewSwitch called when nothing pushed
"
)
return
}
_rgPreventViewSwitch
.
pop
()
}
/// @return true: View switches are not currently allowed
function
preventViewSwitch
()
{
return
_rgPreventViewSwitch
[
_rgPreventViewSwitch
.
length
-
1
]
}
function
viewSwitch
(
isPlanView
)
{
function
viewSwitch
(
isPlanView
)
{
settingsWindow
.
visible
=
false
settingsWindow
.
visible
=
false
setupWindow
.
visible
=
false
setupWindow
.
visible
=
false
...
@@ -152,8 +173,7 @@ ApplicationWindow {
...
@@ -152,8 +173,7 @@ ApplicationWindow {
mainWindowDialog
.
dialogComponent
=
component
mainWindowDialog
.
dialogComponent
=
component
mainWindowDialog
.
dialogTitle
=
title
mainWindowDialog
.
dialogTitle
=
title
mainWindowDialog
.
dialogButtons
=
buttons
mainWindowDialog
.
dialogButtons
=
buttons
console
.
log
(
"
Prevent view switch
"
)
mainWindow
.
pushPreventViewSwitch
()
mainWindow
.
preventViewSwitch
=
true
mainWindowDialog
.
open
()
mainWindowDialog
.
open
()
if
(
buttons
&
StandardButton
.
Cancel
||
buttons
&
StandardButton
.
Close
||
buttons
&
StandardButton
.
Discard
||
buttons
&
StandardButton
.
Abort
||
buttons
&
StandardButton
.
Ignore
)
{
if
(
buttons
&
StandardButton
.
Cancel
||
buttons
&
StandardButton
.
Close
||
buttons
&
StandardButton
.
Discard
||
buttons
&
StandardButton
.
Abort
||
buttons
&
StandardButton
.
Ignore
)
{
mainWindowDialog
.
closePolicy
=
Popup
.
NoAutoClose
;
mainWindowDialog
.
closePolicy
=
Popup
.
NoAutoClose
;
...
@@ -188,7 +208,7 @@ ApplicationWindow {
...
@@ -188,7 +208,7 @@ ApplicationWindow {
}
}
onClosed
:
{
onClosed
:
{
console
.
log
(
"
View switch ok
"
)
console
.
log
(
"
View switch ok
"
)
mainWindow
.
p
reventViewSwitch
=
false
mainWindow
.
p
opPreventViewSwitch
()
dlgLoader
.
source
=
""
dlgLoader
.
source
=
""
}
}
}
}
...
...
src/ui/toolbar/MainToolBar.qml
View file @
f2440337
...
@@ -124,7 +124,7 @@ Item {
...
@@ -124,7 +124,7 @@ Item {
logo
:
true
logo
:
true
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
buttonRow
.
clearAllChecks
()
buttonRow
.
clearAllChecks
()
...
@@ -138,7 +138,7 @@ Item {
...
@@ -138,7 +138,7 @@ Item {
Layout.fillHeight
:
true
Layout.fillHeight
:
true
icon.source
:
"
/qmlimages/Gears.svg
"
icon.source
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
buttonRow
.
clearAllChecks
()
buttonRow
.
clearAllChecks
()
...
@@ -152,7 +152,7 @@ Item {
...
@@ -152,7 +152,7 @@ Item {
Layout.fillHeight
:
true
Layout.fillHeight
:
true
icon.source
:
"
/qmlimages/Plan.svg
"
icon.source
:
"
/qmlimages/Plan.svg
"
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
buttonRow
.
clearAllChecks
()
buttonRow
.
clearAllChecks
()
...
@@ -166,7 +166,7 @@ Item {
...
@@ -166,7 +166,7 @@ Item {
Layout.fillHeight
:
true
Layout.fillHeight
:
true
icon.source
:
"
/qmlimages/PaperPlane.svg
"
icon.source
:
"
/qmlimages/PaperPlane.svg
"
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
buttonRow
.
clearAllChecks
()
buttonRow
.
clearAllChecks
()
...
@@ -181,7 +181,7 @@ Item {
...
@@ -181,7 +181,7 @@ Item {
icon.source
:
"
/qmlimages/Analyze.svg
"
icon.source
:
"
/qmlimages/Analyze.svg
"
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
onClicked
:
{
onClicked
:
{
if
(
mainWindow
.
preventViewSwitch
)
{
if
(
mainWindow
.
preventViewSwitch
()
)
{
return
return
}
}
buttonRow
.
clearAllChecks
()
buttonRow
.
clearAllChecks
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment