|
|
|
@ -524,25 +524,31 @@ QGCView {
@@ -524,25 +524,31 @@ QGCView {
|
|
|
|
|
color: qgcPal.window |
|
|
|
|
title: qsTr("Plan") |
|
|
|
|
z: QGroundControl.zOrderWidgets |
|
|
|
|
showAlternateIcon: [ false, false, false, masterController.dirty, false, false, false ] |
|
|
|
|
rotateImage: [ false, false, false, masterController.syncInProgress, false, false, false ] |
|
|
|
|
animateImage: [ false, false, false, masterController.dirty, false, false, false ] |
|
|
|
|
buttonEnabled: [ true, true, true, !masterController.syncInProgress, true, true, true ] |
|
|
|
|
buttonVisible: [ true, _waypointsOnlyMode, true, true, true, _showZoom, _showZoom ] |
|
|
|
|
showAlternateIcon: [ masterController.dirty, false, false, false, false, false, false ] |
|
|
|
|
rotateImage: [ masterController.syncInProgress, false, false, false, false, false, false ] |
|
|
|
|
animateImage: [ masterController.dirty, false, false, false, false, false, false ] |
|
|
|
|
buttonEnabled: [ !masterController.syncInProgress, true, true, true, true, true, true ] |
|
|
|
|
buttonVisible: [ true, true, _waypointsOnlyMode, true, true, _showZoom, _showZoom ] |
|
|
|
|
maxHeight: mapScale.y - toolStrip.y |
|
|
|
|
|
|
|
|
|
property bool _showZoom: !ScreenTools.isMobile |
|
|
|
|
|
|
|
|
|
model: [ |
|
|
|
|
{ |
|
|
|
|
name: "Waypoint", |
|
|
|
|
iconSource: "/qmlimages/MapAddMission.svg", |
|
|
|
|
toggle: true |
|
|
|
|
name: "File", |
|
|
|
|
iconSource: "/qmlimages/MapSync.svg", |
|
|
|
|
alternateIconSource: "/qmlimages/MapSyncChanged.svg", |
|
|
|
|
dropPanelComponent: syncDropPanel |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "Waypoint", |
|
|
|
|
iconSource: "/qmlimages/MapAddMission.svg", |
|
|
|
|
toggle: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "ROI", |
|
|
|
|
iconSource: "/qmlimages/MapAddMission.svg", |
|
|
|
|
toggle: true |
|
|
|
|
name: "ROI", |
|
|
|
|
iconSource: "/qmlimages/MapAddMission.svg", |
|
|
|
|
toggle: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: _singleComplexItem ? _missionController.complexMissionItemNames[0] : "Pattern", |
|
|
|
@ -550,12 +556,6 @@ QGCView {
@@ -550,12 +556,6 @@ QGCView {
|
|
|
|
|
dropPanelComponent: _singleComplexItem ? undefined : patternDropPanel |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "Sync", |
|
|
|
|
iconSource: "/qmlimages/MapSync.svg", |
|
|
|
|
alternateIconSource: "/qmlimages/MapSyncChanged.svg", |
|
|
|
|
dropPanelComponent: syncDropPanel |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: "Center", |
|
|
|
|
iconSource: "/qmlimages/MapCenter.svg", |
|
|
|
|
dropPanelComponent: centerMapDropPanel |
|
|
|
@ -802,7 +802,7 @@ QGCView {
@@ -802,7 +802,7 @@ QGCView {
|
|
|
|
|
Component { |
|
|
|
|
id: removeAllPromptDialog |
|
|
|
|
QGCViewMessage { |
|
|
|
|
message: qsTr("Are you sure you want to remove all items? ") + |
|
|
|
|
message: qsTr("Are you sure you want to remove all items and create a new plan? ") + |
|
|
|
|
(_planMasterController.offline ? "" : qsTr("This will also remove all items from the vehicle.")) |
|
|
|
|
function accept() { |
|
|
|
|
if (_planMasterController.offline) { |
|
|
|
@ -815,6 +815,17 @@ QGCView {
@@ -815,6 +815,17 @@ QGCView {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: clearVehicleMissionDialog |
|
|
|
|
QGCViewMessage { |
|
|
|
|
message: qsTr("Are you sure you want to remove all mission items and clear the mission from the vehicle?") |
|
|
|
|
function accept() { |
|
|
|
|
masterController.removeAllFromVehicle() |
|
|
|
|
hideDialog() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//- ToolStrip DropPanel Components |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
@ -863,8 +874,11 @@ QGCView {
@@ -863,8 +874,11 @@ QGCView {
|
|
|
|
|
width: sendSaveGrid.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: masterController.dirty ? |
|
|
|
|
qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file:") : |
|
|
|
|
qsTr("Sync:") |
|
|
|
|
(_activeVehicle ? |
|
|
|
|
qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file:") : |
|
|
|
|
qsTr("You have unsaved changes.") |
|
|
|
|
) : |
|
|
|
|
qsTr("Plan File:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
@ -875,50 +889,50 @@ QGCView {
@@ -875,50 +889,50 @@ QGCView {
|
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Upload") |
|
|
|
|
text: qsTr("New...") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.offline && !masterController.syncInProgress |
|
|
|
|
onClicked: { |
|
|
|
|
enabled: _visualItems.count > 1 |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
masterController.upload() |
|
|
|
|
_qgcView.showDialog(removeAllPromptDialog, qsTr("New Plan"), _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Download") |
|
|
|
|
text: qsTr("Open...") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.offline && !masterController.syncInProgress |
|
|
|
|
enabled: !masterController.syncInProgress |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
if (masterController.dirty) { |
|
|
|
|
_qgcView.showDialog(syncLoadFromVehicleOverwrite, columnHolder._overwriteText, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
_qgcView.showDialog(syncLoadFromFileOverwrite, columnHolder._overwriteText, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} else { |
|
|
|
|
masterController.loadFromVehicle() |
|
|
|
|
masterController.loadFromSelectedFile() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Save Plan...") |
|
|
|
|
text: qsTr("Save") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.syncInProgress |
|
|
|
|
enabled: !masterController.syncInProgress && masterController.currentPlanFile !== "" |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
masterController.saveToSelectedFile() |
|
|
|
|
if(masterController.currentPlanFile !== "") { |
|
|
|
|
masterController.saveToCurrent() |
|
|
|
|
} else { |
|
|
|
|
masterController.saveToSelectedFile() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Load Plan...") |
|
|
|
|
text: qsTr("Save As...") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.syncInProgress |
|
|
|
|
enabled: !masterController.syncInProgress && _visualItems.count > 1 |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
if (masterController.dirty) { |
|
|
|
|
_qgcView.showDialog(syncLoadFromFileOverwrite, columnHolder._overwriteText, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} else { |
|
|
|
|
masterController.loadFromSelectedFile() |
|
|
|
|
} |
|
|
|
|
masterController.saveToSelectedFile() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -936,9 +950,9 @@ QGCView {
@@ -936,9 +950,9 @@ QGCView {
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Save KML...") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.syncInProgress |
|
|
|
|
enabled: !masterController.syncInProgress && _visualItems.count > 1 |
|
|
|
|
onClicked: { |
|
|
|
|
// First point do not count |
|
|
|
|
// First point does not count |
|
|
|
|
if (_visualItems.count < 2) { |
|
|
|
|
_qgcView.showDialog(noItemForKML, qsTr("KML"), _qgcView.showDialogDefaultWidth, StandardButton.Cancel) |
|
|
|
|
return |
|
|
|
@ -948,14 +962,54 @@ QGCView {
@@ -948,14 +962,54 @@ QGCView {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width * 0.8 |
|
|
|
|
height: 1 |
|
|
|
|
color: qgcPal.text |
|
|
|
|
opacity: 0.5 |
|
|
|
|
visible: !QGroundControl.corePlugin.options.disableVehicleConnection |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Remove All") |
|
|
|
|
text: qsTr("Upload") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
onClicked: { |
|
|
|
|
enabled: !masterController.offline && !masterController.syncInProgress && _visualItems.count > 1 |
|
|
|
|
visible: !QGroundControl.corePlugin.options.disableVehicleConnection |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
masterController.upload() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Download") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: !masterController.offline && !masterController.syncInProgress |
|
|
|
|
visible: !QGroundControl.corePlugin.options.disableVehicleConnection |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
if (masterController.dirty) { |
|
|
|
|
_qgcView.showDialog(syncLoadFromVehicleOverwrite, columnHolder._overwriteText, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} else { |
|
|
|
|
masterController.loadFromVehicle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Clear Vehicle Mission") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
enabled: !masterController.offline && !masterController.syncInProgress |
|
|
|
|
visible: !QGroundControl.corePlugin.options.disableVehicleConnection |
|
|
|
|
onClicked: { |
|
|
|
|
dropPanel.hide() |
|
|
|
|
_qgcView.showDialog(removeAllPromptDialog, qsTr("Remove all"), _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No) |
|
|
|
|
_qgcView.showDialog(clearVehicleMissionDialog, text, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|