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
8a995243
Commit
8a995243
authored
Mar 22, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlyAreaItemEditor.qml edited
parent
3bc2c3a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
72 deletions
+29
-72
WimaFlyArea.cc
src/MissionManager/WimaFlyArea.cc
+6
-5
FlyAreaEditor.qml
src/WimaView/FlyAreaEditor.qml
+1
-1
FlyAreaItemEditor.qml
src/WimaView/FlyAreaItemEditor.qml
+21
-23
WimaView.qml
src/WimaView/WimaView.qml
+1
-43
No files found.
src/MissionManager/WimaFlyArea.cc
View file @
8a995243
...
...
@@ -48,9 +48,7 @@ void WimaFlyArea::setCurrentPolygon(int index)
{
if
(
index
>=
0
&&
index
<
_polygons
->
count
())
{
if
(
index
==
_currentPolygonIndex
){
return
;
}
for
(
int
i
=
0
;
i
<
_polygons
->
count
();
i
++
)
{
QGCMapPolygon
*
polygon
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
i
));
...
...
@@ -61,8 +59,11 @@ void WimaFlyArea::setCurrentPolygon(int index)
_currentPolygonItem
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
index
));
_currentPolygonItem
->
setInteractive
(
true
);
emit
currentPolygonItemChanged
(
_currentPolygonItem
);
emit
currentPolygonIndexChanged
(
index
);
if
(
index
!=
_currentPolygonIndex
){
emit
currentPolygonItemChanged
(
_currentPolygonItem
);
emit
currentPolygonIndexChanged
(
index
);
}
}
}
src/WimaView/FlyAreaEditor.qml
View file @
8a995243
...
...
@@ -28,7 +28,7 @@ Rectangle {
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10.5
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
real
_cameraMinTriggerInterval
:
missionItem
.
cameraCalc
.
minTriggerInterval
.
rawValue
...
...
src/WimaView/FlyAreaItemEditor.qml
View file @
8a995243
...
...
@@ -12,7 +12,7 @@ import QGroundControl.FactControls 1.0
import
QGroundControl
.
Palette
1.0
///
Fly Area
edit control
///
Mission item
edit control
Rectangle
{
id
:
_root
height
:
editorLoader
.
visible
?
(
editorLoader
.
y
+
editorLoader
.
height
+
(
_margin
*
2
))
:
(
commandPicker
.
y
+
commandPicker
.
height
+
_margin
/
2
)
...
...
@@ -20,11 +20,11 @@ Rectangle {
radius
:
_radius
property
var
map
///< Map control
property
var
flyArea
property
var
masterController
property
var
missionItem
///< MissionItem associated with this editor
property
var
polygon
///< MissionItem associated with this editor
property
bool
readOnly
///< true: read only view, false: full editing view
property
var
rootQgcView
property
var
flyArea
signal
clicked
signal
remove
...
...
@@ -39,7 +39,7 @@ Rectangle {
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
:
commandPicker
.
height
readonly
property
real
_hamburgerSize
:
commandPicker
.
height
*
0.75
readonly
property
bool
_waypointsOnlyMode
:
QGroundControl
.
corePlugin
.
options
.
missionWaypointsOnly
QGCPalette
{
...
...
@@ -61,13 +61,12 @@ Rectangle {
}
QGCLabel
{
id
:
label
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.leftMargin
:
_margin
anchors.left
:
parent
.
left
text
:
index
+
1
text
:
index
color
:
_outerTextColor
}
...
...
@@ -80,7 +79,7 @@ Rectangle {
height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
source
:
"
qrc:/qmlimages/Hamburger.svg
"
visible
:
flyArea
.
currentPolygonIndex
===
index
visible
:
_currentItem
color
:
qgcPal
.
text
}
...
...
@@ -99,10 +98,17 @@ Rectangle {
text
:
qsTr
(
"
Insert Fly Area
"
)
onTriggered
:
flyArea
.
appendFlyAreaPolygon
()
}
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
remove
()
}
}
}
...
...
@@ -113,26 +119,18 @@ Rectangle {
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
label
.
right
anchors.top
:
parent
.
top
visible
:
!
commandPicker
.
visible
text
:
missionItem
.
commandName
Component
{
id
:
commandDialog
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
}
}
visible
:
!
commandLabel
.
visible
text
:
"
Fly Area
"
//onClicked: qgcView.showDialog(commandDialog, qsTr("Select Mission Command"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
}
QGCLabel
{
id
:
commandLabel
anchors.fill
:
parent
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Fly Area
"
color
:
_outerTextColor
id
:
commandLabel
anchors.fill
:
commandPicker
visible
:
_currentItem
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Fly Area
"
color
:
_outerTextColor
}
Loader
{
...
...
src/WimaView/WimaView.qml
View file @
8a995243
...
...
@@ -808,7 +808,7 @@ QGCView {
map
:
editorMap
masterController
:
_planMasterController
flyArea
:
_flyArea
missionItem
:
object
polygon
:
object
width
:
parent
.
width
readOnly
:
false
rootQgcView
:
_qgcView
...
...
@@ -986,48 +986,6 @@ QGCView {
}
}
Component
{
id
:
patternDropPanel
ColumnLayout
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
QGCLabel
{
text
:
qsTr
(
"
Create complex pattern:
"
)
}
Repeater
{
model
:
_missionController
.
complexMissionItemNames
QGCButton
{
text
:
modelData
Layout.fillWidth
:
true
onClicked
:
{
addComplexItem
(
modelData
)
dropPanel
.
hide
()
}
}
}
Rectangle
{
width
:
parent
.
width
*
0.8
height
:
1
color
:
qgcPal
.
text
opacity
:
0.5
Layout.fillWidth
:
true
Layout.columnSpan
:
2
}
QGCButton
{
text
:
qsTr
(
"
Load KML/SHP...
"
)
Layout.fillWidth
:
true
enabled
:
!
masterController
.
syncInProgress
onClicked
:
{
masterController
.
loadShapeFromSelectedFile
()
dropPanel
.
hide
()
}
}
}
// Column
}
Component
{
id
:
syncDropPanel
...
...
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