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
bbde40eb
Commit
bbde40eb
authored
Jan 20, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand/Colapse Controllers
Adjust colors Remove unused image
parent
6929d269
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
304 additions
and
104 deletions
+304
-104
qgcresources.qrc
qgcresources.qrc
+2
-0
AirspaceControl.qml
src/Airmap/AirspaceControl.qml
+11
-6
HomeBlack.svg
src/FlightMap/Images/HomeBlack.svg
+0
-9
GeoFenceEditor.qml
src/PlanView/GeoFenceEditor.qml
+1
-1
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+64
-73
PlanView.qml
src/PlanView/PlanView.qml
+188
-4
RallyPointEditorHeader.qml
src/PlanView/RallyPointEditorHeader.qml
+0
-1
RallyPointItemEditor.qml
src/PlanView/RallyPointItemEditor.qml
+4
-8
QGCPalette.cc
src/QGCPalette.cc
+2
-2
QmlTest.qml
src/QmlControls/QmlTest.qml
+32
-0
No files found.
qgcresources.qrc
View file @
bbde40eb
...
...
@@ -123,6 +123,7 @@
<file alias="ZoomPlus.svg">src/FlightMap/Images/ZoomPlus.svg</file>
<file alias="ZoomMinus.svg">src/FlightMap/Images/ZoomMinus.svg</file>
<file alias="Help.svg">src/FlightMap/Images/Help.svg</file>
<file alias="Home.svg">src/FlightMap/Images/Home.svg</file>
<file alias="HelpBlack.svg">src/FlightMap/Images/HelpBlack.svg</file>
<file alias="MapAddMission.svg">src/FlightMap/Images/MapAddMission.svg</file>
<file alias="MapAddMissionBlack.svg">src/FlightMap/Images/MapAddMissionBlack.svg</file>
...
...
@@ -175,6 +176,7 @@
</qresource>
<qresource prefix="/airmap">
<file alias="advisory-icon.svg">src/Airmap/images/advisory-icon.svg</file>
<file alias="expand.svg">src/Airmap/images/expand.svg</file>
<file alias="pencil.svg">src/Airmap/images/pencil.svg</file>
</qresource>
<qresource prefix="/res">
...
...
src/Airmap/AirspaceControl.qml
View file @
bbde40eb
...
...
@@ -63,6 +63,16 @@ Item {
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/expand.svg
"
color
:
_colorWhite
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
colapsed
=
false
...
...
@@ -115,11 +125,6 @@ Item {
}
}
}
MouseArea
{
anchors.fill
:
parent
enabled
:
!
colapsed
onClicked
:
colapsed
=
true
}
}
//-- Contents (Brown Box)
Rectangle
{
...
...
@@ -189,7 +194,7 @@ Item {
}
Rectangle
{
id
:
regButton
height
:
regLabel
.
height
+
ScreenTools
.
defaultFontPixelHeight
height
:
regLabel
.
height
+
ScreenTools
.
defaultFontPixelHeight
*
0.5
radius
:
2
color
:
_colorMidBrown
Layout.fillWidth
:
true
...
...
src/FlightMap/Images/HomeBlack.svg
deleted
100644 → 0
View file @
6929d269
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, 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"
viewBox=
"0 0 72 72"
enable-background=
"new 0 0 72 72"
xml:space=
"preserve"
>
<g>
<polygon
points=
"70.2,41.7 36,1.797 1.8,41.7 10.35,41.7 10.35,70.203 27.45,70.203 27.45,47.401 44.55,47.401 44.55,70.203
61.65,70.203 61.65,41.7 "
/>
</g>
</svg>
src/PlanView/GeoFenceEditor.qml
View file @
bbde40eb
...
...
@@ -42,7 +42,7 @@ QGCFlickable {
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
text
:
qsTr
(
"
GeoFence
"
)
color
:
"
black
"
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
}
Rectangle
{
...
...
src/PlanView/MissionItemEditor.qml
View file @
bbde40eb
...
...
@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
/// Mission item edit control
Rectangle
{
id
:
_root
height
:
editorLoader
.
y
+
(
editorLoader
.
visible
?
editorLoader
.
height
:
0
)
+
(
_margin
*
2
)
height
:
header
.
height
+
(
editorLoader
.
visible
?
(
editorLoader
.
height
+
(
_margin
*
3
))
:
0
)
color
:
_currentItem
?
qgcPal
.
missionItemEditor
:
qgcPal
.
windowShade
radius
:
_radius
...
...
@@ -33,15 +33,14 @@ Rectangle {
property
var
_masterController
:
masterController
property
var
_missionController
:
_masterController
.
missionController
property
bool
_currentItem
:
missionItem
.
isCurrentItem
property
color
_outerTextColor
:
_currentItem
?
qgcPal
.
primaryButtonText
:
qgcPal
.
text
property
bool
_noMissionItemsAdded
:
ListView
.
view
.
model
.
count
===
1
property
real
_sectionSpacer
:
ScreenTools
.
defaultFontPixelWidth
/
2
// spacing between section headings
property
bool
_singleComplexItem
:
_missionController
.
complexMissionItemNames
.
length
===
1
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
12
)
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_hamburgerSize
:
commandPick
er
.
height
*
0.75
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
real
_hamburgerSize
:
head
er
.
height
*
0.75
readonly
property
bool
_waypointsOnlyMode
:
QGroundControl
.
corePlugin
.
options
.
missionWaypointsOnly
QGCPalette
{
...
...
@@ -52,7 +51,6 @@ Rectangle {
FocusScope
{
id
:
currentItemScope
anchors.fill
:
parent
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
...
...
@@ -62,38 +60,76 @@ Rectangle {
}
}
//-- Dialog
Component
{
id
:
editPositionDialog
EditPositionDialog
{
coordinate
:
missionItem
.
coordinate
onCoordinateChanged
:
missionItem
.
coordinate
=
coordinate
}
}
QGCLabel
{
id
:
label
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.leftMargin
:
_margin
//-- Header
Row
{
id
:
header
spacing
:
ScreenTools
.
defaultFontPixelWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
3
anchors.verticalCenter
:
editorLoader
.
visible
?
undefined
:
parent
.
verticalCenter
anchors.left
:
parent
.
left
text
:
missionItem
.
homePosition
?
"
H
"
:
missionItem
.
sequenceNumber
color
:
_outerTextColor
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
Item
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
3
height
:
parent
.
height
QGCColoredImage
{
width
:
ScreenTools
.
defaultFontPixelHeight
height
:
width
sourceSize.height
:
width
source
:
"
qrc:/qmlimages/Home.svg
"
visible
:
missionItem
.
homePosition
color
:
qgcPal
.
text
anchors.centerIn
:
parent
}
QGCLabel
{
text
:
missionItem
.
sequenceNumber
color
:
qgcPal
.
text
visible
:
!
missionItem
.
homePosition
anchors.centerIn
:
parent
}
}
QGCLabel
{
id
:
label
visible
:
!
missionItem
.
isCurrentItem
||
!
missionItem
.
isSimpleItem
||
_waypointsOnlyMode
text
:
missionItem
.
commandName
color
:
qgcPal
.
text
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCButton
{
id
:
commandPicker
visible
:
!
label
.
visible
text
:
missionItem
.
commandName
anchors.verticalCenter
:
parent
.
verticalCenter
Component
{
id
:
commandDialog
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
}
}
onClicked
:
qgcView
.
showDialog
(
commandDialog
,
qsTr
(
"
Select Mission Command
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
}
//-- Hamburger button at the right of header
QGCColoredImage
{
id
:
hamburger
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
parent
.
right
anchors.verticalCenter
:
commandPick
er
.
verticalCenter
anchors.verticalCenter
:
head
er
.
verticalCenter
width
:
_hamburgerSize
height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
source
:
"
qrc:/qmlimages/Hamburger.svg
"
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!=
0
color
:
qgcPal
.
windowShade
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!==
0
color
:
qgcPal
.
text
}
//-- Hamburger Menu
QGCMouseArea
{
fillItem
:
hamburger
visible
:
hamburger
.
visible
...
...
@@ -101,67 +137,54 @@ Rectangle {
currentItemScope
.
focus
=
true
hamburgerMenu
.
popup
()
}
Menu
{
id
:
hamburgerMenu
MenuItem
{
text
:
qsTr
(
"
Insert waypoint
"
)
onTriggered
:
insertWaypoint
()
}
Menu
{
id
:
patternMenu
title
:
qsTr
(
"
Insert pattern
"
)
visible
:
!
_singleComplexItem
Instantiator
{
model
:
_missionController
.
complexMissionItemNames
onObjectAdded
:
patternMenu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
patternMenu
.
removeItem
(
object
)
MenuItem
{
text
:
modelData
onTriggered
:
insertComplexItem
(
modelData
)
}
}
}
MenuItem
{
text
:
qsTr
(
"
Insert
"
)
+
_missionController
.
complexMissionItemNames
[
0
]
visible
:
_singleComplexItem
onTriggered
:
insertComplexItem
(
_missionController
.
complexMissionItemNames
[
0
])
}
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
remove
()
}
MenuItem
{
text
:
qsTr
(
"
Change command...
"
)
onTriggered
:
commandPicker
.
clicked
()
visible
:
!
_waypointsOnlyMode
}
MenuItem
{
text
:
qsTr
(
"
Edit position...
"
)
visible
:
missionItem
.
specifiesCoordinate
onTriggered
:
qgcView
.
showDialog
(
editPositionDialog
,
qsTr
(
"
Edit Position
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
MenuSeparator
{
visible
:
missionItem
.
isSimpleItem
&&
!
_waypointsOnlyMode
}
MenuItem
{
text
:
qsTr
(
"
Show all values
"
)
checkable
:
true
checked
:
missionItem
.
isSimpleItem
?
missionItem
.
rawEdit
:
false
visible
:
missionItem
.
isSimpleItem
&&
!
_waypointsOnlyMode
onTriggered
:
{
text
:
qsTr
(
"
Show all values
"
)
checkable
:
true
checked
:
missionItem
.
isSimpleItem
?
missionItem
.
rawEdit
:
false
visible
:
missionItem
.
isSimpleItem
&&
!
_waypointsOnlyMode
onTriggered
:
{
if
(
missionItem
.
rawEdit
)
{
if
(
missionItem
.
friendlyEditAllowed
)
{
missionItem
.
rawEdit
=
false
...
...
@@ -176,48 +199,16 @@ Rectangle {
}
}
}
QGCButton
{
id
:
commandPicker
anchors.topMargin
:
_margin
/
2
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
label
.
right
anchors.top
:
parent
.
top
visible
:
!
commandLabel
.
visible
text
:
missionItem
.
commandName
Component
{
id
:
commandDialog
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
}
}
onClicked
:
qgcView
.
showDialog
(
commandDialog
,
qsTr
(
"
Select Mission Command
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
QGCLabel
{
id
:
commandLabel
anchors.fill
:
commandPicker
visible
:
!
missionItem
.
isCurrentItem
||
!
missionItem
.
isSimpleItem
||
_waypointsOnlyMode
verticalAlignment
:
Text
.
AlignVCenter
text
:
missionItem
.
commandName
color
:
_outerTextColor
}
//-- Editor Content
Loader
{
id
:
editorLoader
anchors.leftMargin
:
_margin
anchors.topMargin
:
_margin
anchors.left
:
parent
.
left
anchors.top
:
commandPick
er
.
bottom
anchors.top
:
head
er
.
bottom
source
:
missionItem
.
editorQml
visible
:
_currentItem
property
var
masterController
:
_masterController
property
real
availableWidth
:
_root
.
width
-
(
_margin
*
2
)
///< How wide the editor should be
property
var
editorRoot
:
_root
}
}
// Rectangle
}
src/PlanView/PlanView.qml
View file @
bbde40eb
...
...
@@ -34,6 +34,8 @@ QGCView {
viewPanel
:
panel
z
:
QGroundControl
.
zOrderTopMost
property
bool
planControlColapsed
:
false
readonly
property
int
_decimalPlaces
:
8
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
...
...
@@ -495,11 +497,13 @@ QGCView {
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
}
//-------------------------------------------------------
// Right Panel Controls
Item
{
anchors.fill
:
rightPanel
Column
{
id
:
rightControls
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.
2
5
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
...
...
@@ -507,16 +511,23 @@ QGCView {
//-------------------------------------------------------
// Airmap Airspace Control
AirspaceControl
{
id
:
airspaceControl
width
:
parent
.
width
onColapsedChanged
:
{
if
(
!
airspaceControl
.
colasped
)
{
planControlColapsed
=
true
}
}
}
//-------------------------------------------------------
// Mission Controls (Colapsed)
Rectangle
{
id
:
planColapsed
width
:
parent
.
width
height
:
colapsedRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
height
:
planControlColapsed
?
colapsedRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
qgcPal
.
missionItemEditor
radius
:
_radius
visible
:
planControlColapsed
Row
{
id
:
colapsedRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
...
...
@@ -532,13 +543,186 @@ QGCView {
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
id
:
colapsedPlanLabel
text
:
qsTr
(
"
Plan
"
)
color
:
qgcPal
.
text
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/expand.svg
"
color
:
_colorWhite
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
airspaceControl
.
colapsed
=
true
planControlColapsed
=
false
}
}
}
//-------------------------------------------------------
// Mission Controls (Expanded)
Rectangle
{
id
:
planExpanded
width
:
parent
.
width
height
:
!
planControlColapsed
?
expandedCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
qgcPal
.
missionItemEditor
radius
:
_radius
visible
:
!
planControlColapsed
Item
{
height
:
expandedCol
.
height
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
Column
{
id
:
expandedCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
//-- Header
Row
{
id
:
expandedRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_buttonRadius
:
ScreenTools
.
defaultFontPixelHeight
*
0.75
QGCColoredImage
{
width
:
height
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/res/waypoint.svg
"
color
:
qgcPal
.
text
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
qsTr
(
"
Plan
"
)
color
:
qgcPal
.
text
visible
:
!
QGroundControl
.
corePlugin
.
options
.
enablePlanViewSelector
anchors.verticalCenter
:
parent
.
verticalCenter
}
ExclusiveGroup
{
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
visible
:
QGroundControl
.
corePlugin
.
options
.
enablePlanViewSelector
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCRadioButton
{
id
:
planElementGeoFence
exclusiveGroup
:
planElementSelectorGroup
text
:
qsTr
(
"
Fence
"
)
visible
:
QGroundControl
.
corePlugin
.
options
.
enablePlanViewSelector
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCRadioButton
{
id
:
planElementRallyPoints
exclusiveGroup
:
planElementSelectorGroup
text
:
qsTr
(
"
Rally
"
)
visible
:
QGroundControl
.
corePlugin
.
options
.
enablePlanViewSelector
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
}
}
//-------------------------------------------------------
// Mission Item Editor
Item
{
id
:
missionItemEditor
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
rightControls
.
bottom
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
visible
:
_editingLayer
==
_layerMission
&&
!
planControlColapsed
QGCListView
{
id
:
missionItemEditorListView
anchors.fill
:
parent
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
orientation
:
ListView
.
Vertical
model
:
_missionController
.
visualItems
cacheBuffer
:
Math
.
max
(
height
*
2
,
0
)
clip
:
true
currentIndex
:
_missionController
.
currentPlanViewIndex
highlightMoveDuration
:
250
visible
:
_editingLayer
==
_layerMission
&&
!
planControlColapsed
//-- List Elements
delegate
:
MissionItemEditor
{
map
:
editorMap
masterController
:
_planMasterController
missionItem
:
object
width
:
parent
.
width
readOnly
:
false
rootQgcView
:
_qgcView
onClicked
:
_missionController
.
setCurrentPlanViewIndex
(
object
.
sequenceNumber
,
false
)
onRemove
:
{
var
removeIndex
=
index
_missionController
.
removeMissionItem
(
removeIndex
)
if
(
removeIndex
>=
_missionController
.
visualItems
.
count
)
{
removeIndex
--
}
_missionController
.
setCurrentPlanViewIndex
(
removeIndex
,
true
)
}
onInsertWaypoint
:
insertSimpleMissionItem
(
editorMap
.
center
,
index
)
onInsertComplexItem
:
insertComplexMissionItem
(
complexItemName
,
editorMap
.
center
,
index
)
}
}
}
// GeoFence Editor
GeoFenceEditor
{
anchors.top
:
rightControls
.
bottom
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
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.top
:
rightControls
.
bottom
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
_editingLayer
==
_layerRallyPoints
controller
:
_rallyPointController
}
RallyPointItemEditor
{
id
:
rallyPointEditor
anchors.top
:
rallyPointHeader
.
bottom
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
visible
:
_editingLayer
==
_layerRallyPoints
&&
_rallyPointController
.
points
.
count
rallyPoint
:
_rallyPointController
.
currentRallyPoint
controller
:
_rallyPointController
}
}
...
...
@@ -561,7 +745,7 @@ QGCView {
missionItems
:
_missionController
.
visualItems
visible
:
_editingLayer
===
_layerMission
&&
(
ScreenTools
.
isMobile
?
height
<
Screen
.
height
*
0.25
:
true
)
}
}
// QGCViewPanel
}
Component
{
id
:
syncLoadFromVehicleOverwrite
...
...
src/PlanView/RallyPointEditorHeader.qml
View file @
bbde40eb
...
...
@@ -28,7 +28,6 @@ QGCFlickable {
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
text
:
qsTr
(
"
Rally Points
"
)
color
:
"
black
"
}
Rectangle
{
...
...
src/PlanView/RallyPointItemEditor.qml
View file @
bbde40eb
...
...
@@ -17,8 +17,7 @@ Rectangle {
property
var
rallyPoint
///< RallyPoint object associated with editor
property
var
controller
///< RallyPointController
property
bool
_currentItem
:
rallyPoint
?
rallyPoint
==
controller
.
currentRallyPoint
:
false
property
color
_outerTextColor
:
_currentItem
?
"
black
"
:
qgcPal
.
text
property
bool
_currentItem
:
rallyPoint
?
rallyPoint
===
controller
.
currentRallyPoint
:
false
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
@@ -47,10 +46,9 @@ Rectangle {
anchors.left
:
indicator
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Rally Point
"
)
color
:
_outerTextColor
}
Image
{
QGCColored
Image
{
id
:
hamburger
anchors.rightMargin
:
_margin
anchors.right
:
parent
.
right
...
...
@@ -59,14 +57,12 @@ Rectangle {
height
:
width
sourceSize.height
:
height
source
:
"
qrc:/qmlimages/Hamburger.svg
"
color
:
qgcPal
.
text
MouseArea
{
anchors.fill
:
parent
onClicked
:
hamburgerMenu
.
popup
()
Menu
{
id
:
hamburgerMenu
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
controller
.
removePoint
(
rallyPoint
)
...
...
@@ -74,7 +70,7 @@ Rectangle {
}
}
}
}
// Item - titleBar
}
Rectangle
{
id
:
valuesRect
...
...
src/QGCPalette.cc
View file @
bbde40eb
...
...
@@ -73,13 +73,13 @@ void QGCPalette::_buildMap(void)
DECLARE_QGC_COLOR
(
alertBackground
,
"#eecc44"
,
"#eecc44"
,
"#eecc44"
,
"#eecc44"
)
DECLARE_QGC_COLOR
(
alertBorder
,
"#808080"
,
"#808080"
,
"#808080"
,
"#808080"
)
DECLARE_QGC_COLOR
(
alertText
,
"#000000"
,
"#000000"
,
"#000000"
,
"#000000"
)
DECLARE_QGC_COLOR
(
missionItemEditor
,
"#585858"
,
"#
8cb3be"
,
"#585858"
,
"#8cb3be
"
)
DECLARE_QGC_COLOR
(
missionItemEditor
,
"#585858"
,
"#
a39fd3"
,
"#585858"
,
"#4e4480
"
)
// Colors are not affecting by theming
DECLARE_QGC_COLOR
(
mapWidgetBorderLight
,
"#ffffff"
,
"#ffffff"
,
"#ffffff"
,
"#ffffff"
)
DECLARE_QGC_COLOR
(
mapWidgetBorderDark
,
"#000000"
,
"#000000"
,
"#000000"
,
"#000000"
)
DECLARE_QGC_COLOR
(
brandingPurple
,
"#4A2C6D"
,
"#4A2C6D"
,
"#4A2C6D"
,
"#4A2C6D"
)
DECLARE_QGC_COLOR
(
brandingBlue
,
"#48D6FF"
,
"#
48D6FF"
,
"#48D6FF"
,
"#48D6FF
"
)
DECLARE_QGC_COLOR
(
brandingBlue
,
"#48D6FF"
,
"#
6045c5"
,
"#48D6FF"
,
"#6045c5
"
)
}
void
QGCPalette
::
setColorGroupEnabled
(
bool
enabled
)
...
...
src/QmlControls/QmlTest.qml
View file @
bbde40eb
...
...
@@ -841,6 +841,38 @@ Rectangle {
text
:
palette
.
alertText
}
// missionItemEditor
Loader
{
sourceComponent
:
rowHeader
property
var
text
:
"
missionItemEditor
"
}
ClickableColor
{
property
var
palette
:
QGCPalette
{
colorGroupEnabled
:
false
}
color
:
palette
.
missionItemEditor
onColorSelected
:
palette
.
missionItemEditor
=
color
}
ClickableColor
{
property
var
palette
:
QGCPalette
{
colorGroupEnabled
:
true
}
color
:
palette
.
missionItemEditor
onColorSelected
:
palette
.
missionItemEditor
=
color
}
Text
{
width
:
80
height
:
20
color
:
"
black
"
horizontalAlignment
:
Text
.
AlignHCenter
property
var
palette
:
QGCPalette
{
colorGroupEnabled
:
false
}
text
:
palette
.
missionItemEditor
}
Text
{
width
:
80
height
:
20
color
:
"
black
"
horizontalAlignment
:
Text
.
AlignHCenter
property
var
palette
:
QGCPalette
{
colorGroupEnabled
:
true
}
text
:
palette
.
missionItemEditor
}
}
Column
{
...
...
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