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,10 +115,22 @@ Rectangle {
onPolygonAdjustVertex: missionItem.adjustPolygonCoordinate(vertexIndex, vertexCoordinate)
}
QGCLabel { text: qsTr("Polygon:") }
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 Polygon")
enabled: ((editorMap.polygonDraw.drawingPolygon && editorMap.polygonDraw.polygonReady) || !editorMap.polygonDraw.drawingPolygon) &&
!editorMap.polygonDraw.adjustingPolygon
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) {
......@@ -129,8 +142,8 @@ Rectangle {
}
QGCButton {
text: editorMap.polygonDraw.adjustingPolygon ? qsTr("Finish Adjust") : qsTr("Adjust Polygon")
enabled: !editorMap.polygonDraw.drawingPolygon
text: editorMap.polygonDraw.adjustingPolygon ? qsTr("Finish Adjust") : qsTr("Adjust")
visible: missionItem.polygonPath.length > 0 && !editorMap.polygonDraw.drawingPolygon
onClicked: {
if (editorMap.polygonDraw.adjustingPolygon) {
......@@ -141,4 +154,25 @@ Rectangle {
}
}
}
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