Newer
Older
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: activeVehicle ?
qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file.") :
qsTr("You have unsaved changes.")
visible: _planMasterController.dirty
}
SectionHeader {
id: createSection
Layout.fillWidth: true
text: qsTr("Create Plan")
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
columnSpacing: _margin
rowSpacing: _margin
Layout.fillWidth: true
visible: createSection.visible
Repeater {
model: _planMasterController.planCreators
Rectangle {
id: button
width: ScreenTools.defaultFontPixelHeight * 7
height: planCreatorNameLabel.y + planCreatorNameLabel.height
color: button.pressed || button.highlighted ? qgcPal.buttonHighlight : qgcPal.button
property bool highlighted: mouseArea.containsMouse
property bool pressed: mouseArea.pressed
Image {
id: planCreatorImage
anchors.left: parent.left
anchors.right: parent.right
source: object.imageResource
sourceSize.width: width
fillMode: Image.PreserveAspectFit
mipmap: true
}
QGCLabel {
id: planCreatorNameLabel
anchors.top: planCreatorImage.bottom
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter
text: object.name
color: button.pressed || button.highlighted ? qgcPal.buttonHighlightText : qgcPal.buttonText
}
QGCMouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
preventStealing: true
onClicked: {
if (_planMasterController.containsItems) {
createPlanRemoveAllPromptDialogMapCenter = _mapCenter()
createPlanRemoveAllPromptDialogPlanCreator = object
mainWindow.showComponentDialog(createPlanRemoveAllPromptDialog, qsTr("Create Plan"), mainWindow.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
} else {
object.createPlan(_mapCenter())
}
dropPanel.hide()
}
function _mapCenter() {
var centerPoint = Qt.point(editorMap.centerViewport.left + (editorMap.centerViewport.width / 2), editorMap.centerViewport.top + (editorMap.centerViewport.height / 2))
return editorMap.toCoordinate(centerPoint, false /* clipToViewPort */)
}
}
}
}
}
SectionHeader {
id: storageSection
Layout.fillWidth: true
text: qsTr("Storage")
}
GridLayout {
columns: 3
rowSpacing: _margin
columnSpacing: ScreenTools.defaultFontPixelWidth
if (_planMasterController.containsItems) {
mainWindow.showComponentDialog(removeAllPromptDialog, qsTr("New Plan"), mainWindow.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
}
mainWindow.showComponentDialog(syncLoadFromFileOverwrite, columnHolder._overwriteText, mainWindow.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
enabled: !_planMasterController.syncInProgress && _planMasterController.currentPlanFile !== ""
if(_planMasterController.currentPlanFile !== "") {
_planMasterController.saveToCurrent()
enabled: !_planMasterController.syncInProgress && _planMasterController.containsItems
Gus Grubba
committed
text: qsTr("Save Mission Waypoints As KML...")
enabled: !_planMasterController.syncInProgress && _visualItems.count > 1
mainWindow.showComponentDialog(noItemForKML, qsTr("KML"), mainWindow.showDialogDefaultWidth, StandardButton.Cancel)
SectionHeader {
id: vehicleSection
Layout.fillWidth: true
text: qsTr("Vehicle")
}
RowLayout {
Layout.fillWidth: true
spacing: _margin
visible: vehicleSection.visible
enabled: !_planMasterController.offline && !_planMasterController.syncInProgress && _planMasterController.containsItems
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
QGCButton {
text: qsTr("Download")
Layout.fillWidth: true
enabled: !_planMasterController.offline && !_planMasterController.syncInProgress
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
dropPanel.hide()
mainWindow.showComponentDialog(syncLoadFromVehicleOverwrite, columnHolder._overwriteText, mainWindow.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
}
}
}
QGCButton {
Layout.fillWidth: true
Layout.columnSpan: 2
enabled: !_planMasterController.offline && !_planMasterController.syncInProgress
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
dropPanel.hide()
mainWindow.showComponentDialog(clearVehicleMissionDialog, text, mainWindow.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)