|
|
@ -49,6 +49,7 @@ QGCView { |
|
|
|
property var activeVehiclePosition: _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate() |
|
|
|
property var activeVehiclePosition: _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate() |
|
|
|
property bool _lightWidgetBorders: editorMap.isSatelliteMap |
|
|
|
property bool _lightWidgetBorders: editorMap.isSatelliteMap |
|
|
|
property bool _addWaypointOnClick: false |
|
|
|
property bool _addWaypointOnClick: false |
|
|
|
|
|
|
|
property bool _singleComplexItem: missionController.complexMissionItemNames.length == 1 |
|
|
|
|
|
|
|
|
|
|
|
/// The controller which should be called for load/save, send to/from vehicle calls |
|
|
|
/// The controller which should be called for load/save, send to/from vehicle calls |
|
|
|
property var _syncDropDownController: missionController |
|
|
|
property var _syncDropDownController: missionController |
|
|
@ -77,6 +78,14 @@ QGCView { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addComplexItem(complexItemName) { |
|
|
|
|
|
|
|
var coordinate = editorMap.center |
|
|
|
|
|
|
|
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
var sequenceNumber = missionController.insertComplexMissionItem(complexItemName, coordinate, missionController.visualItems.count) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
property bool _firstMissionLoadComplete: false |
|
|
|
property bool _firstMissionLoadComplete: false |
|
|
|
property bool _firstFenceLoadComplete: false |
|
|
|
property bool _firstFenceLoadComplete: false |
|
|
|
property bool _firstRallyLoadComplete: false |
|
|
|
property bool _firstRallyLoadComplete: false |
|
|
@ -696,7 +705,7 @@ QGCView { |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "Pattern", |
|
|
|
name: "Pattern", |
|
|
|
iconSource: "/qmlimages/MapDrawShape.svg", |
|
|
|
iconSource: "/qmlimages/MapDrawShape.svg", |
|
|
|
dropPanelComponent: patternDropPanel |
|
|
|
dropPanelComponent: _singleComplexItem ? undefined : patternDropPanel |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "Sync", |
|
|
|
name: "Sync", |
|
|
@ -729,6 +738,11 @@ QGCView { |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
|
_addWaypointOnClick = checked |
|
|
|
_addWaypointOnClick = checked |
|
|
|
break |
|
|
|
break |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
if (_singleComplexItem) { |
|
|
|
|
|
|
|
addComplexItem(missionController.complexMissionItemNames[0]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break |
|
|
|
case 5: |
|
|
|
case 5: |
|
|
|
editorMap.zoomLevel += 0.5 |
|
|
|
editorMap.zoomLevel += 0.5 |
|
|
|
break |
|
|
|
break |
|
|
@ -947,12 +961,7 @@ QGCView { |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
var coordinate = editorMap.center |
|
|
|
addComplexItem(modelData) |
|
|
|
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces) |
|
|
|
|
|
|
|
var sequenceNumber = missionController.insertComplexMissionItem(modelData, coordinate, missionController.visualItems.count) |
|
|
|
|
|
|
|
setCurrentItem(sequenceNumber) |
|
|
|
|
|
|
|
dropPanel.hide() |
|
|
|
dropPanel.hide() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|