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
Show 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)
...
@@ -48,9 +48,7 @@ void WimaFlyArea::setCurrentPolygon(int index)
{
{
if
(
index
>=
0
&&
index
<
_polygons
->
count
())
{
if
(
index
>=
0
&&
index
<
_polygons
->
count
())
{
if
(
index
==
_currentPolygonIndex
){
return
;
}
for
(
int
i
=
0
;
i
<
_polygons
->
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<
_polygons
->
count
();
i
++
)
{
QGCMapPolygon
*
polygon
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
i
));
QGCMapPolygon
*
polygon
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
i
));
...
@@ -61,8 +59,11 @@ void WimaFlyArea::setCurrentPolygon(int index)
...
@@ -61,8 +59,11 @@ void WimaFlyArea::setCurrentPolygon(int index)
_currentPolygonItem
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
index
));
_currentPolygonItem
=
qobject_cast
<
QGCMapPolygon
*>
(
_polygons
->
get
(
index
));
_currentPolygonItem
->
setInteractive
(
true
);
_currentPolygonItem
->
setInteractive
(
true
);
if
(
index
!=
_currentPolygonIndex
){
emit
currentPolygonItemChanged
(
_currentPolygonItem
);
emit
currentPolygonItemChanged
(
_currentPolygonItem
);
emit
currentPolygonIndexChanged
(
index
);
emit
currentPolygonIndexChanged
(
index
);
}
}
}
}
}
src/WimaView/FlyAreaEditor.qml
View file @
8a995243
...
@@ -28,7 +28,7 @@ Rectangle {
...
@@ -28,7 +28,7 @@ Rectangle {
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10.5
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10.5
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
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
...
@@ -12,7 +12,7 @@ import QGroundControl.FactControls 1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
///
Fly Area
edit control
///
Mission item
edit control
Rectangle
{
Rectangle
{
id
:
_root
id
:
_root
height
:
editorLoader
.
visible
?
(
editorLoader
.
y
+
editorLoader
.
height
+
(
_margin
*
2
))
:
(
commandPicker
.
y
+
commandPicker
.
height
+
_margin
/
2
)
height
:
editorLoader
.
visible
?
(
editorLoader
.
y
+
editorLoader
.
height
+
(
_margin
*
2
))
:
(
commandPicker
.
y
+
commandPicker
.
height
+
_margin
/
2
)
...
@@ -20,11 +20,11 @@ Rectangle {
...
@@ -20,11 +20,11 @@ Rectangle {
radius
:
_radius
radius
:
_radius
property
var
map
///< Map control
property
var
map
///< Map control
property
var
flyArea
property
var
masterController
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
bool
readOnly
///< true: read only view, false: full editing view
property
var
rootQgcView
property
var
rootQgcView
property
var
flyArea
signal
clicked
signal
clicked
signal
remove
signal
remove
...
@@ -39,7 +39,7 @@ Rectangle {
...
@@ -39,7 +39,7 @@ Rectangle {
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
12
)
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
12
)
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_radius
:
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
readonly
property
bool
_waypointsOnlyMode
:
QGroundControl
.
corePlugin
.
options
.
missionWaypointsOnly
QGCPalette
{
QGCPalette
{
...
@@ -61,13 +61,12 @@ Rectangle {
...
@@ -61,13 +61,12 @@ Rectangle {
}
}
QGCLabel
{
QGCLabel
{
id
:
label
id
:
label
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.leftMargin
:
_margin
anchors.leftMargin
:
_margin
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
text
:
index
+
1
text
:
index
color
:
_outerTextColor
color
:
_outerTextColor
}
}
...
@@ -80,7 +79,7 @@ Rectangle {
...
@@ -80,7 +79,7 @@ Rectangle {
height
:
_hamburgerSize
height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
source
:
"
qrc:/qmlimages/Hamburger.svg
"
source
:
"
qrc:/qmlimages/Hamburger.svg
"
visible
:
flyArea
.
currentPolygonIndex
===
index
visible
:
_currentItem
color
:
qgcPal
.
text
color
:
qgcPal
.
text
}
}
...
@@ -99,10 +98,17 @@ Rectangle {
...
@@ -99,10 +98,17 @@ Rectangle {
text
:
qsTr
(
"
Insert Fly Area
"
)
text
:
qsTr
(
"
Insert Fly Area
"
)
onTriggered
:
flyArea
.
appendFlyAreaPolygon
()
onTriggered
:
flyArea
.
appendFlyAreaPolygon
()
}
}
MenuItem
{
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
remove
()
onTriggered
:
remove
()
}
}
}
}
}
}
...
@@ -113,23 +119,15 @@ Rectangle {
...
@@ -113,23 +119,15 @@ Rectangle {
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
label
.
right
anchors.left
:
label
.
right
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
visible
:
!
commandPicker
.
visible
visible
:
!
commandLabel
.
visible
text
:
missionItem
.
commandName
text
:
"
Fly Area
"
Component
{
id
:
commandDialog
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
}
}
//onClicked: qgcView.showDialog(commandDialog, qsTr("Select Mission Command"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
}
}
QGCLabel
{
QGCLabel
{
id
:
commandLabel
id
:
commandLabel
anchors.fill
:
parent
anchors.fill
:
commandPicker
visible
:
_currentItem
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Fly Area
"
text
:
"
Fly Area
"
color
:
_outerTextColor
color
:
_outerTextColor
...
...
src/WimaView/WimaView.qml
View file @
8a995243
...
@@ -808,7 +808,7 @@ QGCView {
...
@@ -808,7 +808,7 @@ QGCView {
map
:
editorMap
map
:
editorMap
masterController
:
_planMasterController
masterController
:
_planMasterController
flyArea
:
_flyArea
flyArea
:
_flyArea
missionItem
:
object
polygon
:
object
width
:
parent
.
width
width
:
parent
.
width
readOnly
:
false
readOnly
:
false
rootQgcView
:
_qgcView
rootQgcView
:
_qgcView
...
@@ -986,48 +986,6 @@ 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
{
Component
{
id
:
syncDropPanel
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