|
|
@ -39,6 +39,7 @@ QGCView { |
|
|
|
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) |
|
|
|
readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276) |
|
|
|
readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276) |
|
|
|
|
|
|
|
readonly property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly |
|
|
|
|
|
|
|
|
|
|
|
property var _planMasterController: masterController |
|
|
|
property var _planMasterController: masterController |
|
|
|
property var _missionController: _planMasterController.missionController |
|
|
|
property var _missionController: _planMasterController.missionController |
|
|
@ -47,6 +48,7 @@ QGCView { |
|
|
|
property var _visualItems: _missionController.visualItems |
|
|
|
property var _visualItems: _missionController.visualItems |
|
|
|
property bool _lightWidgetBorders: editorMap.isSatelliteMap |
|
|
|
property bool _lightWidgetBorders: editorMap.isSatelliteMap |
|
|
|
property bool _addWaypointOnClick: false |
|
|
|
property bool _addWaypointOnClick: false |
|
|
|
|
|
|
|
property bool _addROIOnClick: false |
|
|
|
property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1 |
|
|
|
property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1 |
|
|
|
property real _toolbarHeight: _qgcView.height - ScreenTools.availableHeight |
|
|
|
property real _toolbarHeight: _qgcView.height - ScreenTools.availableHeight |
|
|
|
property int _editingLayer: _layerMission |
|
|
|
property int _editingLayer: _layerMission |
|
|
@ -219,6 +221,16 @@ QGCView { |
|
|
|
_missionController.setCurrentPlanViewIndex(sequenceNumber, true) |
|
|
|
_missionController.setCurrentPlanViewIndex(sequenceNumber, true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Inserts a new ROI mission item |
|
|
|
|
|
|
|
/// @param coordinate Location to insert item |
|
|
|
|
|
|
|
/// @param index Insert item at this index |
|
|
|
|
|
|
|
function insertROIMissionItem(coordinate, index) { |
|
|
|
|
|
|
|
var sequenceNumber = _missionController.insertROIMissionItem(coordinate, index) |
|
|
|
|
|
|
|
_missionController.setCurrentPlanViewIndex(sequenceNumber, true) |
|
|
|
|
|
|
|
_addROIOnClick = false |
|
|
|
|
|
|
|
toolStrip.uncheckAll() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
property int _moveDialogMissionItemIndex |
|
|
|
property int _moveDialogMissionItemIndex |
|
|
|
|
|
|
|
|
|
|
|
QGCFileDialog { |
|
|
|
QGCFileDialog { |
|
|
@ -329,6 +341,9 @@ QGCView { |
|
|
|
case _layerMission: |
|
|
|
case _layerMission: |
|
|
|
if (_addWaypointOnClick) { |
|
|
|
if (_addWaypointOnClick) { |
|
|
|
insertSimpleMissionItem(coordinate, _missionController.visualItems.count) |
|
|
|
insertSimpleMissionItem(coordinate, _missionController.visualItems.count) |
|
|
|
|
|
|
|
} else if (_addROIOnClick) { |
|
|
|
|
|
|
|
_addROIOnClick = false |
|
|
|
|
|
|
|
insertROIMissionItem(coordinate, _missionController.visualItems.count) |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
case _layerRallyPoints: |
|
|
|
case _layerRallyPoints: |
|
|
@ -394,11 +409,11 @@ QGCView { |
|
|
|
color: qgcPal.window |
|
|
|
color: qgcPal.window |
|
|
|
title: qsTr("Plan") |
|
|
|
title: qsTr("Plan") |
|
|
|
z: QGroundControl.zOrderWidgets |
|
|
|
z: QGroundControl.zOrderWidgets |
|
|
|
showAlternateIcon: [ false, false, masterController.dirty, false, false, false ] |
|
|
|
showAlternateIcon: [ false, false, false, masterController.dirty, false, false, false ] |
|
|
|
rotateImage: [ false, false, masterController.syncInProgress, false, false, false ] |
|
|
|
rotateImage: [ false, false, false, masterController.syncInProgress, false, false, false ] |
|
|
|
animateImage: [ false, false, masterController.dirty, false, false, false ] |
|
|
|
animateImage: [ false, false, false, masterController.dirty, false, false, false ] |
|
|
|
buttonEnabled: [ true, true, !masterController.syncInProgress, true, true, true ] |
|
|
|
buttonEnabled: [ true, true, true, !masterController.syncInProgress, true, true, true ] |
|
|
|
buttonVisible: [ true, true, true, true, _showZoom, _showZoom ] |
|
|
|
buttonVisible: [ true, _waypointsOnlyMode, true, true, true, _showZoom, _showZoom ] |
|
|
|
maxHeight: mapScale.y - toolStrip.y |
|
|
|
maxHeight: mapScale.y - toolStrip.y |
|
|
|
|
|
|
|
|
|
|
|
property bool _showZoom: !ScreenTools.isMobile |
|
|
|
property bool _showZoom: !ScreenTools.isMobile |
|
|
@ -410,6 +425,11 @@ QGCView { |
|
|
|
toggle: true |
|
|
|
toggle: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
name: "ROI", |
|
|
|
|
|
|
|
iconSource: "/qmlimages/MapAddMission.svg", |
|
|
|
|
|
|
|
toggle: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
name: _singleComplexItem ? _missionController.complexMissionItemNames[0] : "Pattern", |
|
|
|
name: _singleComplexItem ? _missionController.complexMissionItemNames[0] : "Pattern", |
|
|
|
iconSource: "/qmlimages/MapDrawShape.svg", |
|
|
|
iconSource: "/qmlimages/MapDrawShape.svg", |
|
|
|
dropPanelComponent: _singleComplexItem ? undefined : patternDropPanel |
|
|
|
dropPanelComponent: _singleComplexItem ? undefined : patternDropPanel |
|
|
@ -439,16 +459,21 @@ QGCView { |
|
|
|
switch (index) { |
|
|
|
switch (index) { |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
|
_addWaypointOnClick = checked |
|
|
|
_addWaypointOnClick = checked |
|
|
|
|
|
|
|
_addROIOnClick = false |
|
|
|
break |
|
|
|
break |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|
|
|
|
|
_addROIOnClick = checked |
|
|
|
|
|
|
|
_addWaypointOnClick = false |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
case 2: |
|
|
|
if (_singleComplexItem) { |
|
|
|
if (_singleComplexItem) { |
|
|
|
addComplexItem(_missionController.complexMissionItemNames[0]) |
|
|
|
addComplexItem(_missionController.complexMissionItemNames[0]) |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
case 4: |
|
|
|
case 5: |
|
|
|
editorMap.zoomLevel += 0.5 |
|
|
|
editorMap.zoomLevel += 0.5 |
|
|
|
break |
|
|
|
break |
|
|
|
case 5: |
|
|
|
case 6: |
|
|
|
editorMap.zoomLevel -= 0.5 |
|
|
|
editorMap.zoomLevel -= 0.5 |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|