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
a27d2a70
Commit
a27d2a70
authored
Jul 31, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Visual naming for top level views
parent
07aba7a1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
307 additions
and
281 deletions
+307
-281
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-1
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+21
-10
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+26
-12
SetupView.qml
src/VehicleSetup/SetupView.qml
+32
-8
AppSettings.qml
src/ui/AppSettings.qml
+198
-0
MainWindowInner.qml
src/ui/MainWindowInner.qml
+26
-25
MainWindowLeftPanel.qml
src/ui/MainWindowLeftPanel.qml
+0
-222
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+3
-3
No files found.
qgroundcontrol.qrc
View file @
a27d2a70
...
...
@@ -37,7 +37,7 @@
<file alias="MainWindowHybrid.qml">src/ui/MainWindowHybrid.qml</file>
<file alias="MainWindowInner.qml">src/ui/MainWindowInner.qml</file>
<file alias="MainWindowNative.qml">src/ui/MainWindowNative.qml</file>
<file alias="
MainWindowLeftPanel.qml">src/ui/MainWindowLeftPanel
.qml</file>
<file alias="
AppSettings.qml">src/ui/AppSettings
.qml</file>
<file alias="MissionEditor.qml">src/MissionEditor/MissionEditor.qml</file>
<file alias="MotorComponent.qml">src/AutoPilotPlugins/Common/MotorComponent.qml</file>
<file alias="PowerComponent.qml">src/AutoPilotPlugins/PX4/PowerComponent.qml</file>
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
a27d2a70
...
...
@@ -30,13 +30,13 @@ Item {
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_isSatellite
:
_mainIsMap
?
(
_flightMap
?
_flightMap
.
isSatelliteMap
:
true
)
:
true
property
bool
_lightWidgetBorders
:
_
mainIsMap
?
(
_flightMap
?
_flightMap
.
isSatelliteMap
:
true
)
:
tru
e
property
bool
_lightWidgetBorders
:
_
isSatellit
e
property
bool
_useAlternateInstruments
:
QGroundControl
.
virtualTabletJoystick
||
ScreenTools
.
isTinyScreen
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
!
isBackgroundDark
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
isBackgroundDark
}
QGCPalette
{
id
:
qgcPal
}
function
getGadgetWidth
()
{
...
...
@@ -139,14 +139,25 @@ Item {
maxHeight
:
virtualJoystickMultiTouch
.
visible
?
virtualJoystickMultiTouch
.
y
-
y
:
parent
.
height
-
anchors
.
margins
-
y
}
QGCLabel
{
id
:
flyLabel
text
:
qsTr
(
"
Fly
"
)
color
:
mapPal
.
text
visible
:
!
ScreenTools
.
isShortScreen
anchors.topMargin
:
_toolButtonTopMargin
anchors.horizontalCenter
:
toolColumn
.
horizontalCenter
anchors.top
:
parent
.
top
}
//-- Vertical Tool Buttons
Column
{
id
:
toolColumn
visible
:
_mainIsMap
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
id
:
toolColumn
anchors.topMargin
:
ScreenTools
.
isShortScreen
?
_toolButtonTopMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.top
:
ScreenTools
.
isShortScreen
?
parent
.
top
:
flyLabel
.
bottom
spacing
:
ScreenTools
.
defaultFontPixelHeight
visible
:
_mainIsMap
//-- Map Center Control
DropButton
{
...
...
src/MissionEditor/MissionEditor.qml
View file @
a27d2a70
...
...
@@ -33,17 +33,19 @@ QGCView {
// zOrder comes from the Loader in MainWindow.qml
z
:
QGroundControl
.
zOrderTopMost
readonly
property
int
_decimalPlaces
:
8
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelOpacity
:
0.8
readonly
property
int
_toolButtonCount
:
6
readonly
property
string
_autoSyncKey
:
"
AutoSync
"
readonly
property
int
_decimalPlaces
:
8
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelOpacity
:
0.8
readonly
property
int
_toolButtonCount
:
6
readonly
property
string
_autoSyncKey
:
"
AutoSync
"
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
readonly
property
int
_addMissionItemsButtonAutoOffTimeout
:
10000
readonly
property
var
_defaultVehicleCoordinate
:
QtPositioning
.
coordinate
(
37.803784
,
-
122.462276
)
property
bool
_syncNeeded
:
controller
.
visualItems
.
dirty
// Unsaved changes, visible to parent container
property
var
_visualItems
:
controller
.
visualItems
property
var
_currentMissionItem
...
...
@@ -272,6 +274,8 @@ QGCView {
}
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
editorMap
.
isSatelliteMap
}
MouseArea
{
//-- It's a whole lot faster to just fill parent and deal with top offset below
// than computing the coordinate offset.
...
...
@@ -524,13 +528,23 @@ QGCView {
}
}
QGCLabel
{
id
:
planLabel
text
:
qsTr
(
"
Plan
"
)
color
:
mapPal
.
text
visible
:
!
ScreenTools
.
isShortScreen
anchors.topMargin
:
_toolButtonTopMargin
anchors.horizontalCenter
:
toolColumn
.
horizontalCenter
anchors.top
:
parent
.
top
}
//-- Vertical Tool Buttons
Column
{
id
:
toolColumn
anchors.topMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
ScreenTools
.
defaultFontPixelHeight
anchors.
margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.topMargin
:
ScreenTools
.
isShortScreen
?
_toolButtonTopMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.
leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
anchors.top
:
ScreenTools
.
isShortScreen
?
parent
.
top
:
planLabel
.
bottom
spacing
:
ScreenTools
.
defaultFontPixelHeight
z
:
QGroundControl
.
zOrderWidgets
...
...
@@ -749,7 +763,7 @@ QGCView {
width
:
sendSaveGrid
.
width
wrapMode
:
Text
.
WordWrap
text
:
_syncNeeded
&&
!
controller
.
autoSync
?
qsTr
(
"
You have unsaved change
d to you
mission. You should send to your vehicle, or save to a file:
"
)
:
qsTr
(
"
You have unsaved change
s to your
mission. You should send to your vehicle, or save to a file:
"
)
:
qsTr
(
"
Sync:
"
)
}
GridLayout
{
...
...
src/VehicleSetup/SetupView.qml
View file @
a27d2a70
...
...
@@ -23,7 +23,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
MultiVehicleManager
1.0
Rectangle
{
id
:
setupView
id
:
setupView
color
:
qgcPal
.
window
z
:
QGroundControl
.
zOrderTopMost
...
...
@@ -33,8 +33,9 @@ Rectangle {
readonly
property
real
_defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
_defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_margin
:
Math
.
round
(
_defaultTextHeight
/
2
)
readonly
property
real
_buttonWidth
:
Math
.
round
(
_defaultTextWidth
*
18
)
readonly
property
real
_horizontalMargin
:
_defaultTextWidth
/
2
readonly
property
real
_verticalMargin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
18
readonly
property
string
_armedVehicleText
:
qsTr
(
"
This operation cannot be performed while vehicle is armed.
"
)
property
string
_messagePanelText
:
"
missing message panel text
"
...
...
@@ -211,6 +212,8 @@ Rectangle {
anchors.topMargin
:
_defaultTextHeight
/
2
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.leftMargin
:
_horizontalMargin
anchors.left
:
parent
.
left
contentHeight
:
buttonColumn
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
...
...
@@ -245,6 +248,15 @@ Rectangle {
}
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Vehicle Setup
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
!
ScreenTools
.
isShortScreen
}
SubMenuButton
{
id
:
summaryButton
imageResource
:
"
/qmlimages/VehicleSummaryIcon.png
"
...
...
@@ -315,13 +327,25 @@ Rectangle {
}
}
Rectangle
{
id
:
divider
anchors.topMargin
:
_verticalMargin
anchors.bottomMargin
:
_verticalMargin
anchors.leftMargin
:
_horizontalMargin
anchors.left
:
buttonScroll
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
1
color
:
qgcPal
.
windowShade
}
Loader
{
id
:
panelLoader
anchors.topMargin
:
_
m
argin
anchors.bottomMargin
:
_
m
argin
anchors.leftMargin
:
_
defaultTextWidth
anchors.rightMargin
:
_
defaultTextWidth
anchors.left
:
buttonScroll
.
right
anchors.topMargin
:
_
verticalM
argin
anchors.bottomMargin
:
_
verticalM
argin
anchors.leftMargin
:
_
horizontalMargin
anchors.rightMargin
:
_
horizontalMargin
anchors.left
:
divider
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
src/ui/AppSettings.qml
0 → 100644
View file @
a27d2a70
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QtPositioning
5.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
id
:
settingsView
color
:
qgcPal
.
window
z
:
QGroundControl
.
zOrderTopMost
readonly
property
real
_defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
_defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_horizontalMargin
:
_defaultTextWidth
/
2
readonly
property
real
_verticalMargin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonHeight
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
3
:
ScreenTools
.
defaultFontPixelHeight
*
2
readonly
property
real
_buttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10
QGCPalette
{
id
:
qgcPal
}
Component.onCompleted
:
{
//-- Default to General Settings
__rightPanel
.
source
=
"
GeneralSettings.qml
"
_generalButton
.
checked
=
true
panelActionGroup
.
current
=
_generalButton
}
QGCFlickable
{
id
:
buttonList
width
:
buttonColumn
.
width
anchors.topMargin
:
_verticalMargin
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.leftMargin
:
_horizontalMargin
anchors.left
:
parent
.
left
contentHeight
:
buttonColumn
.
height
+
_verticalMargin
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
ExclusiveGroup
{
id
:
panelActionGroup
}
Column
{
id
:
buttonColumn
width
:
_maxButtonWidth
spacing
:
_verticalMargin
property
real
_maxButtonWidth
:
0
Component.onCompleted
:
reflowWidths
()
function
reflowWidths
()
{
buttonColumn
.
_maxButtonWidth
=
0
for
(
var
i
=
0
;
i
<
children
.
length
;
i
++
)
{
buttonColumn
.
_maxButtonWidth
=
Math
.
max
(
buttonColumn
.
_maxButtonWidth
,
children
[
i
].
width
)
}
for
(
var
j
=
0
;
j
<
children
.
length
;
j
++
)
{
children
[
j
].
width
=
buttonColumn
.
_maxButtonWidth
}
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Application Settings
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
!
ScreenTools
.
isShortScreen
}
QGCButton
{
id
:
_generalButton
height
:
_buttonHeight
text
:
qsTr
(
"
General
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
GeneralSettings.qml
"
)
{
__rightPanel
.
source
=
"
GeneralSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
Comm Links
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
LinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
LinkSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
Offline Maps
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
OfflineMap.qml
"
)
{
__rightPanel
.
source
=
"
OfflineMap.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
MavLink
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MavlinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
MavlinkSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
Console
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
QGroundControl/Controls/AppMessages.qml
"
)
{
__rightPanel
.
source
=
"
QGroundControl/Controls/AppMessages.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
Mock Link
"
)
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MockLink.qml
"
)
{
__rightPanel
.
source
=
"
MockLink.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
text
:
qsTr
(
"
Debug
"
)
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
DebugWindow.qml
"
)
{
__rightPanel
.
source
=
"
DebugWindow.qml
"
}
checked
=
true
}
}
}
}
Rectangle
{
id
:
divider
anchors.topMargin
:
_verticalMargin
anchors.bottomMargin
:
_verticalMargin
anchors.leftMargin
:
_horizontalMargin
anchors.left
:
buttonList
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
1
color
:
qgcPal
.
windowShade
}
//-- Panel Contents
Loader
{
id
:
__rightPanel
anchors.leftMargin
:
_horizontalMargin
anchors.rightMargin
:
_horizontalMargin
anchors.topMargin
:
_verticalMargin
anchors.bottomMargin
:
_verticalMargin
anchors.left
:
divider
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
}
}
src/ui/MainWindowInner.qml
View file @
a27d2a70
...
...
@@ -29,7 +29,7 @@ Item {
readonly
property
string
_planViewSource
:
"
MissionEditor.qml
"
readonly
property
string
_setupViewSource
:
"
SetupView.qml
"
readonly
property
string
_
preferencesSource
:
"
MainWindowLeftPanel
.qml
"
readonly
property
string
_
settingsViewSource
:
"
AppSettings
.qml
"
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
...
@@ -56,7 +56,7 @@ Item {
currentPopUp
.
close
()
}
ScreenTools
.
availableHeight
=
parent
.
height
-
toolBar
.
height
preferencesPanel
.
visible
=
false
settingsViewLoader
.
visible
=
false
flightView
.
visible
=
true
setupViewLoader
.
visible
=
false
planViewLoader
.
visible
=
false
...
...
@@ -71,7 +71,7 @@ Item {
planViewLoader
.
source
=
_planViewSource
}
ScreenTools
.
availableHeight
=
parent
.
height
-
toolBar
.
height
preferencesPanel
.
visible
=
false
settingsViewLoader
.
visible
=
false
flightView
.
visible
=
false
setupViewLoader
.
visible
=
false
planViewLoader
.
visible
=
true
...
...
@@ -87,27 +87,27 @@ Item {
if
(
setupViewLoader
.
source
!=
_setupViewSource
)
{
setupViewLoader
.
source
=
_setupViewSource
}
preferencesPanel
.
visible
=
false
settingsViewLoader
.
visible
=
false
flightView
.
visible
=
false
setupViewLoader
.
visible
=
true
planViewLoader
.
visible
=
false
toolBar
.
checkSetupButton
()
}
function
show
Preferences
()
{
function
show
SettingsView
()
{
if
(
currentPopUp
)
{
currentPopUp
.
close
()
}
//-- In preferences view, the full height is available. Set to 0 so it is ignored.
ScreenTools
.
availableHeight
=
0
if
(
preferencesPanel
.
source
!=
_preferences
Source
)
{
preferencesPanel
.
source
=
_preferences
Source
if
(
settingsViewLoader
.
source
!=
_settingsView
Source
)
{
settingsViewLoader
.
source
=
_settingsView
Source
}
flightView
.
visible
=
false
setupViewLoader
.
visible
=
false
planViewLoader
.
visible
=
false
preferencesPanel
.
visible
=
true
toolBar
.
check
Preference
sButton
()
settingsViewLoader
.
visible
=
true
toolBar
.
check
Setting
sButton
()
}
// The following are use for unit testing only
...
...
@@ -260,20 +260,6 @@ Item {
currentPopUp
=
indicatorDropdown
}
//-- Left Settings Menu
Loader
{
id
:
preferencesPanel
anchors.fill
:
parent
visible
:
false
z
:
QGroundControl
.
zOrderTopMost
+
100
active
:
visible
onVisibleChanged
:
{
if
(
!
visible
)
{
source
=
""
}
}
}
//-- Main UI
MainToolBar
{
...
...
@@ -283,13 +269,12 @@ Item {
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
mainWindow
:
mainWindow
opaqueBackground
:
preferencesPanel
.
visible
isBackgroundDark
:
flightView
.
isBackgroundDark
z
:
QGroundControl
.
zOrderTopMost
onShowSetupView
:
mainWindow
.
showSetupView
()
onShowPlanView
:
mainWindow
.
showPlanView
()
onShowFlyView
:
mainWindow
.
showFlyView
()
onShow
Preferences
:
mainWindow
.
showPreferences
()
onShow
SettingsView
:
mainWindow
.
showSettingsView
()
Component.onCompleted
:
{
ScreenTools
.
availableHeight
=
parent
.
height
-
toolBar
.
height
}
...
...
@@ -316,6 +301,22 @@ Item {
visible
:
false
}
Loader
{
id
:
settingsViewLoader
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
toolBar
.
bottom
anchors.bottom
:
parent
.
bottom
visible
:
false
onVisibleChanged
:
{
if
(
!
visible
)
{
// Free up the memory for this when not shown. No need to persist.
source
=
""
}
}
}
//-------------------------------------------------------------------------
//-- Dismiss Pop Up Messages
MouseArea
{
...
...
src/ui/MainWindowLeftPanel.qml
deleted
100644 → 0
View file @
07aba7a1
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QtPositioning
5.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
ScreenTools
1.0
//-- Left Menu
Item
{
id
:
settingsMenu
anchors.fill
:
parent
readonly
property
real
__closeButtonSize
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_buttonHeight
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
3
:
ScreenTools
.
defaultFontPixelHeight
*
2
QGCPalette
{
id
:
qgcPal
}
Component.onCompleted
:
{
//-- Default to General Settings
__rightPanel
.
source
=
"
GeneralSettings.qml
"
_generalButton
.
checked
=
true
panelActionGroup
.
current
=
_generalButton
}
// This covers the screen with a transparent section
Rectangle
{
id
:
__transparentSection
height
:
parent
.
height
-
toolBar
.
height
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
opacity
:
0.0
color
:
qgcPal
.
window
visible
:
__rightPanel
.
source
==
""
}
//-- Top Separator
Rectangle
{
id
:
__topSeparator
width
:
parent
.
width
height
:
1
y
:
toolBar
.
height
anchors.left
:
parent
.
left
color
:
QGroundControl
.
isDarkStyle
?
"
#909090
"
:
"
#7f7f7f
"
}
// This is the menu dialog panel which is anchored to the left edge
Rectangle
{
id
:
__leftMenu
width
:
ScreenTools
.
defaultFontPixelWidth
*
16
anchors.left
:
parent
.
left
anchors.top
:
__topSeparator
.
bottom
anchors.bottom
:
parent
.
bottom
color
:
qgcPal
.
windowShadeDark
QGCFlickable
{
anchors.fill
:
parent
contentHeight
:
buttonColumn
.
height
+
_margins
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
ExclusiveGroup
{
id
:
panelActionGroup
}
Column
{
id
:
buttonColumn
anchors.leftMargin
:
_margins
anchors.rightMargin
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.topMargin
:
_margins
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
QGCLabel
{
text
:
qsTr
(
"
Preferences
"
)
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
QGCButton
{
id
:
_generalButton
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
General
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
GeneralSettings.qml
"
)
{
__rightPanel
.
source
=
"
GeneralSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Comm Links
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
LinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
LinkSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Offline Maps
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
OfflineMap.qml
"
)
{
__rightPanel
.
source
=
"
OfflineMap.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
MavLink
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MavlinkSettings.qml
"
)
{
__rightPanel
.
source
=
"
MavlinkSettings.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Console
"
)
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
QGroundControl/Controls/AppMessages.qml
"
)
{
__rightPanel
.
source
=
"
QGroundControl/Controls/AppMessages.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Mock Link
"
)
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
MockLink.qml
"
)
{
__rightPanel
.
source
=
"
MockLink.qml
"
}
checked
=
true
}
}
QGCButton
{
height
:
_buttonHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Debug
"
)
visible
:
ScreenTools
.
isDebug
exclusiveGroup
:
panelActionGroup
onClicked
:
{
if
(
__rightPanel
.
source
!=
"
DebugWindow.qml
"
)
{
__rightPanel
.
source
=
"
DebugWindow.qml
"
}
checked
=
true
}
}
}
}
}
//-- Vertical Separator
Rectangle
{
id
:
__verticalSeparator
width
:
1
height
:
parent
.
height
-
toolBar
.
height
anchors.left
:
__leftMenu
.
right