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 {
function
viewSwitch
(
currentToolbar
)
{
toolDrawer
.
visible
=
false
toolDrawer
.
source
=
""
toolDrawer
.
toolSource
=
""
flightView
.
visible
=
false
planView
.
visible
=
false
toolbar
.
currentToolbar
=
currentToolbar
...
...
@@ -144,22 +144,24 @@ ApplicationWindow {
planView
.
visible
=
true
}
function
showAnalyzeView
()
{
toolDrawer
.
source
=
"
AnalyzeView.qml
"
toolDrawer
.
title
=
qsTr
(
"
Analyze Tools
"
)
toolDrawer
.
visible
=
true
function
showTool
(
toolTitle
,
toolSource
,
toolIcon
)
{
toolDrawer
.
backIcon
=
flightView
.
visible
?
"
/qmlimages/PaperPlane.svg
"
:
"
/qmlimages/Plan.svg
"
toolDrawer
.
toolTitle
=
toolTitle
toolDrawer
.
toolSource
=
toolSource
toolDrawer
.
toolIcon
=
toolIcon
toolDrawer
.
visible
=
true
}
function
showSetupView
()
{
toolDrawer
.
source
=
"
SetupView.qml
"
toolDrawer
.
title
=
qsTr
(
"
Vehicle Setup
"
)
toolDrawer
.
visible
=
true
function
showAnalyzeTool
()
{
showTool
(
qsTr
(
"
Analyze Tools
"
),
"
AnalyzeView.qml
"
,
"
/qmlimages/Analyze.svg
"
)
}
function
showSettingsView
()
{
toolDrawer
.
source
=
"
AppSettings.qml
"
toolDrawer
.
title
=
qsTr
(
"
Application Settings
"
)
toolDrawer
.
visible
=
true
function
showSetupTool
()
{
showTool
(
qsTr
(
"
Vehicle Setup
"
),
"
SetupView.qml
"
,
"
/qmlimages/Gears.svg
"
)
}
function
showSettingsTool
()
{
showTool
(
qsTr
(
"
Application Settings
"
),
"
AppSettings.qml
"
,
"
/res/QGCLogoWhite
"
)
}
//-------------------------------------------------------------------------
...
...
@@ -367,7 +369,7 @@ ApplicationWindow {
imageResource
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showSetup
View
()
mainWindow
.
showSetup
Tool
()
toolSelectDrawer
.
visible
=
false
}
}
...
...
@@ -383,7 +385,7 @@ ApplicationWindow {
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showAnalyze
View
()
mainWindow
.
showAnalyze
Tool
()
toolSelectDrawer
.
visible
=
false
}
}
...
...
@@ -399,7 +401,7 @@ ApplicationWindow {
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
onClicked
:
{
if
(
!
mainWindow
.
preventViewSwitch
())
{
mainWindow
.
showSettings
View
()
mainWindow
.
showSettings
Tool
()
toolSelectDrawer
.
visible
=
false
}
}
...
...
@@ -485,8 +487,10 @@ ApplicationWindow {
interactive
:
false
visible
:
false
property
alias
title
:
toolbarDrawerText
.
text
property
alias
source
:
toolDrawerLoader
.
source
property
alias
backIcon
:
backIcon
.
source
property
alias
toolTitle
:
toolbarDrawerText
.
text
property
alias
toolSource
:
toolDrawerLoader
.
source
property
alias
toolIcon
:
toolIcon
.
source
Rectangle
{
id
:
toolDrawerToolbar
...
...
@@ -496,23 +500,55 @@ ApplicationWindow {
height
:
ScreenTools
.
toolbarHeight
color
:
qgcPal
.
toolbarBackground
QGCLabel
{
id
:
toolbarDrawerText
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
font.pointSize
:
ScreenTools
.
largeFontPointSize
RowLayout
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
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
{
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Close
"
)
enabled
:
!
mainWindow
.
preventViewSwitch
()
QGCMouseArea
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
x
:
parent
.
mapFromItem
(
backIcon
,
backIcon
.
x
,
backIcon
.
y
).
x
width
:
(
backTextLabel
.
x
+
backTextLabel
.
width
)
-
backIcon
.
x
onClicked
:
{
toolDrawer
.
visible
=
false
toolDrawer
.
source
=
""
toolDrawer
.
visible
=
false
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