import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Dialogs 1.2 import QtQuick.Extras 1.4 import QtQuick.Layouts 1.2 import QGroundControl 1.0 import QGroundControl.ScreenTools 1.0 import QGroundControl.Vehicle 1.0 import QGroundControl.Controls 1.0 import QGroundControl.FactControls 1.0 import QGroundControl.Palette 1.0 import QGroundControl.FlightMap 1.0 // Editor for Survery mission items Rectangle { id: _root height: visible ? (editorColumn.height + (_margin * 2)) : 0 width: availableWidth color: qgcPal.windowShadeDark radius: _radius // The following properties must be available up the hierarchy chain //property real availableWidth ///< Width for control //property var missionItem ///< Mission Item for editor property real _margin: ScreenTools.defaultFontPixelWidth / 2 property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10.5 property var _vehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle function polygonCaptureStarted() { missionItem.clearPolygon() } function polygonCaptureFinished(coordinates) { for (var i=0; i 0 && missionItem.cameraMinTriggerInterval !== 0 && missionItem.cameraMinTriggerInterval > missionItem.timeBetweenShots } CameraCalc { cameraCalc: missionItem.cameraCalc vehicleFlightIsFrontal: true distanceToSurfaceLabel: qsTr("Altitude") frontalDistanceLabel: qsTr("Trigger Distance") sideDistanceLabel: qsTr("Spacing") } SectionHeader { id: corridorHeader text: qsTr("Corridor") } GridLayout { anchors.left: parent.left anchors.right: parent.right columnSpacing: _margin rowSpacing: _margin columns: 2 visible: corridorHeader.checked QGCLabel { text: qsTr("Width") } FactTextField { fact: missionItem.corridorWidth Layout.fillWidth: true } QGCLabel { text: qsTr("Turnaround dist") } FactTextField { fact: missionItem.turnAroundDistance Layout.fillWidth: true } FactCheckBox { text: qsTr("Take images in turnarounds") fact: missionItem.cameraTriggerInTurnAround enabled: missionItem.hoverAndCaptureAllowed ? !missionItem.hoverAndCapture.rawValue : true Layout.columnSpan: 2 } QGCCheckBox { id: relAlt anchors.left: parent.left text: qsTr("Relative altitude") checked: missionItem.cameraCalc.distanceToSurfaceRelative enabled: missionItem.cameraCalc.isManualCamera Layout.columnSpan: 2 onClicked: missionItem.cameraCalc.distanceToSurfaceRelative = checked Connections { target: missionItem.cameraCalc onDistanceToSurfaceRelativeChanged: relAlt.checked = missionItem.cameraCalc.distanceToSurfaceRelative } } } QGCButton { text: qsTr("Rotate Entry Point") onClicked: missionItem.rotateEntryPoint() } SectionHeader { id: statsHeader 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") } } } // Column } // Rectangle