Commit 1d1d8624 authored by Don Gagne's avatar Don Gagne

Add stats area, rework polygon buttons

parent 8d78b7e3
import QtQuick 2.2
import QtQuick.Controls 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controls 1.0
......@@ -38,7 +39,7 @@ Rectangle {
}
Repeater {
model: [ missionItem.gridAltitude, missionItem.gridAngle, missionItem.gridSpacing ]
model: [ missionItem.gridAngle, missionItem.gridSpacing, missionItem.gridAltitude ]
Item {
anchors.left: parent.left
......@@ -114,31 +115,64 @@ Rectangle {
onPolygonAdjustVertex: missionItem.adjustPolygonCoordinate(vertexIndex, vertexCoordinate)
}
QGCButton {
text: editorMap.polygonDraw.drawingPolygon ? qsTr("Finish Draw") : qsTr("Draw Polygon")
enabled: ((editorMap.polygonDraw.drawingPolygon && editorMap.polygonDraw.polygonReady) || !editorMap.polygonDraw.drawingPolygon) &&
!editorMap.polygonDraw.adjustingPolygon
QGCLabel { text: qsTr("Polygon:") }
onClicked: {
if (editorMap.polygonDraw.drawingPolygon) {
editorMap.polygonDraw.finishCapturePolygon()
} else {
editorMap.polygonDraw.startCapturePolygon()
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: 1
color: qgcPal.text
}
Row {
spacing: ScreenTools.defaultFontPixelWidth
QGCButton {
text: editorMap.polygonDraw.drawingPolygon ? qsTr("Finish Draw") : qsTr("Draw")
visible: !editorMap.polygonDraw.adjustingPolygon
enabled: ((editorMap.polygonDraw.drawingPolygon && editorMap.polygonDraw.polygonReady) || !editorMap.polygonDraw.drawingPolygon)
onClicked: {
if (editorMap.polygonDraw.drawingPolygon) {
editorMap.polygonDraw.finishCapturePolygon()
} else {
editorMap.polygonDraw.startCapturePolygon()
}
}
}
}
QGCButton {
text: editorMap.polygonDraw.adjustingPolygon ? qsTr("Finish Adjust") : qsTr("Adjust Polygon")
enabled: !editorMap.polygonDraw.drawingPolygon
QGCButton {
text: editorMap.polygonDraw.adjustingPolygon ? qsTr("Finish Adjust") : qsTr("Adjust")
visible: missionItem.polygonPath.length > 0 && !editorMap.polygonDraw.drawingPolygon
onClicked: {
if (editorMap.polygonDraw.adjustingPolygon) {
editorMap.polygonDraw.finishAdjustPolygon()
} else {
editorMap.polygonDraw.startAdjustPolygon(missionItem.polygonPath)
onClicked: {
if (editorMap.polygonDraw.adjustingPolygon) {
editorMap.polygonDraw.finishAdjustPolygon()
} else {
editorMap.polygonDraw.startAdjustPolygon(missionItem.polygonPath)
}
}
}
}
QGCLabel { text: qsTr("Statistics:") }
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: 1
color: qgcPal.text
}
Grid {
columns: 2
spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { text: qsTr("Survey area:") }
QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(missionItem.coveredArea).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString }
QGCLabel { text: qsTr("# shots:") }
QGCLabel { text: missionItem.cameraShots }
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment