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
d48576cd
Commit
d48576cd
authored
Sep 01, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
0030c00e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
32 deletions
+68
-32
MainRootWindow.qml
src/ui/MainRootWindow.qml
+68
-32
No files found.
src/ui/MainRootWindow.qml
View file @
d48576cd
...
@@ -125,7 +125,7 @@ ApplicationWindow {
...
@@ -125,7 +125,7 @@ ApplicationWindow {
function
viewSwitch
(
currentToolbar
)
{
function
viewSwitch
(
currentToolbar
)
{
toolDrawer
.
visible
=
false
toolDrawer
.
visible
=
false
toolDrawer
.
source
=
""
toolDrawer
.
toolSource
=
""
flightView
.
visible
=
false
flightView
.
visible
=
false
planView
.
visible
=
false
planView
.
visible
=
false
toolbar
.
currentToolbar
=
currentToolbar
toolbar
.
currentToolbar
=
currentToolbar
...
@@ -144,22 +144,24 @@ ApplicationWindow {
...
@@ -144,22 +144,24 @@ ApplicationWindow {
planView
.
visible
=
true
planView
.
visible
=
true
}
}
function
showAnalyzeView
()
{
function
showTool
(
toolTitle
,
toolSource
,
toolIcon
)
{
toolDrawer
.
source
=
"
AnalyzeView.qml
"
toolDrawer
.
backIcon
=
flightView
.
visible
?
"
/qmlimages/PaperPlane.svg
"
:
"
/qmlimages/Plan.svg
"
toolDrawer
.
title
=
qsTr
(
"
Analyze Tools
"
)
toolDrawer
.
toolTitle
=
toolTitle
toolDrawer
.
visible
=
true
toolDrawer
.
toolSource
=
toolSource
toolDrawer
.
toolIcon
=
toolIcon
toolDrawer
.
visible
=
true
}
}
function
showSetupView
()
{
function
showAnalyzeTool
()
{
toolDrawer
.
source
=
"
SetupView.qml
"
showTool
(
qsTr
(
"
Analyze Tools
"
),
"
AnalyzeView.qml
"
,
"
/qmlimages/Analyze.svg
"
)
toolDrawer
.
title
=
qsTr
(
"
Vehicle Setup
"
)
toolDrawer
.
visible
=
true
}
}
function
showSettingsView
()
{
function
showSetupTool
()
{
toolDrawer
.
source
=
"
AppSettings.qml
"
showTool
(
qsTr
(
"
Vehicle Setup
"
),
"
SetupView.qml
"
,
"
/qmlimages/Gears.svg
"
)
toolDrawer
.
title
=
qsTr
(
"
Application Settings
"
)
}
toolDrawer
.
visible
=
true
function
showSettingsTool
()
{
showTool
(
qsTr
(
"
Application Settings
"
),
"
AppSettings.qml
"
,
"
/res/QGCLogoWhite
"
)
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -367,7 +369,7 @@ ApplicationWindow {
...
@@ -367,7 +369,7 @@ ApplicationWindow {
imageResource
:
"
/qmlimages/Gears.svg
"
imageResource
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showSetup
View
()
mainWindow
.
showSetup
Tool
()
toolSelectDrawer
.
visible
=
false
toolSelectDrawer
.
visible
=
false
}
}
}
}
...
@@ -383,7 +385,7 @@ ApplicationWindow {
...
@@ -383,7 +385,7 @@ ApplicationWindow {
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
onClicked
:
{
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showAnalyze
View
()
mainWindow
.
showAnalyze
Tool
()
toolSelectDrawer
.
visible
=
false
toolSelectDrawer
.
visible
=
false
}
}
}
}
...
@@ -399,7 +401,7 @@ ApplicationWindow {
...
@@ -399,7 +401,7 @@ ApplicationWindow {
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
onClicked
:
{
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showSettings
View
()
mainWindow
.
showSettings
Tool
()
toolSelectDrawer
.
visible
=
false
toolSelectDrawer
.
visible
=
false
}
}
}
}
...
@@ -485,8 +487,10 @@ ApplicationWindow {
...
@@ -485,8 +487,10 @@ ApplicationWindow {
interactive
:
false
interactive
:
false
visible
:
false
visible
:
false
property
alias
title
:
toolbarDrawerText
.
text
property
alias
backIcon
:
backIcon
.
source
property
alias
source
:
toolDrawerLoader
.
source
property
alias
toolTitle
:
toolbarDrawerText
.
text
property
alias
toolSource
:
toolDrawerLoader
.
source
property
alias
toolIcon
:
toolIcon
.
source
Rectangle
{
Rectangle
{
id
:
toolDrawerToolbar
id
:
toolDrawerToolbar
...
@@ -496,23 +500,55 @@ ApplicationWindow {
...
@@ -496,23 +500,55 @@ ApplicationWindow {
height
:
ScreenTools
.
toolbarHeight
height
:
ScreenTools
.
toolbarHeight
color
:
qgcPal
.
toolbarBackground
color
:
qgcPal
.
toolbarBackground
QGCLabel
{
RowLayout
{
id
:
toolbarDrawerText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.bottom
:
parent
.
bottom
font.pointSize
:
ScreenTools
.
largeFontPointSize
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCColoredImage
{
id
:
backIcon
width
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
color
:
qgcPal
.
text
}
QGCLabel
{
id
:
backTextLabel
text
:
qsTr
(
"
Back
"
)
}
QGCLabel
{
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
"
<
"
}
QGCColoredImage
{
id
:
toolIcon
width
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
color
:
qgcPal
.
text
}
QGCLabel
{
id
:
toolbarDrawerText
font.pointSize
:
ScreenTools
.
largeFontPointSize
}
}
}
QGCButton
{
QGCMouseArea
{
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.verticalCenter
:
parent
.
verticalCenter
x
:
parent
.
mapFromItem
(
backIcon
,
backIcon
.
x
,
backIcon
.
y
).
x
text
:
qsTr
(
"
Close
"
)
width
:
(
backTextLabel
.
x
+
backTextLabel
.
width
)
-
backIcon
.
x
enabled
:
!
mainWindow
.
preventViewSwitch
()
onClicked
:
{
onClicked
:
{
toolDrawer
.
visible
=
false
toolDrawer
.
visible
=
false
toolDrawer
.
source
=
""
toolDrawer
.
toolSource
=
""
}
}
}
}
}
}
...
...
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