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
0806f857
Commit
0806f857
authored
May 15, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preload Settings, Vehicle Setup and Analyze views
parent
62822013
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
31 deletions
+38
-31
MainRootWindow.qml
src/ui/MainRootWindow.qml
+38
-31
No files found.
src/ui/MainRootWindow.qml
View file @
0806f857
...
@@ -41,10 +41,6 @@ ApplicationWindow {
...
@@ -41,10 +41,6 @@ ApplicationWindow {
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
readonly
property
string
settingsViewSource
:
"
AppSettings.qml
"
readonly
property
string
setupViewSource
:
"
SetupView.qml
"
readonly
property
string
analyzeViewSource
:
!
ScreenTools
.
isMobile
?
"
AnalyzeView.qml
"
:
"
MavlinkConsolePage.qml
"
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Global Scope Variables
//-- Global Scope Variables
...
@@ -76,50 +72,41 @@ ApplicationWindow {
...
@@ -76,50 +72,41 @@ ApplicationWindow {
//-- Global Scope Functions
//-- Global Scope Functions
function
viewSwitch
(
isPlanView
)
{
function
viewSwitch
(
isPlanView
)
{
settingsWindow
.
visible
=
false
setupWindow
.
visible
=
false
analyzeWindow
.
visible
=
false
rootBackground
.
visible
=
false
planViewLoader
.
visible
=
false
if
(
isPlanView
)
{
if
(
isPlanView
)
{
rootBackground
.
visible
=
false
toolbar
.
source
=
_planToolbar
planViewLoader
.
visible
=
true
if
(
toolbar
.
source
!==
_planToolbar
)
{
toolbar
.
source
=
_planToolbar
}
}
else
{
}
else
{
rootBackground
.
visible
=
true
toolbar
.
source
=
_mainToolbar
planViewLoader
.
visible
=
false
if
(
toolbar
.
source
!==
_mainToolbar
)
{
toolbar
.
source
=
_mainToolbar
}
}
}
}
}
function
showFlyView
()
{
function
showFlyView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
)
mainContentWindow
.
source
=
""
rootBackground
.
visible
=
true
}
}
function
showPlanView
()
{
function
showPlanView
()
{
viewSwitch
(
true
)
viewSwitch
(
true
)
mainContentWindow
.
source
=
""
planViewLoader
.
visible
=
true
}
}
function
showAnalyzeView
()
{
function
showAnalyzeView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
)
if
(
mainContentWindow
.
source
!==
analyzeViewSource
)
{
analyzeWindow
.
visible
=
true
mainContentWindow
.
source
=
analyzeViewSource
}
}
}
function
showSetupView
()
{
function
showSetupView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
)
if
(
mainContentWindow
.
source
!==
setupViewSource
)
{
setupWindow
.
visible
=
true
mainContentWindow
.
source
=
setupViewSource
}
}
}
function
showSettingsView
()
{
function
showSettingsView
()
{
viewSwitch
(
false
)
viewSwitch
(
false
)
if
(
mainContentWindow
.
source
!==
settingsViewSource
)
{
settingsWindow
.
visible
=
true
mainContentWindow
.
source
=
settingsViewSource
}
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -313,17 +300,37 @@ ApplicationWindow {
...
@@ -313,17 +300,37 @@ ApplicationWindow {
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Plan View
//-- Plan View
Loader
{
Loader
{
id
:
planViewLoader
id
:
planViewLoader
anchors.fill
:
parent
anchors.fill
:
parent
visible
:
false
visible
:
false
source
:
"
PlanView.qml
"
source
:
"
PlanView.qml
"
}
//-------------------------------------------------------------------------
//-- Settings
Loader
{
id
:
settingsWindow
anchors.fill
:
parent
visible
:
false
source
:
"
AppSettings.qml
"
}
//-------------------------------------------------------------------------
//-- Setup
Loader
{
id
:
setupWindow
anchors.fill
:
parent
visible
:
false
source
:
"
SetupView.qml
"
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//--
Current content
//--
Analyze
Loader
{
Loader
{
id
:
mainContent
Window
id
:
analyze
Window
anchors.fill
:
parent
anchors.fill
:
parent
visible
:
false
source
:
"
AnalyzeView.qml
"
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
...
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