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
6929d269
Commit
6929d269
authored
Jan 20, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial Mockup
parent
f4cf5aae
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
404 additions
and
146 deletions
+404
-146
qgcresources.qrc
qgcresources.qrc
+6
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+3
-0
waypoint.svg
resources/waypoint.svg
+10
-0
AirspaceControl.qml
src/Airmap/AirspaceControl.qml
+237
-0
AirspaceRegulation.qml
src/Airmap/AirspaceRegulation.qml
+58
-0
QGroundControl.Airmap.qmldir
src/Airmap/QGroundControl.Airmap.qmldir
+4
-0
advisory-icon.svg
src/Airmap/images/advisory-icon.svg
+21
-0
pencil.svg
src/Airmap/images/pencil.svg
+17
-0
PlanView.qml
src/PlanView/PlanView.qml
+48
-146
No files found.
qgcresources.qrc
View file @
6929d269
...
@@ -171,6 +171,11 @@
...
@@ -171,6 +171,11 @@
<file alias="APM/BrandImageSub">src/FirmwarePlugin/APM/APMBrandImageSub.png</file>
<file alias="APM/BrandImageSub">src/FirmwarePlugin/APM/APMBrandImageSub.png</file>
<file alias="PX4/BrandImage">src/FirmwarePlugin/PX4/PX4BrandImage.png</file>
<file alias="PX4/BrandImage">src/FirmwarePlugin/PX4/PX4BrandImage.png</file>
<file alias="subVehicleArrowOpaque.png">src/FlightMap/Images/sub.png</file>
<file alias="subVehicleArrowOpaque.png">src/FlightMap/Images/sub.png</file>
<file alias="advisory-icon.svg">src/Airmap/images/advisory-icon.svg</file>
</qresource>
<qresource prefix="/airmap">
<file alias="advisory-icon.svg">src/Airmap/images/advisory-icon.svg</file>
<file alias="pencil.svg">src/Airmap/images/pencil.svg</file>
</qresource>
</qresource>
<qresource prefix="/res">
<qresource prefix="/res">
<file alias="action.svg">resources/action.svg</file>
<file alias="action.svg">resources/action.svg</file>
...
@@ -207,6 +212,7 @@
...
@@ -207,6 +212,7 @@
<file alias="wind-rose-arrow.svg">resources/wind-rose-arrow.svg</file>
<file alias="wind-rose-arrow.svg">resources/wind-rose-arrow.svg</file>
<file alias="XDelete.svg">resources/XDelete.svg</file>
<file alias="XDelete.svg">resources/XDelete.svg</file>
<file alias="XDeleteBlack.svg">resources/XDeleteBlack.svg</file>
<file alias="XDeleteBlack.svg">resources/XDeleteBlack.svg</file>
<file alias="waypoint.svg">resources/waypoint.svg</file>
<file>resources/icons/qgroundcontrol.ico</file>
<file>resources/icons/qgroundcontrol.ico</file>
</qresource>
</qresource>
<qresource prefix="/res/firmware">
<qresource prefix="/res/firmware">
...
...
qgroundcontrol.qrc
View file @
6929d269
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
<file alias="JoystickIndicator.qml">src/ui/toolbar/JoystickIndicator.qml</file>
<file alias="JoystickIndicator.qml">src/ui/toolbar/JoystickIndicator.qml</file>
</qresource>
</qresource>
<qresource prefix="/qml">
<qresource prefix="/qml">
<file alias="QGroundControl/Airmap/qmldir">src/Airmap/QGroundControl.Airmap.qmldir</file>
<file alias="QGroundControl/Airmap/AirspaceControl.qml">src/Airmap/AirspaceControl.qml</file>
<file alias="QGroundControl/Airmap/AirspaceRegulation.qml">src/Airmap/AirspaceRegulation.qml</file>
<file alias="AnalyzeView.qml">src/AnalyzeView/AnalyzeView.qml</file>
<file alias="AnalyzeView.qml">src/AnalyzeView/AnalyzeView.qml</file>
<file alias="AppSettings.qml">src/ui/AppSettings.qml</file>
<file alias="AppSettings.qml">src/ui/AppSettings.qml</file>
<file alias="BluetoothSettings.qml">src/ui/preferences/BluetoothSettings.qml</file>
<file alias="BluetoothSettings.qml">src/ui/preferences/BluetoothSettings.qml</file>
...
...
resources/waypoint.svg
0 → 100644
View file @
6929d269
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"72px"
height=
"72px"
viewBox=
"0 0 72 72"
style=
"enable-background:new 0 0 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:#FFFFFF;}
</style>
<path
class=
"st0"
d=
"M36,0C21.089,0,9,12.089,9,27s22.5,45,27,45s27-30.089,27-45S50.911,0,36,0z M36,45c-9.927,0-18-8.077-18-18
S26.073,9,36,9s18,8.077,18,18S45.927,45,36,45z"
/>
</svg>
src/Airmap/AirspaceControl.qml
0 → 100644
View file @
6929d269
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QtQml
2.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Airmap
1.0
Item
{
id
:
_root
width
:
parent
.
width
height
:
colapsed
?
colapsedRect
.
height
:
expandedRect
.
height
property
var
colapsed
:
true
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
color
_colorOrange
:
"
#d75e0d
"
readonly
property
color
_colorBrown
:
"
#3c2b24
"
readonly
property
color
_colorLightBrown
:
"
#5a4e49
"
readonly
property
color
_colorGray
:
"
#615c61
"
readonly
property
color
_colorMidBrown
:
"
#3a322f
"
readonly
property
color
_colorYellow
:
"
#d7c61d
"
readonly
property
color
_colorWhite
:
"
#ffffff
"
QGCPalette
{
id
:
qgcPal
colorGroupEnabled
:
enabled
}
//---------------------------------------------------------------
//-- Colapsed State
Rectangle
{
id
:
colapsedRect
width
:
parent
.
width
height
:
colapsed
?
colapsedRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
_colorOrange
radius
:
_radius
visible
:
colapsed
Row
{
id
:
colapsedRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/advisory-icon.svg
"
color
:
_colorWhite
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
qsTr
(
"
Airspace
"
)
color
:
_colorWhite
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
colapsed
=
false
}
}
//---------------------------------------------------------------
//-- Expanded State
Rectangle
{
id
:
expandedRect
width
:
parent
.
width
height
:
!
colapsed
?
expandedCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
_colorOrange
radius
:
_radius
visible
:
!
colapsed
Column
{
id
:
expandedCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
//-- Header
Item
{
height
:
expandedRow
.
height
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
Row
{
id
:
expandedRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/advisory-icon.svg
"
color
:
_colorWhite
anchors.verticalCenter
:
parent
.
verticalCenter
}
Column
{
spacing
:
0
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
text
:
qsTr
(
"
Airspace
"
)
color
:
_colorWhite
}
QGCLabel
{
text
:
qsTr
(
"
3 Advisories
"
)
color
:
_colorWhite
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
}
}
MouseArea
{
anchors.fill
:
parent
enabled
:
!
colapsed
onClicked
:
colapsed
=
true
}
}
//-- Contents (Brown Box)
Rectangle
{
color
:
_colorBrown
height
:
airspaceCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
radius
:
_radius
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
Column
{
id
:
airspaceCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
//-- Regulations
Rectangle
{
color
:
_colorLightBrown
height
:
regCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
radius
:
_radius
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
Column
{
id
:
regCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
text
:
qsTr
(
"
Airspace Regulations
"
)
color
:
_colorWhite
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
QGCLabel
{
text
:
qsTr
(
"
Airspace advisories based on the selected rules.
"
)
color
:
_colorWhite
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
GridLayout
{
columns
:
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
Rectangle
{
width
:
regButton
.
height
height
:
width
radius
:
2
color
:
_colorGray
anchors.verticalCenter
:
parent
.
verticalCenter
QGCColoredImage
{
width
:
height
height
:
parent
.
height
*
0.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/pencil.svg
"
color
:
_colorWhite
anchors.centerIn
:
parent
}
}
Rectangle
{
id
:
regButton
height
:
regLabel
.
height
+
ScreenTools
.
defaultFontPixelHeight
radius
:
2
color
:
_colorMidBrown
Layout.fillWidth
:
true
QGCLabel
{
id
:
regLabel
text
:
qsTr
(
"
FAA-107, Airmap
"
)
color
:
_colorWhite
anchors.centerIn
:
parent
}
}
}
}
}
AirspaceRegulation
{
regTitle
:
qsTr
(
"
Controlled Aispace (1)
"
)
regText
:
qsTr
(
"
Santa Monica Class D requires FAA Authorization, permissible below 100ft.
"
)
regColor
:
_colorOrange
textColor
:
_colorWhite
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
}
AirspaceRegulation
{
regTitle
:
qsTr
(
"
Schools (2)
"
)
regText
:
qsTr
(
"
Santa Monica School of Something.
"
)
regColor
:
_colorYellow
textColor
:
_colorWhite
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
}
}
}
//-- Footer
QGCLabel
{
text
:
qsTr
(
"
Powered by <b>AIRMAP</b>
"
)
color
:
_colorWhite
font.pointSize
:
ScreenTools
.
smallFontPointSize
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
}
src/Airmap/AirspaceRegulation.qml
0 → 100644
View file @
6929d269
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Dialogs
1.2
import
QtQml
2.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Airmap
1.0
Item
{
id
:
_root
height
:
regCol
.
height
property
var
textColor
:
"
white
"
property
var
regColor
:
"
white
"
property
var
regTitle
:
""
property
var
regText
:
""
Column
{
id
:
regCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
Rectangle
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
radius
:
height
*
0.5
color
:
regColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
regTitle
color
:
textColor
}
}
QGCLabel
{
text
:
regText
color
:
textColor
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
}
}
src/Airmap/QGroundControl.Airmap.qmldir
0 → 100644
View file @
6929d269
Module QGroundControl.Airmap
AirspaceControl 1.0 AirspaceControl.qml
AirspaceRegulation 1.0 AirspaceRegulation.qml
src/Airmap/images/advisory-icon.svg
0 → 100644
View file @
6929d269
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"72px"
height=
"72px"
viewBox=
"0 0 72 72"
style=
"enable-background:new 0 0 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:#FFFFFF;}
</style>
<title>
Page 1
</title>
<desc>
Created with Sketch.
</desc>
<g
id=
"Map-Copy-8"
transform=
"translate(-2396.000000, -714.000000)"
>
<g
id=
"Group-3"
transform=
"translate(2379.000000, 693.000000)"
>
<path
id=
"Page-1"
class=
"st0"
d=
"M88.463,84.307L57.076,25.426c-0.797-1.46-2.322-2.388-4-2.388c-1.681,0-3.203,0.928-3.978,2.388
L17.532,84.307c-0.753,1.391-0.706,3.095,0.106,4.445c0.822,1.372,2.303,2.21,3.894,2.21h62.95c1.591,0,3.05-0.841,3.869-2.21
C89.17,87.402,89.213,85.701,88.463,84.307L88.463,84.307z M52.995,82.811c-1.876,0-3.395-1.519-3.395-3.396
c0-1.874,1.519-3.396,3.395-3.396s3.398,1.523,3.398,3.396C56.39,81.289,54.871,82.811,52.995,82.811z M56.363,48.674
L54.505,72.04c-0.104,1.499-0.929,2.62-2.188,2.62c-1.258,0-2.083-1.121-2.188-2.62l-1.858-23.367
c-0.096-1.352-0.014-2.576,1.059-3.691c0.861-0.896,1.853-1.568,2.99-1.568s2.126,0.671,2.99,1.568
C56.377,46.097,56.459,47.322,56.363,48.674L56.363,48.674z"
/>
</g>
</g>
</svg>
src/Airmap/images/pencil.svg
0 → 100644
View file @
6929d269
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"72px"
height=
"72px"
viewBox=
"0 0 72 72"
style=
"enable-background:new 0 0 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:#FFFFFF;}
</style>
<path
class=
"st0"
d=
"M60.299,0.003c-3.006,0-6.011,1.132-8.285,3.41l-0.011,0.011L7.931,48.217L0,71.997l23.781-7.931l0.492-0.481
l44.311-43.59v-0.011c4.553-4.553,4.556-12.023,0-16.571C66.308,1.137,63.304,0.003,60.299,0.003z M60.299,5.828
c1.493,0,2.986,0.571,4.143,1.728c2.311,2.307,2.314,5.971,0,8.285l-4.623,4.555c-0.651-1.589-1.671-3.273-3.307-4.909
c-1.633-1.633-3.32-2.647-4.909-3.296l4.578-4.646C57.33,6.402,58.814,5.828,60.299,5.828z M47.733,17.157
c1.084,0.091,2.652,0.489,4.635,2.472c1.986,1.986,2.4,3.556,2.495,4.635c0.072,0.818-0.029,0.933-0.08,1.076L24.513,55.129
c-0.652-1.448-1.65-2.977-3.159-4.486c-1.509-1.509-3.038-2.506-4.486-3.159l29.777-30.258
C46.796,17.179,46.916,17.088,47.733,17.157z M12.84,52.348c0.909,0.072,2.359,0.425,4.372,2.438
c2.012,2.012,2.366,3.462,2.438,4.372c0.008,0.099-0.015,0.033-0.011,0.114l-5.585,1.865c-0.438-0.566-0.917-1.135-1.488-1.705
c-0.567-0.567-1.139-1.04-1.705-1.476l1.865-5.596C12.807,52.362,12.741,52.34,12.84,52.348z"
/>
</svg>
src/PlanView/PlanView.qml
View file @
6929d269
...
@@ -25,6 +25,7 @@ import QGroundControl.FactControls 1.0
...
@@ -25,6 +25,7 @@ import QGroundControl.FactControls 1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Mavlink
1.0
import
QGroundControl
.
Mavlink
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Airmap
1.0
/// Mission Editor
/// Mission Editor
...
@@ -34,8 +35,9 @@ QGCView {
...
@@ -34,8 +35,9 @@ QGCView {
z
:
QGroundControl
.
zOrderTopMost
z
:
QGroundControl
.
zOrderTopMost
readonly
property
int
_decimalPlaces
:
8
readonly
property
int
_decimalPlaces
:
8
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
readonly
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
...
@@ -480,165 +482,65 @@ QGCView {
...
@@ -480,165 +482,65 @@ QGCView {
}
}
}
}
}
}
}
// FlightMap
}
//-----------------------------------------------------------
// Right pane for mission editing controls
// Right pane for mission editing controls
Rectangle
{
Rectangle
{
id
:
rightPanel
id
:
rightPanel
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
height
:
ScreenTools
.
availableHeight
height
:
ScreenTools
.
availableHeight
width
:
_rightPanelWidth
width
:
_rightPanelWidth
color
:
qgcPal
.
window
color
:
qgcPal
.
window
opacity
:
0.2
opacity
:
0.2
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
}
}
Item
{
Item
{
anchors.fill
:
rightPanel
anchors.fill
:
rightPanel
Column
{
// Plan Element selector (Mission/Fence/Rally)
id
:
rightControls
Row
{
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
id
:
planElementSelectorRow
anchors.topMargin
:
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
/
3
)
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
spacing
:
_horizontalMargin
anchors.top
:
parent
.
top
visible
:
QGroundControl
.
corePlugin
.
options
.
enablePlanViewSelector
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
//-------------------------------------------------------
readonly
property
real
_buttonRadius
:
ScreenTools
.
defaultFontPixelHeight
*
0.75
// Airmap Airspace Control
AirspaceControl
{
ExclusiveGroup
{
width
:
parent
.
width
id
:
planElementSelectorGroup
onCurrentChanged
:
{
switch
(
current
)
{
case
planElementMission
:
_editingLayer
=
_layerMission
break
case
planElementGeoFence
:
_editingLayer
=
_layerGeoFence
break
case
planElementRallyPoints
:
_editingLayer
=
_layerRallyPoints
break
}
}
}
QGCRadioButton
{
id
:
planElementMission
exclusiveGroup
:
planElementSelectorGroup
text
:
qsTr
(
"
Mission
"
)
checked
:
true
color
:
mapPal
.
text
textStyle
:
Text
.
Outline
textStyleColor
:
mapPal
.
textOutline
}
Item
{
height
:
1
;
width
:
1
}
QGCRadioButton
{
id
:
planElementGeoFence
exclusiveGroup
:
planElementSelectorGroup
text
:
qsTr
(
"
Fence
"
)
color
:
mapPal
.
text
textStyle
:
Text
.
Outline
textStyleColor
:
mapPal
.
textOutline
}
Item
{
height
:
1
;
width
:
1
}
QGCRadioButton
{
id
:
planElementRallyPoints
exclusiveGroup
:
planElementSelectorGroup
text
:
qsTr
(
"
Rally
"
)
color
:
mapPal
.
text
textStyle
:
Text
.
Outline
textStyleColor
:
mapPal
.
textOutline
}
}
}
// Row - Plan Element Selector
//-------------------------------------------------------
// Mission Controls (Colapsed)
// Mission Item Editor
Rectangle
{
Item
{
id
:
planColapsed
id
:
missionItemEditor
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
planElementSelectorRow
.
visible
?
planElementSelectorRow
.
bottom
:
planElementSelectorRow
.
top
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
visible
:
_editingLayer
==
_layerMission
QGCListView
{
id
:
missionItemEditorListView
anchors.fill
:
parent
spacing
:
_margin
/
2
orientation
:
ListView
.
Vertical
model
:
_missionController
.
visualItems
cacheBuffer
:
Math
.
max
(
height
*
2
,
0
)
clip
:
true
currentIndex
:
_missionController
.
currentPlanViewIndex
highlightMoveDuration
:
250
delegate
:
MissionItemEditor
{
map
:
editorMap
masterController
:
_planMasterController
missionItem
:
object
width
:
parent
.
width
width
:
parent
.
width
readOnly
:
false
height
:
colapsedRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
rootQgcView
:
_qgcView
color
:
qgcPal
.
missionItemEditor
radius
:
_radius
onClicked
:
_missionController
.
setCurrentPlanViewIndex
(
object
.
sequenceNumber
,
false
)
Row
{
id
:
colapsedRow
onRemove
:
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
var
removeIndex
=
index
anchors.left
:
parent
.
left
_missionController
.
removeMissionItem
(
removeIndex
)
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
if
(
removeIndex
>=
_missionController
.
visualItems
.
count
)
{
anchors.verticalCenter
:
parent
.
verticalCenter
removeIndex
--
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/res/waypoint.svg
"
color
:
qgcPal
.
text
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
_missionController
.
setCurrentPlanViewIndex
(
removeIndex
,
true
)
QGCLabel
{
id
:
colapsedPlanLabel
text
:
qsTr
(
"
Plan
"
)
color
:
qgcPal
.
text
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
onInsertWaypoint
:
insertSimpleMissionItem
(
editorMap
.
center
,
index
)
onInsertComplexItem
:
insertComplexMissionItem
(
complexItemName
,
editorMap
.
center
,
index
)
}
}
}
// QGCListView
}
// Item - Mission Item editor
// GeoFence Editor
GeoFenceEditor
{
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
planElementSelectorRow
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
availableHeight
:
ScreenTools
.
availableHeight
myGeoFenceController
:
_geoFenceController
flightMap
:
editorMap
visible
:
_editingLayer
==
_layerGeoFence
}
}
// Rally Point Editor
RallyPointEditorHeader
{
id
:
rallyPointHeader
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
planElementSelectorRow
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
_editingLayer
==
_layerRallyPoints
controller
:
_rallyPointController
}
}
RallyPointItemEditor
{
id
:
rallyPointEditor
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
rallyPointHeader
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
_editingLayer
==
_layerRallyPoints
&&
_rallyPointController
.
points
.
count
rallyPoint
:
_rallyPointController
.
currentRallyPoint
controller
:
_rallyPointController
}
}
}
// Right panel
MapScale
{
MapScale
{
id
:
mapScale
id
:
mapScale
...
...
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