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
0a24a90f
Unverified
Commit
0a24a90f
authored
Aug 09, 2020
by
Don Gagne
Committed by
GitHub
Aug 09, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8977 from DonLakeFlyer/ViewsAndTools
Split into Views and Tools
parents
8cdaa3c2
1d264a8e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
103 additions
and
139 deletions
+103
-139
AnalyzeView.qml
src/AnalyzeView/AnalyzeView.qml
+0
-9
FlyViewToolStripActionList.qml
src/FlightDisplay/FlyViewToolStripActionList.qml
+5
-0
PlanView.qml
src/PlanView/PlanView.qml
+13
-8
SetupView.qml
src/VehicleSetup/SetupView.qml
+0
-8
AppSettings.qml
src/ui/AppSettings.qml
+0
-8
MainRootWindow.qml
src/ui/MainRootWindow.qml
+82
-83
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+3
-23
No files found.
src/AnalyzeView/AnalyzeView.qml
View file @
0a24a90f
...
@@ -82,15 +82,6 @@ Rectangle {
...
@@ -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
{
Repeater
{
id
:
buttonRepeater
id
:
buttonRepeater
model
:
QGroundControl
.
corePlugin
?
QGroundControl
.
corePlugin
.
analyzePages
:
[]
model
:
QGroundControl
.
corePlugin
?
QGroundControl
.
corePlugin
.
analyzePages
:
[]
...
...
src/FlightDisplay/FlyViewToolStripActionList.qml
View file @
0a24a90f
...
@@ -18,6 +18,11 @@ ToolStripActionList {
...
@@ -18,6 +18,11 @@ ToolStripActionList {
signal
displayPreFlightChecklist
signal
displayPreFlightChecklist
model
:
[
model
:
[
ToolStripAction
{
text
:
qsTr
(
"
Plan
"
)
iconSource
:
"
/qmlimages/Plan.svg
"
onTriggered
:
mainWindow
.
showPlanView
()
},
PreFlightCheckListShowAction
{
onTriggered
:
displayPreFlightChecklist
()
},
PreFlightCheckListShowAction
{
onTriggered
:
displayPreFlightChecklist
()
},
GuidedActionTakeoff
{
},
GuidedActionTakeoff
{
},
GuidedActionLand
{
},
GuidedActionLand
{
},
...
...
src/PlanView/PlanView.qml
View file @
0a24a90f
...
@@ -624,14 +624,14 @@ Item {
...
@@ -624,14 +624,14 @@ Item {
maxHeight
:
parent
.
height
-
toolStrip
.
y
maxHeight
:
parent
.
height
-
toolStrip
.
y
title
:
qsTr
(
"
Plan
"
)
title
:
qsTr
(
"
Plan
"
)
//
readonly property int flyButtonIndex: 0
readonly
property
int
flyButtonIndex
:
0
readonly
property
int
fileButtonIndex
:
0
readonly
property
int
fileButtonIndex
:
1
readonly
property
int
takeoffButtonIndex
:
1
readonly
property
int
takeoffButtonIndex
:
2
readonly
property
int
waypointButtonIndex
:
2
readonly
property
int
waypointButtonIndex
:
3
readonly
property
int
roiButtonIndex
:
3
readonly
property
int
roiButtonIndex
:
4
readonly
property
int
patternButtonIndex
:
4
readonly
property
int
patternButtonIndex
:
5
readonly
property
int
landButtonIndex
:
5
readonly
property
int
landButtonIndex
:
6
readonly
property
int
centerButtonIndex
:
6
readonly
property
int
centerButtonIndex
:
7
property
bool
_isRallyLayer
:
_editingLayer
==
_layerRallyPoints
property
bool
_isRallyLayer
:
_editingLayer
==
_layerRallyPoints
property
bool
_isMissionLayer
:
_editingLayer
==
_layerMission
property
bool
_isMissionLayer
:
_editingLayer
==
_layerMission
...
@@ -639,6 +639,11 @@ Item {
...
@@ -639,6 +639,11 @@ Item {
ToolStripActionList
{
ToolStripActionList
{
id
:
toolStripActionList
id
:
toolStripActionList
model
:
[
model
:
[
ToolStripAction
{
text
:
qsTr
(
"
Fly
"
)
iconSource
:
"
/qmlimages/PaperPlane.svg
"
onTriggered
:
mainWindow
.
showFlyView
()
},
ToolStripAction
{
ToolStripAction
{
text
:
qsTr
(
"
File
"
)
text
:
qsTr
(
"
File
"
)
enabled
:
!
_planMasterController
.
syncInProgress
enabled
:
!
_planMasterController
.
syncInProgress
...
...
src/VehicleSetup/SetupView.qml
View file @
0a24a90f
...
@@ -205,14 +205,6 @@ Rectangle {
...
@@ -205,14 +205,6 @@ Rectangle {
id
:
buttonColumn
id
:
buttonColumn
spacing
:
_defaultTextHeight
/
2
spacing
:
_defaultTextHeight
/
2
QGCLabel
{
Layout.fillWidth
:
true
text
:
qsTr
(
"
Vehicle Setup
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
!
ScreenTools
.
isShortScreen
}
Repeater
{
Repeater
{
model
:
_corePlugin
?
_corePlugin
.
settingsPages
:
[]
model
:
_corePlugin
?
_corePlugin
.
settingsPages
:
[]
visible
:
_corePlugin
&&
_corePlugin
.
options
.
combineSettingsAndSetup
visible
:
_corePlugin
&&
_corePlugin
.
options
.
combineSettingsAndSetup
...
...
src/ui/AppSettings.qml
View file @
0a24a90f
...
@@ -57,14 +57,6 @@ Rectangle {
...
@@ -57,14 +57,6 @@ Rectangle {
property
real
_maxButtonWidth
:
0
property
real
_maxButtonWidth
:
0
QGCLabel
{
Layout.fillWidth
:
true
text
:
qsTr
(
"
Application Settings
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
!
ScreenTools
.
isShortScreen
}
Repeater
{
Repeater
{
model
:
QGroundControl
.
corePlugin
.
settingsPages
model
:
QGroundControl
.
corePlugin
.
settingsPages
QGCButton
{
QGCButton
{
...
...
src/ui/MainRootWindow.qml
View file @
0a24a90f
...
@@ -124,11 +124,10 @@ ApplicationWindow {
...
@@ -124,11 +124,10 @@ ApplicationWindow {
}
}
function
viewSwitch
(
currentToolbar
)
{
function
viewSwitch
(
currentToolbar
)
{
settingsWindow
.
visible
=
false
toolDrawer
.
visible
=
false
setupWindow
.
visible
=
false
toolDrawer
.
source
=
""
analyzeWindow
.
visible
=
false
flightView
.
visible
=
false
flightView
.
visible
=
false
planView
Loader
.
visible
=
false
planView
.
visible
=
false
toolbar
.
currentToolbar
=
currentToolbar
toolbar
.
currentToolbar
=
currentToolbar
}
}
...
@@ -142,22 +141,25 @@ ApplicationWindow {
...
@@ -142,22 +141,25 @@ ApplicationWindow {
function
showPlanView
()
{
function
showPlanView
()
{
viewSwitch
(
toolbar
.
planViewToolbar
)
viewSwitch
(
toolbar
.
planViewToolbar
)
planView
Loader
.
visible
=
true
planView
.
visible
=
true
}
}
function
showAnalyzeView
()
{
function
showAnalyzeView
()
{
viewSwitch
(
toolbar
.
simpleToolbar
)
toolDrawer
.
source
=
"
AnalyzeView.qml
"
analyzeWindow
.
visible
=
true
toolDrawer
.
title
=
qsTr
(
"
Analyze Tools
"
)
toolDrawer
.
visible
=
true
}
}
function
showSetupView
()
{
function
showSetupView
()
{
viewSwitch
(
toolbar
.
simpleToolbar
)
toolDrawer
.
source
=
"
SetupView.qml
"
setupWindow
.
visible
=
true
toolDrawer
.
title
=
qsTr
(
"
Vehicle Setup
"
)
toolDrawer
.
visible
=
true
}
}
function
showSettingsView
()
{
function
showSettingsView
()
{
viewSwitch
(
toolbar
.
simpleToolbar
)
toolDrawer
.
source
=
"
AppSettings.qml
"
settingsWindow
.
visible
=
true
toolDrawer
.
title
=
qsTr
(
"
Application Settings
"
)
toolDrawer
.
visible
=
true
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -326,11 +328,12 @@ ApplicationWindow {
...
@@ -326,11 +328,12 @@ ApplicationWindow {
}
}
Drawer
{
Drawer
{
id
:
view
SelectDrawer
id
:
tool
SelectDrawer
height
:
mainWindow
.
height
height
:
mainWindow
.
height
edge
:
Qt
.
LeftEdge
edge
:
Qt
.
LeftEdge
interactive
:
true
interactive
:
true
dragMargin
:
0
dragMargin
:
0
closePolicy
:
Drawer
.
NoAutoClose
visible
:
false
visible
:
false
property
var
_mainWindow
:
mainWindow
property
var
_mainWindow
:
mainWindow
...
@@ -357,74 +360,48 @@ ApplicationWindow {
...
@@ -357,74 +360,48 @@ ApplicationWindow {
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
SubMenuButton
{
SubMenuButton
{
id
:
flyButton
id
:
setupButton
height
:
viewSelectDrawer
.
_toolButtonHeight
height
:
toolSelectDrawer
.
_toolButtonHeight
Layout.fillWidth
:
true
text
:
qsTr
(
"
Fly View
"
)
imageResource
:
"
/qmlimages/PaperPlane.svg
"
imageColor
:
qgcPal
.
text
onClicked
:
{
if
(
toolbar
.
viewButtonClicked
(
this
))
{
mainWindow
.
showFlyView
()
}
}
}
SubMenuButton
{
id
:
planButton
height
:
viewSelectDrawer
.
_toolButtonHeight
Layout.fillWidth
:
true
Layout.fillWidth
:
true
text
:
qsTr
(
"
Plan Mission
"
)
text
:
qsTr
(
"
Vehicle Setup
"
)
imageResource
:
"
/qmlimages/Plan.svg
"
imageColor
:
qgcPal
.
text
imageColor
:
qgcPal
.
text
imageResource
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
onClicked
:
{
if
(
toolbar
.
viewButtonClicked
(
this
))
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showPlanView
()
mainWindow
.
showSetupView
()
toolSelectDrawer
.
visible
=
false
}
}
}
}
}
}
SubMenuButton
{
SubMenuButton
{
id
:
analyzeButton
id
:
analyzeButton
height
:
view
SelectDrawer
.
_toolButtonHeight
height
:
tool
SelectDrawer
.
_toolButtonHeight
Layout.fillWidth
:
true
Layout.fillWidth
:
true
text
:
qsTr
(
"
Analyze Tools
"
)
text
:
qsTr
(
"
Analyze Tools
"
)
imageResource
:
"
/qmlimages/Analyze.svg
"
imageResource
:
"
/qmlimages/Analyze.svg
"
imageColor
:
qgcPal
.
text
imageColor
:
qgcPal
.
text
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
onClicked
:
{
onClicked
:
{
if
(
toolbar
.
viewButtonClicked
(
this
))
{
if
(
!
mainWindow
.
preventViewSwitch
(
))
{
mainWindow
.
showAnalyzeView
()
mainWindow
.
showAnalyzeView
()
}
toolSelectDrawer
.
visible
=
false
}
}
SubMenuButton
{
id
:
setupButton
height
:
viewSelectDrawer
.
_toolButtonHeight
Layout.fillWidth
:
true
text
:
qsTr
(
"
Vehicle Setup
"
)
imageColor
:
qgcPal
.
text
imageResource
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
if
(
toolbar
.
viewButtonClicked
(
this
))
{
mainWindow
.
showSetupView
()
}
}
}
}
}
}
SubMenuButton
{
SubMenuButton
{
id
:
settingsButton
id
:
settingsButton
height
:
view
SelectDrawer
.
_toolButtonHeight
height
:
tool
SelectDrawer
.
_toolButtonHeight
Layout.fillWidth
:
true
Layout.fillWidth
:
true
text
:
qsTr
(
"
Application Settings
"
)
text
:
qsTr
(
"
Application Settings
"
)
imageResource
:
"
/res/QGCLogoFull
"
imageResource
:
"
/res/QGCLogoFull
"
imageColor
:
"
transparent
"
imageColor
:
"
transparent
"
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
onClicked
:
{
onClicked
:
{
if
(
toolbar
.
viewButtonClicked
(
this
))
{
if
(
!
mainWindow
.
preventViewSwitch
(
))
{
mainWindow
.
showSettingsView
()
mainWindow
.
showSettingsView
()
toolSelectDrawer
.
visible
=
false
}
}
}
}
}
}
...
@@ -454,13 +431,18 @@ ApplicationWindow {
...
@@ -454,13 +431,18 @@ ApplicationWindow {
}
}
}
}
DeadMouseArea
{
anchors.fill
:
easterEggMouseArea
}
QGCMouseArea
{
QGCMouseArea
{
anchors.fill
:
qgcVersionLayout
id
:
easterEggMouseArea
anchors.fill
:
qgcVersionLayout
onClicked
:
{
onClicked
:
{
if
(
mouse
.
modifiers
&
Qt
.
Shift
Modifier
)
{
if
(
mouse
.
modifiers
&
Qt
.
Control
Modifier
)
{
QGroundControl
.
corePlugin
.
showTouchAreas
=
!
QGroundControl
.
corePlugin
.
showTouchAreas
QGroundControl
.
corePlugin
.
showTouchAreas
=
!
QGroundControl
.
corePlugin
.
showTouchAreas
}
else
{
}
else
if
(
mouse
.
modifiers
&
Qt
.
ShiftModifier
)
{
if
(
!
QGroundControl
.
corePlugin
.
showAdvancedUI
)
{
if
(
!
QGroundControl
.
corePlugin
.
showAdvancedUI
)
{
advancedModeConfirmation
.
open
()
advancedModeConfirmation
.
open
()
}
else
{
}
else
{
...
@@ -483,47 +465,64 @@ ApplicationWindow {
...
@@ -483,47 +465,64 @@ ApplicationWindow {
}
}
}
}
//-------------------------------------------------------------------------
/// Fly View
FlyView
{
FlyView
{
id
:
flightView
id
:
flightView
anchors.fill
:
parent
anchors.fill
:
parent
}
}
//-------------------------------------------------------------------------
PlanView
{
/// Plan View
id
:
planView
Loader
{
id
:
planViewLoader
anchors.fill
:
parent
anchors.fill
:
parent
visible
:
false
visible
:
false
source
:
"
PlanView.qml
"
}
}
//-------------------------------------------------------------------------
Drawer
{
/// Settings
id
:
toolDrawer
Loader
{
width
:
mainWindow
.
width
id
:
settingsWindow
height
:
mainWindow
.
height
anchors.fill
:
parent
edge
:
Qt
.
LeftEdge
dragMargin
:
0
visible
:
false
visible
:
false
source
:
"
AppSettings.qml
"
}
//-------------------------------------------------------------------------
property
alias
title
:
toolbarDrawerText
.
text
/// Setup
property
alias
source
:
toolDrawerLoader
.
source
Loader
{
id
:
setupWindow
anchors.fill
:
parent
visible
:
false
source
:
"
SetupView.qml
"
}
//-------------------------------------------------------------------------
Rectangle
{
/// Analyze
id
:
toolDrawerToolbar
Loader
{
anchors.left
:
parent
.
left
id
:
analyzeWindow
anchors.right
:
parent
.
right
anchors.fill
:
parent
anchors.top
:
parent
.
top
visible
:
false
height
:
ScreenTools
.
toolbarHeight
source
:
"
AnalyzeView.qml
"
color
:
qgcPal
.
toolbarBackground
QGCLabel
{
id
:
toolbarDrawerText
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
font.pointSize
:
ScreenTools
.
largeFontPointSize
}
QGCButton
{
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Close
"
)
enabled
:
!
mainWindow
.
preventViewSwitch
()
onClicked
:
{
toolDrawer
.
visible
=
false
toolDrawer
.
source
=
""
}
}
}
Loader
{
id
:
toolDrawerLoader
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
toolDrawerToolbar
.
bottom
anchors.bottom
:
parent
.
bottom
}
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
...
src/ui/toolbar/MainToolBar.qml
View file @
0a24a90f
...
@@ -33,28 +33,6 @@ Rectangle {
...
@@ -33,28 +33,6 @@ Rectangle {
property
bool
_communicationLost
:
_activeVehicle
?
_activeVehicle
.
connectionLost
:
false
property
bool
_communicationLost
:
_activeVehicle
?
_activeVehicle
.
connectionLost
:
false
property
color
_mainStatusBGColor
:
qgcPal
.
brandingPurple
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
}
QGCPalette
{
id
:
qgcPal
}
/// Bottom single pixel divider
/// Bottom single pixel divider
...
@@ -89,7 +67,9 @@ Rectangle {
...
@@ -89,7 +67,9 @@ Rectangle {
QGCToolBarButton
{
QGCToolBarButton
{
id
:
currentButton
id
:
currentButton
Layout.preferredHeight
:
viewButtonRow
.
height
Layout.preferredHeight
:
viewButtonRow
.
height
onClicked
:
viewSelectDrawer
.
visible
=
true
icon.source
:
"
/res/QGCLogoFull
"
logo
:
true
onClicked
:
toolSelectDrawer
.
visible
=
true
}
}
MainStatusIndicator
{
MainStatusIndicator
{
...
...
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