diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index ce7371c7502275d9f819ae8f4b60ad40c684843e..dd06a037add326dbed44965e70f8327fa119e17c 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -125,6 +125,7 @@ src/QmlControls/SliderSwitch.qml src/QmlControls/SubMenuButton.qml src/PlanView/SurveyMapVisual.qml + src/PlanView/TransectStyleComplexItemStats.qml src/QmlControls/ToolStrip.qml src/QmlControls/VehicleRotationCal.qml src/QmlControls/VehicleSummaryRow.qml diff --git a/src/PlanView/CorridorScanEditor.qml b/src/PlanView/CorridorScanEditor.qml index 754086544847a17da138bf27f3d8515e6931447d..04b0c48b06ca79eef668535729a39639ff5a6590 100644 --- a/src/PlanView/CorridorScanEditor.qml +++ b/src/PlanView/CorridorScanEditor.qml @@ -189,16 +189,6 @@ Rectangle { text: qsTr("Statistics") } - Grid { - columns: 2 - columnSpacing: ScreenTools.defaultFontPixelWidth - visible: statsHeader.checked - - QGCLabel { text: qsTr("Photo count") } - QGCLabel { text: missionItem.cameraShots } - - QGCLabel { text: qsTr("Photo interval") } - QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs") } - } + TransectStyleComplexItemStats { } } // Column } // Rectangle diff --git a/src/PlanView/TransectStyleComplexItemStats.qml b/src/PlanView/TransectStyleComplexItemStats.qml new file mode 100644 index 0000000000000000000000000000000000000000..0dec0c10661552c7b9f3a846e7b6b6bdf8efbef3 --- /dev/null +++ b/src/PlanView/TransectStyleComplexItemStats.qml @@ -0,0 +1,30 @@ +import QtQuick 2.3 +import QtQuick.Controls 1.2 + +import QGroundControl 1.0 +import QGroundControl.ScreenTools 1.0 +import QGroundControl.Controls 1.0 + +// Statistics section for TransectStyleComplexItems +Grid { + // The following properties must be available up the hierarchy chain + //property var missionItem ///< Mission Item for editor + + anchors.left: parent.left + anchors.right: parent.right + columns: 2 + columnSpacing: ScreenTools.defaultFontPixelWidth + visible: statsHeader.checked + + QGCLabel { text: qsTr("Survey Area") } + QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(missionItem.coveredArea).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString } + + QGCLabel { text: qsTr("Photo Count") } + QGCLabel { text: missionItem.cameraShots } + + QGCLabel { text: qsTr("Photo Interval") } + QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs") } + + QGCLabel { text: qsTr("Trigger Distance") } + QGCLabel { text: missionItem.cameraCalc.adjustedFootprintFrontal.valueString + " " + missionItem.cameraCalc.adjustedFootprintFrontal.units } +} diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl.Controls.qmldir index 65b86d035be9ab5cd631f4990a6c045c8b953843..6bbe56f224fca0a8747be57936d101dd2d8c8551 100644 --- a/src/QmlControls/QGroundControl.Controls.qmldir +++ b/src/QmlControls/QGroundControl.Controls.qmldir @@ -71,6 +71,7 @@ SimpleItemMapVisuals 1.0 SimpleItemMapVisuals.qml SliderSwitch 1.0 SliderSwitch.qml SubMenuButton 1.0 SubMenuButton.qml SurveyMapVisuals 1.0 SurveyMapVisuals.qml +TransectStyleComplexItemStats 1.0 TransectStyleComplexItemStats.qml ToolStrip 1.0 ToolStrip.qml VehicleRotationCal 1.0 VehicleRotationCal.qml VehicleSummaryRow 1.0 VehicleSummaryRow.qml