From 14dceec328adc8835d4c748b57bc7669a862484d Mon Sep 17 00:00:00 2001 From: Valentin Platzgummer Date: Mon, 18 Mar 2019 16:23:23 +0100 Subject: [PATCH] after hard reset --- qgroundcontrol.qrc | 4 +- .../QGroundControl.Controls.qmldir | 2 +- src/QuadView/CameraCalc.qml | 306 ----------------- src/QuadView/CameraSection.qml | 128 -------- src/QuadView/CorridorScanEditor.qml | 184 ----------- src/QuadView/CorridorScanMapVisual.qml | 125 ------- src/QuadView/FWLandingPatternEditor.qml | 233 ------------- src/QuadView/FWLandingPatternMapVisual.qml | 302 ----------------- src/QuadView/GeoFenceEditor.qml | 309 ------------------ src/QuadView/GeoFenceMapVisuals.qml | 162 --------- src/QuadView/MissionItemEditor.qml | 222 ------------- src/QuadView/MissionItemMapVisual.qml | 47 --- src/QuadView/MissionItemStatus.qml | 106 ------ src/QuadView/MissionSettingsEditor.qml | 239 -------------- src/QuadView/RallyPointEditorHeader.qml | 67 ---- src/QuadView/RallyPointItemEditor.qml | 121 ------- src/QuadView/RallyPointMapVisuals.qml | 110 ------- src/QuadView/SimpleItemEditor.qml | 264 --------------- src/QuadView/SimpleItemMapVisual.qml | 136 -------- src/QuadView/StructureScanEditor.qml | 185 ----------- src/QuadView/StructureScanMapVisual.qml | 148 --------- src/QuadView/SurveyItemEditor.qml | 238 -------------- src/QuadView/SurveyMapVisual.qml | 153 --------- .../TransectStyleComplexItemStats.qml | 30 -- .../WimaToolBar.qml} | 0 .../QuadView.qml => WimaView/WimaView.qml} | 0 src/ui/MainWindowInner.qml | 26 +- src/ui/toolbar/MainToolBar.qml | 10 +- 28 files changed, 21 insertions(+), 3836 deletions(-) delete mode 100644 src/QuadView/CameraCalc.qml delete mode 100644 src/QuadView/CameraSection.qml delete mode 100644 src/QuadView/CorridorScanEditor.qml delete mode 100644 src/QuadView/CorridorScanMapVisual.qml delete mode 100644 src/QuadView/FWLandingPatternEditor.qml delete mode 100644 src/QuadView/FWLandingPatternMapVisual.qml delete mode 100644 src/QuadView/GeoFenceEditor.qml delete mode 100644 src/QuadView/GeoFenceMapVisuals.qml delete mode 100644 src/QuadView/MissionItemEditor.qml delete mode 100644 src/QuadView/MissionItemMapVisual.qml delete mode 100644 src/QuadView/MissionItemStatus.qml delete mode 100644 src/QuadView/MissionSettingsEditor.qml delete mode 100644 src/QuadView/RallyPointEditorHeader.qml delete mode 100644 src/QuadView/RallyPointItemEditor.qml delete mode 100644 src/QuadView/RallyPointMapVisuals.qml delete mode 100644 src/QuadView/SimpleItemEditor.qml delete mode 100644 src/QuadView/SimpleItemMapVisual.qml delete mode 100644 src/QuadView/StructureScanEditor.qml delete mode 100644 src/QuadView/StructureScanMapVisual.qml delete mode 100644 src/QuadView/SurveyItemEditor.qml delete mode 100644 src/QuadView/SurveyMapVisual.qml delete mode 100644 src/QuadView/TransectStyleComplexItemStats.qml rename src/{QuadView/QuadToolBar.qml => WimaView/WimaToolBar.qml} (100%) rename src/{QuadView/QuadView.qml => WimaView/WimaView.qml} (100%) diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 84893af40..027b75bb6 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -208,8 +208,8 @@ src/FlightMap/Widgets/VibrationPageWidget.qml src/FlightMap/Widgets/VideoPageWidget.qml src/FlightDisplay/VirtualJoystick.qml - src/QuadView/QuadToolBar.qml - src/QuadView/QuadView.qml + src/WimaView/WimaToolBar.qml + src/WimaView/WimaView.qml src/Settings/APMMavlinkStreamRate.SettingsGroup.json diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl.Controls.qmldir index bc26350e2..d937f7b0f 100644 --- a/src/QmlControls/QGroundControl.Controls.qmldir +++ b/src/QmlControls/QGroundControl.Controls.qmldir @@ -65,7 +65,7 @@ QGCViewDialog 1.0 QGCViewDialog.qml QGCViewDialogContainer 1.0 QGCViewDialogContainer.qml QGCViewMessage 1.0 QGCViewMessage.qml QGCViewPanel 1.0 QGCViewPanel.qml -QuadToolBar 1.0 QuadToolBar.qml +WimaToolBar 1.0 WimaToolBar.qml RallyPointEditorHeader 1.0 RallyPointEditorHeader.qml RallyPointItemEditor 1.0 RallyPointItemEditor.qml RallyPointMapVisuals 1.0 RallyPointMapVisuals.qml diff --git a/src/QuadView/CameraCalc.qml b/src/QuadView/CameraCalc.qml deleted file mode 100644 index 95c531f01..000000000 --- a/src/QuadView/CameraCalc.qml +++ /dev/null @@ -1,306 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.Palette 1.0 - -// Camera calculator section for mission item editors -Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - - property var cameraCalc - property bool vehicleFlightIsFrontal: true - property string distanceToSurfaceLabel - property string frontalDistanceLabel - property string sideDistanceLabel - - property real _margin: ScreenTools.defaultFontPixelWidth / 2 - property int _cameraIndex: 1 - property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10.5 - property var _cameraList: [ ] - property var _vehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle - property var _vehicleCameraList: _vehicle ? _vehicle.staticCameraList : [] - - readonly property int _gridTypeManual: 0 - readonly property int _gridTypeCustomCamera: 1 - readonly property int _gridTypeCamera: 2 - - Component.onCompleted: { - _cameraList.push(cameraCalc.manualCameraName) - _cameraList.push(cameraCalc.customCameraName) - for (var i=0; i<_vehicle.staticCameraList.length; i++) { - _cameraList.push(_vehicle.staticCameraList[i].name) - } - gridTypeCombo.model = _cameraList - var knownCameraIndex = gridTypeCombo.find(cameraCalc.cameraName.value) - if (knownCameraIndex !== -1) { - gridTypeCombo.currentIndex = knownCameraIndex - } else { - console.log("Internal error: Known camera not found", cameraCalc.cameraName.value) - gridTypeCombo.currentIndex = _gridTypeCustomCamera - } - } - - QGCPalette { id: qgcPal; colorGroupEnabled: true } - - ExclusiveGroup { - id: cameraOrientationGroup - } - - ExclusiveGroup { id: fixedValueGroup } - - SectionHeader { - id: cameraHeader - text: qsTr("Camera") - showSpacer: false - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: cameraHeader.checked - - QGCComboBox { - id: gridTypeCombo - anchors.left: parent.left - anchors.right: parent.right - model: _cameraList - currentIndex: -1 - onActivated: cameraCalc.cameraName.value = gridTypeCombo.textAt(index) - } // QGCComboxBox - - // Camera based grid ui - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: !cameraCalc.isManualCamera - - Row { - spacing: _margin - anchors.horizontalCenter: parent.horizontalCenter - visible: !cameraCalc.fixedOrientation.value - - QGCRadioButton { - width: _editFieldWidth - text: "Landscape" - checked: !!cameraCalc.landscape.value - exclusiveGroup: cameraOrientationGroup - onClicked: cameraCalc.landscape.value = 1 - } - - QGCRadioButton { - id: cameraOrientationPortrait - text: "Portrait" - checked: !cameraCalc.landscape.value - exclusiveGroup: cameraOrientationGroup - onClicked: cameraCalc.landscape.value = 0 - } - } - - // Custom camera specs - Column { - id: custCameraCol - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: cameraCalc.isCustomCamera - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - Item { Layout.fillWidth: true } - QGCLabel { - Layout.preferredWidth: _root._fieldWidth - text: qsTr("Width") - } - QGCLabel { - Layout.preferredWidth: _root._fieldWidth - text: qsTr("Height") - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - QGCLabel { text: qsTr("Sensor"); Layout.fillWidth: true } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.sensorWidth - } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.sensorHeight - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - QGCLabel { text: qsTr("Image"); Layout.fillWidth: true } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.imageWidth - } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.imageHeight - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - QGCLabel { - text: qsTr("Focal length") - Layout.fillWidth: true - } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.focalLength - } - } - - } // Column - custom camera specs - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - Item { Layout.fillWidth: true } - QGCLabel { - Layout.preferredWidth: _root._fieldWidth - text: qsTr("Front Lap") - } - QGCLabel { - Layout.preferredWidth: _root._fieldWidth - text: qsTr("Side Lap") - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - QGCLabel { text: qsTr("Overlap"); Layout.fillWidth: true } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.frontalOverlap - } - FactTextField { - Layout.preferredWidth: _root._fieldWidth - fact: cameraCalc.sideOverlap - } - } - - QGCLabel { - wrapMode: Text.WordWrap - text: qsTr("Select one:") - Layout.preferredWidth: parent.width - Layout.columnSpan: 2 - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - - QGCRadioButton { - id: fixedDistanceRadio - text: distanceToSurfaceLabel - checked: !!cameraCalc.valueSetIsDistance.value - exclusiveGroup: fixedValueGroup - onClicked: cameraCalc.valueSetIsDistance.value = 1 - } - - FactTextField { - fact: cameraCalc.distanceToSurface - enabled: fixedDistanceRadio.checked - Layout.fillWidth: true - } - - QGCRadioButton { - id: fixedImageDensityRadio - text: qsTr("Ground Res") - checked: !cameraCalc.valueSetIsDistance.value - exclusiveGroup: fixedValueGroup - onClicked: cameraCalc.valueSetIsDistance.value = 0 - } - - FactTextField { - fact: cameraCalc.imageDensity - enabled: fixedImageDensityRadio.checked - Layout.fillWidth: true - } - } - - // Calculated values -/* - Taking these out for now since they take up so much space. May come back at a later time. - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - - QGCLabel { text: frontalDistanceLabel } - FactTextField { - Layout.fillWidth: true - fact: cameraCalc.adjustedFootprintFrontal - enabled: false - } - - QGCLabel { text: sideDistanceLabel } - FactTextField { - Layout.fillWidth: true - fact: cameraCalc.adjustedFootprintSide - enabled: false - } - } // GridLayout -*/ - - } // Column - Camera spec based ui - - // No camera spec ui - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - visible: cameraCalc.isManualCamera - - QGCLabel { text: distanceToSurfaceLabel } - FactTextField { - fact: cameraCalc.distanceToSurface - Layout.fillWidth: true - } - - QGCLabel { text: frontalDistanceLabel } - FactTextField { - Layout.fillWidth: true - fact: cameraCalc.adjustedFootprintFrontal - } - - QGCLabel { text: sideDistanceLabel } - FactTextField { - Layout.fillWidth: true - fact: cameraCalc.adjustedFootprintSide - } - } // GridLayout - } // Column - Camera Section -} // Column diff --git a/src/QuadView/CameraSection.qml b/src/QuadView/CameraSection.qml deleted file mode 100644 index 0a01e62e0..000000000 --- a/src/QuadView/CameraSection.qml +++ /dev/null @@ -1,128 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.Palette 1.0 - -// Camera section for mission item editors -Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - - property alias exclusiveGroup: cameraSectionHeader.exclusiveGroup - property alias showSpacer: cameraSectionHeader.showSpacer - property alias checked: cameraSectionHeader.checked - - property var _camera: missionItem.cameraSection - property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 16 - property real _margin: ScreenTools.defaultFontPixelWidth / 2 - - SectionHeader { - id: cameraSectionHeader - text: qsTr("Camera") - checked: false - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: cameraSectionHeader.checked - - FactComboBox { - id: cameraActionCombo - anchors.left: parent.left - anchors.right: parent.right - fact: _camera.cameraAction - indexModel: false - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: ScreenTools.defaultFontPixelWidth - visible: _camera.cameraAction.rawValue === 1 - - QGCLabel { - text: qsTr("Time") - Layout.fillWidth: true - } - FactTextField { - fact: _camera.cameraPhotoIntervalTime - Layout.preferredWidth: _fieldWidth - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: ScreenTools.defaultFontPixelWidth - visible: _camera.cameraAction.rawValue === 2 - - QGCLabel { - text: qsTr("Distance") - Layout.fillWidth: true - } - FactTextField { - fact: _camera.cameraPhotoIntervalDistance - Layout.preferredWidth: _fieldWidth - } - } - - RowLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: ScreenTools.defaultFontPixelWidth - visible: _camera.cameraModeSupported - - QGCCheckBox { - id: modeCheckBox - text: qsTr("Mode") - checked: _camera.specifyCameraMode - onClicked: _camera.specifyCameraMode = checked - } - FactComboBox { - fact: _camera.cameraMode - indexModel: false - enabled: modeCheckBox.checked - Layout.fillWidth: true - } - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: ScreenTools.defaultFontPixelWidth / 2 - rowSpacing: 0 - columns: 3 - - Item { width: 1; height: 1 } - QGCLabel { text: qsTr("Pitch") } - QGCLabel { text: qsTr("Yaw") } - - QGCCheckBox { - id: gimbalCheckBox - text: qsTr("Gimbal") - checked: _camera.specifyGimbal - onClicked: _camera.specifyGimbal = checked - Layout.fillWidth: true - } - FactTextField { - fact: _camera.gimbalPitch - implicitWidth: ScreenTools.defaultFontPixelWidth * 9 - enabled: gimbalCheckBox.checked - } - - FactTextField { - fact: _camera.gimbalYaw - implicitWidth: ScreenTools.defaultFontPixelWidth * 9 - enabled: gimbalCheckBox.checked - } - } - } -} diff --git a/src/QuadView/CorridorScanEditor.qml b/src/QuadView/CorridorScanEditor.qml deleted file mode 100644 index ab42e20ea..000000000 --- a/src/QuadView/CorridorScanEditor.qml +++ /dev/null @@ -1,184 +0,0 @@ -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 - -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 - property real _cameraMinTriggerInterval: missionItem.cameraCalc.minTriggerInterval.rawValue - - function polygonCaptureStarted() { - missionItem.clearPolygon() - } - - function polygonCaptureFinished(coordinates) { - for (var i=0; i 0 && _cameraMinTriggerInterval !== 0 && _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 - text: qsTr("Relative altitude") - checked: missionItem.cameraCalc.distanceToSurfaceRelative - enabled: missionItem.cameraCalc.isManualCamera && !missionItem.followTerrain - visible: QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || (!missionItem.cameraCalc.distanceToSurfaceRelative && !missionItem.followTerrain) - Layout.alignment: Qt.AlignLeft - 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: terrainHeader - text: qsTr("Terrain") - checked: missionItem.followTerrain - } - - ColumnLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: terrainHeader.checked - - QGCCheckBox { - id: followsTerrainCheckBox - text: qsTr("Vehicle follows terrain") - checked: missionItem.followTerrain - onClicked: missionItem.followTerrain = checked - } - - GridLayout { - Layout.fillWidth: true - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - visible: followsTerrainCheckBox.checked - - QGCLabel { text: qsTr("Tolerance") } - FactTextField { - fact: missionItem.terrainAdjustTolerance - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Max Climb Rate") } - FactTextField { - fact: missionItem.terrainAdjustMaxClimbRate - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Max Descent Rate") } - FactTextField { - fact: missionItem.terrainAdjustMaxDescentRate - Layout.fillWidth: true - } - } - } - - SectionHeader { - id: statsHeader - text: qsTr("Statistics") - } - - TransectStyleComplexItemStats { } - } // Column -} // Rectangle diff --git a/src/QuadView/CorridorScanMapVisual.qml b/src/QuadView/CorridorScanMapVisual.qml deleted file mode 100644 index 762fb5a20..000000000 --- a/src/QuadView/CorridorScanMapVisual.qml +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.Controls 1.0 - -/// Corridor Scan Complex Mission Item visuals -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - property var _missionItem: object - property var _entryCoordinate - property var _exitCoordinate - property var _transectLines - - signal clicked(int sequenceNumber) - - function _addVisualElements() { - _entryCoordinate = entryPointComponent.createObject(map) - _exitCoordinate = exitPointComponent.createObject(map) - _transectLines = transectsComponent.createObject(map) - map.addMapItem(_entryCoordinate) - map.addMapItem(_exitCoordinate) - map.addMapItem(_transectLines) - } - - function _destroyVisualElements() { - _entryCoordinate.destroy() - _exitCoordinate.destroy() - _transectLines.destroy() - } - - Component.onCompleted: { - mapPolylineVisuals.addInitialPolyline() - _addVisualElements() - } - - Component.onDestruction: { - _destroyVisualElements() - } - - QGCMapPolygonVisuals { - qgcView: _root.qgcView - mapControl: map - mapPolygon: object.surveyAreaPolygon - interactive: false - interiorColor: "green" - interiorOpacity: 0.25 - } - - QGCMapPolylineVisuals { - id: mapPolylineVisuals - qgcView: _root.qgcView - mapControl: map - mapPolyline: object.corridorPolyline - interactive: _missionItem.isCurrentItem - lineWidth: 3 - lineColor: "#be781c" - } - - // Entry point - Component { - id: entryPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.coordinate - visible: _missionItem.coordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.sequenceNumber - label: "Entry" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - // Exit point - Component { - id: exitPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.exitCoordinate - visible: _missionItem.exitCoordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.lastSequenceNumber - label: "Exit" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - // Transect lines - Component { - id: transectsComponent - - MapPolyline { - line.color: "white" - line.width: 2 - path: _missionItem.visualTransectPoints - } - } -} diff --git a/src/QuadView/FWLandingPatternEditor.qml b/src/QuadView/FWLandingPatternEditor.qml deleted file mode 100644 index 2bfbd1e70..000000000 --- a/src/QuadView/FWLandingPatternEditor.qml +++ /dev/null @@ -1,233 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Dialogs 1.2 -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.FactSystem 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.Palette 1.0 - -// Editor for Fixed Wing Landing Pattern complex mission item -Rectangle { - id: _root - height: visible ? ((editorColumn.visible ? editorColumn.height : editorColumnNeedLandingPoint.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 _spacer: ScreenTools.defaultFontPixelWidth / 2 - property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle - property string _setToVehicleHeadingStr: qsTr("Set to vehicle heading") - property string _setToVehicleLocationStr: qsTr("Set to vehicle location") - - - ExclusiveGroup { id: distanceGlideGroup } - - Column { - id: editorColumn - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: missionItem.landingCoordSet - - SectionHeader { - id: loiterPointSection - text: qsTr("Loiter point") - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: loiterPointSection.checked - - Item { width: 1; height: _spacer } - - FactTextFieldGrid { - anchors.left: parent.left - anchors.right: parent.right - factList: [ missionItem.loiterAltitude, missionItem.loiterRadius ] - factLabels: [ qsTr("Altitude"), qsTr("Radius") ] - } - - Item { width: 1; height: _spacer } - - QGCCheckBox { - text: qsTr("Loiter clockwise") - checked: missionItem.loiterClockwise - onClicked: missionItem.loiterClockwise = checked - } - - QGCButton { - text: _setToVehicleHeadingStr - visible: _activeVehicle - onClicked: missionItem.landingHeading.rawValue = _activeVehicle.heading.rawValue - } - } - - SectionHeader { - id: landingPointSection - text: qsTr("Landing point") - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: landingPointSection.checked - - Item { width: 1; height: _spacer } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columns: 2 - - QGCLabel { text: qsTr("Heading") } - - FactTextField { - Layout.fillWidth: true - fact: missionItem.landingHeading - } - - QGCLabel { text: qsTr("Altitude") } - - FactTextField { - Layout.fillWidth: true - fact: missionItem.landingAltitude - } - - QGCRadioButton { - id: specifyLandingDistance - text: qsTr("Landing Dist") - checked: missionItem.valueSetIsDistance.rawValue - exclusiveGroup: distanceGlideGroup - onClicked: missionItem.valueSetIsDistance.rawValue = checked - Layout.fillWidth: true - } - - FactTextField { - fact: missionItem.landingDistance - enabled: specifyLandingDistance.checked - Layout.fillWidth: true - } - - QGCRadioButton { - id: specifyGlideSlope - text: qsTr("Glide Slope") - checked: !missionItem.valueSetIsDistance.rawValue - exclusiveGroup: distanceGlideGroup - onClicked: missionItem.valueSetIsDistance.rawValue = !checked - Layout.fillWidth: true - } - - FactTextField { - fact: missionItem.glideSlope - enabled: specifyGlideSlope.checked - Layout.fillWidth: true - } - - QGCButton { - text: _setToVehicleLocationStr - visible: _activeVehicle - Layout.columnSpan: 2 - onClicked: missionItem.landingCoordinate = _activeVehicle.coordinate - } - } - } - - Item { width: 1; height: _spacer } - - QGCCheckBox { - anchors.right: parent.right - text: qsTr("Altitudes relative to home") - checked: missionItem.altitudesAreRelative - visible: QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || !missionItem.altitudesAreRelative - onClicked: missionItem.altitudesAreRelative = checked - } - - SectionHeader { - id: cameraSection - text: qsTr("Camera") - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: cameraSection.checked - - Item { width: 1; height: _spacer } - - FactCheckBox { - text: _stopTakingPhotos.shortDescription - fact: _stopTakingPhotos - - property Fact _stopTakingPhotos: missionItem.stopTakingPhotos - } - - FactCheckBox { - text: _stopTakingVideo.shortDescription - fact: _stopTakingVideo - - property Fact _stopTakingVideo: missionItem.stopTakingVideo - } - } - } - - Column { - id: editorColumnNeedLandingPoint - anchors.margins: _margin - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - visible: !missionItem.landingCoordSet - spacing: ScreenTools.defaultFontPixelHeight - - QGCLabel { - anchors.left: parent.left - anchors.right: parent.right - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignHCenter - text: qsTr("Click in map to set landing point.") - } - - QGCLabel { - anchors.left: parent.left - anchors.right: parent.right - horizontalAlignment: Text.AlignHCenter - text: qsTr("- or -") - visible: _activeVehicle - } - - QGCButton { - anchors.horizontalCenter: parent.horizontalCenter - text: _setToVehicleLocationStr - visible: _activeVehicle - - onClicked: { - missionItem.landingCoordinate = _activeVehicle.coordinate - missionItem.landingHeading.rawValue = _activeVehicle.heading.rawValue - } - } - } -} diff --git a/src/QuadView/FWLandingPatternMapVisual.qml b/src/QuadView/FWLandingPatternMapVisual.qml deleted file mode 100644 index 8a7ca65af..000000000 --- a/src/QuadView/FWLandingPatternMapVisual.qml +++ /dev/null @@ -1,302 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// Fixed Wing Landing Pattern map visuals -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - signal clicked(int sequenceNumber) - - property var _missionItem: object - property var _itemVisuals: [ ] - property var _mouseArea - property var _dragAreas: [ ] - property var _flightPath - - readonly property int _flightPathIndex: 0 - readonly property int _loiterPointIndex: 1 - readonly property int _loiterRadiusIndex: 2 - readonly property int _landingAreaIndex: 3 - readonly property int _landPointIndex: 4 - - function hideItemVisuals() { - for (var i=0; i<_itemVisuals.length; i++) { - _itemVisuals[i].destroy() - } - _itemVisuals = [ ] - } - - function showItemVisuals() { - if (_itemVisuals.length === 0) { - var itemVisual = flightPathComponent.createObject(map) - map.addMapItem(itemVisual) - _itemVisuals[_flightPathIndex] =itemVisual - itemVisual = loiterPointComponent.createObject(map) - map.addMapItem(itemVisual) - _itemVisuals[_loiterPointIndex] = itemVisual - itemVisual = loiterRadiusComponent.createObject(map) - map.addMapItem(itemVisual) - _itemVisuals[_loiterRadiusIndex] = itemVisual - itemVisual = landingAreaComponent.createObject(map) - map.addMapItem(itemVisual) - _itemVisuals[_landingAreaIndex] = itemVisual - itemVisual = landPointComponent.createObject(map) - map.addMapItem(itemVisual) - _itemVisuals[_landPointIndex] = itemVisual - } - } - - function hideMouseArea() { - if (_mouseArea) { - _mouseArea.destroy() - _mouseArea = undefined - } - } - - function showMouseArea() { - if (!_mouseArea) { - _mouseArea = mouseAreaComponent.createObject(map) - map.addMapItem(_mouseArea) - } - } - - function hideDragAreas() { - for (var i=0; i<_dragAreas.length; i++) { - _dragAreas[i].destroy() - } - _dragAreas = [ ] - } - - function showDragAreas() { - if (_dragAreas.length === 0) { - _dragAreas.push(loiterDragAreaComponent.createObject(map)) - _dragAreas.push(landDragAreaComponent.createObject(map)) - } - } - - function _setFlightPath() { - _flightPath = [ _missionItem.loiterTangentCoordinate, _missionItem.landingCoordinate ] - } - - Component.onCompleted: { - if (_missionItem.landingCoordSet) { - showItemVisuals() - if (!_missionItem.flyView && _missionItem.isCurrentItem) { - showDragAreas() - } - _setFlightPath() - } else if (!_missionItem.flyView && _missionItem.isCurrentItem) { - showMouseArea() - } - } - - Component.onDestruction: { - hideDragAreas() - hideMouseArea() - hideItemVisuals() - } - - Connections { - target: _missionItem - - onIsCurrentItemChanged: { - if (_missionItem.flyView) { - return - } - if (_missionItem.isCurrentItem) { - if (_missionItem.landingCoordSet) { - showDragAreas() - } else { - showMouseArea() - } - } else { - hideMouseArea() - hideDragAreas() - } - } - - onLandingCoordSetChanged: { - if (_missionItem.flyView) { - return - } - if (_missionItem.landingCoordSet) { - hideMouseArea() - showItemVisuals() - showDragAreas() - _setFlightPath() - } else if (_missionItem.isCurrentItem) { - hideDragAreas() - showMouseArea() - } - } - - onLandingCoordinateChanged: _setFlightPath() - onLoiterTangentCoordinateChanged: _setFlightPath() - } - - // Mouse area to capture landing point coordindate - Component { - id: mouseAreaComponent - - MouseArea { - anchors.fill: map - z: QGroundControl.zOrderMapItems + 1 // Over item indicators - - onClicked: { - var coordinate = map.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) - coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces) - coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) - coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces) - _missionItem.landingCoordinate = coordinate - } - } - } - - // Control which is used to drag the loiter point - Component { - id: loiterDragAreaComponent - - MissionItemIndicatorDrag { - mapControl: _root.map - itemIndicator: _itemVisuals[_loiterPointIndex] - itemCoordinate: _missionItem.loiterCoordinate - - onItemCoordinateChanged: _missionItem.loiterCoordinate = itemCoordinate - } - } - - // Control which is used to drag the loiter point - Component { - id: landDragAreaComponent - - MissionItemIndicatorDrag { - mapControl: _root.map - itemIndicator: _itemVisuals[_landPointIndex] - itemCoordinate: _missionItem.landingCoordinate - - onItemCoordinateChanged: _missionItem.landingCoordinate = itemCoordinate - } - } - - // Flight path - Component { - id: flightPathComponent - - MapPolyline { - z: QGroundControl.zOrderMapItems - 1 // Under item indicators - line.color: "#be781c" - line.width: 2 - path: _flightPath - } - } - - // Loiter point - Component { - id: loiterPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.loiterCoordinate - - sourceItem: - MissionItemIndexLabel { - index: _missionItem.sequenceNumber - label: "Loiter" - checked: _missionItem.isCurrentItem - - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - Component { - id: loiterRadiusComponent - - MapCircle { - z: QGroundControl.zOrderMapItems - center: _missionItem.loiterCoordinate - radius: _missionItem.loiterRadius.rawValue - border.width: 2 - border.color: "green" - color: "transparent" - } - } - - Component { - id: landPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.landingCoordinate - - sourceItem: - MissionItemIndexLabel { - index: _missionItem.lastSequenceNumber - label: "Land" - checked: _missionItem.isCurrentItem - - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - Component { - id: landingAreaComponent - - MapPolygon { - z: QGroundControl.zOrderMapItems - border.width: 1 - border.color: "black" - color: "green" - opacity: 0.5 - - readonly property real landingWidth: 15 - readonly property real landingLength: 100 - readonly property real angleRadians: Math.atan((landingWidth / 2) / (landingLength / 2)) - readonly property real angleDegrees: (angleRadians * (180 / Math.PI)) - readonly property real hypotenuse: (landingWidth / 2) / Math.sin(angleRadians) - - property real landingAreaAngle: _missionItem.landingCoordinate.azimuthTo(_missionItem.loiterTangentCoordinate) - - function calcPoly() { - path = [ ] - addCoordinate(_missionItem.landingCoordinate.atDistanceAndAzimuth(hypotenuse, landingAreaAngle - angleDegrees)) - addCoordinate(_missionItem.landingCoordinate.atDistanceAndAzimuth(hypotenuse, landingAreaAngle + angleDegrees)) - addCoordinate(_missionItem.landingCoordinate.atDistanceAndAzimuth(hypotenuse, landingAreaAngle + (180 - angleDegrees))) - addCoordinate(_missionItem.landingCoordinate.atDistanceAndAzimuth(hypotenuse, landingAreaAngle - (180 - angleDegrees))) - } - - Component.onCompleted: calcPoly() - - Connections { - target: _missionItem - onLandingCoordinateChanged: calcPoly() - onLoiterTangentCoordinateChanged: calcPoly() - } - } - } -} diff --git a/src/QuadView/GeoFenceEditor.qml b/src/QuadView/GeoFenceEditor.qml deleted file mode 100644 index 9788aea34..000000000 --- a/src/QuadView/GeoFenceEditor.qml +++ /dev/null @@ -1,309 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FactSystem 1.0 -import QGroundControl.FactControls 1.0 - -QGCFlickable { - id: root - contentHeight: geoFenceEditorRect.height - clip: true - - property var myGeoFenceController - property var flightMap - - readonly property real _editFieldWidth: Math.min(width - _margin * 2, ScreenTools.defaultFontPixelWidth * 15) - readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 - - Rectangle { - id: geoFenceEditorRect - anchors.left: parent.left - anchors.right: parent.right - height: geoFenceItems.y + geoFenceItems.height + (_margin * 2) - radius: _radius - color: qgcPal.missionItemEditor - - QGCLabel { - id: geoFenceLabel - anchors.margins: _margin - anchors.left: parent.left - anchors.top: parent.top - text: qsTr("GeoFence") - anchors.leftMargin: ScreenTools.defaultFontPixelWidth - } - - Rectangle { - id: geoFenceItems - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: geoFenceLabel.bottom - height: fenceColumn.y + fenceColumn.height + (_margin * 2) - color: qgcPal.windowShadeDark - radius: _radius - - Column { - id: fenceColumn - anchors.margins: _margin - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - spacing: ScreenTools.defaultFontPixelHeight / 2 - - QGCLabel { - anchors.left: parent.left - anchors.right: parent.right - wrapMode: Text.WordWrap - font.pointSize: myGeoFenceController.supported ? ScreenTools.smallFontPointSize : ScreenTools.defaultFontPointSize - text: myGeoFenceController.supported ? - qsTr("GeoFencing allows you to set a virtual ‘fence’ around the area you want to fly in.") : - qsTr("This vehicle does not support GeoFence.") - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: ScreenTools.defaultFontPixelHeight / 2 - visible: myGeoFenceController.supported - - Repeater { - model: myGeoFenceController.params - - Item { - width: fenceColumn.width - height: textField.height - - property bool showCombo: modelData.enumStrings.length > 0 - - QGCLabel { - id: textFieldLabel - anchors.baseline: textField.baseline - text: myGeoFenceController.paramLabels[index] - } - - FactTextField { - id: textField - anchors.right: parent.right - width: _editFieldWidth - showUnits: true - fact: modelData - visible: !parent.showCombo - } - - FactComboBox { - id: comboField - anchors.right: parent.right - width: _editFieldWidth - indexModel: false - fact: showCombo ? modelData : _nullFact - visible: parent.showCombo - - property var _nullFact: Fact { } - } - } - } - - SectionHeader { - id: insertSection - text: qsTr("Insert GeoFence") - } - - QGCButton { - anchors.left: parent.left - anchors.right: parent.right - text: qsTr("Polygon Fence") - - onClicked: { - var rect = Qt.rect(flightMap.centerViewport.x, flightMap.centerViewport.y, flightMap.centerViewport.width, flightMap.centerViewport.height) - var topLeftCoord = flightMap.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */) - var bottomRightCoord = flightMap.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */) - myGeoFenceController.addInclusionPolygon(topLeftCoord, bottomRightCoord) - } - } - - QGCButton { - anchors.left: parent.left - anchors.right: parent.right - text: qsTr("Circular Fence") - - onClicked: { - var rect = Qt.rect(flightMap.centerViewport.x, flightMap.centerViewport.y, flightMap.centerViewport.width, flightMap.centerViewport.height) - var topLeftCoord = flightMap.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */) - var bottomRightCoord = flightMap.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */) - myGeoFenceController.addInclusionCircle(topLeftCoord, bottomRightCoord) - } - } - - SectionHeader { - id: polygonSection - text: qsTr("Polygon Fences") - } - - QGCLabel { - text: qsTr("None") - visible: polygonSection.checked && myGeoFenceController.polygons.count === 0 - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columns: 3 - flow: GridLayout.TopToBottom - visible: polygonSection.checked && myGeoFenceController.polygons.count > 0 - - QGCLabel { - text: qsTr("Inclusion") - Layout.column: 0 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.polygons - - QGCCheckBox { - checked: object.inclusion - onClicked: object.inclusion = checked - Layout.alignment: Qt.AlignHCenter - } - } - - QGCLabel { - text: qsTr("Edit") - Layout.column: 1 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.polygons - - QGCRadioButton { - checked: _interactive - Layout.alignment: Qt.AlignHCenter - - property bool _interactive: object.interactive - - on_InteractiveChanged: checked = _interactive - - onClicked: { - myGeoFenceController.clearAllInteractive() - object.interactive = checked - } - } - } - - QGCLabel { - text: qsTr("Delete") - Layout.column: 2 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.polygons - - QGCButton { - text: qsTr("Del") - Layout.alignment: Qt.AlignHCenter - onClicked: myGeoFenceController.deletePolygon(index) - } - } - } // GridLayout - - SectionHeader { - id: circleSection - text: qsTr("Circular Fences") - } - - QGCLabel { - text: qsTr("None") - visible: circleSection.checked && myGeoFenceController.circles.count === 0 - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columns: 4 - flow: GridLayout.TopToBottom - visible: polygonSection.checked && myGeoFenceController.circles.count > 0 - - QGCLabel { - text: qsTr("Inclusion") - Layout.column: 0 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.circles - - QGCCheckBox { - checked: object.inclusion - onClicked: object.inclusion = checked - Layout.alignment: Qt.AlignHCenter - } - } - - QGCLabel { - text: qsTr("Edit") - Layout.column: 1 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.circles - - QGCRadioButton { - checked: _interactive - Layout.alignment: Qt.AlignHCenter - - property bool _interactive: object.interactive - - on_InteractiveChanged: checked = _interactive - - onClicked: { - myGeoFenceController.clearAllInteractive() - object.interactive = checked - } - } - } - - QGCLabel { - text: qsTr("Radius") - Layout.column: 2 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.circles - - FactTextField { - fact: object.radius - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - } - } - - QGCLabel { - text: qsTr("Delete") - Layout.column: 3 - Layout.alignment: Qt.AlignHCenter - } - - Repeater { - model: myGeoFenceController.circles - - QGCButton { - text: qsTr("Del") - Layout.alignment: Qt.AlignHCenter - onClicked: myGeoFenceController.deleteCircle(index) - } - } - } // GridLayout - } - } - } - } // Rectangle -} diff --git a/src/QuadView/GeoFenceMapVisuals.qml b/src/QuadView/GeoFenceMapVisuals.qml deleted file mode 100644 index 371a64a4c..000000000 --- a/src/QuadView/GeoFenceMapVisuals.qml +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// GeoFence map visuals -Item { - z: QGroundControl.zOrderMapItems - - property var map - property var myGeoFenceController - property bool interactive: false ///< true: user can interact with items - property bool planView: false ///< true: visuals showing in plan view - property var homePosition - - //property var _breachReturnPointComponent - //property var _mouseAreaComponent - property var _paramCircleFenceComponent - property var _polygons: myGeoFenceController.polygons - property var _circles: myGeoFenceController.circles - property color _borderColor: "orange" - property int _borderWidthInclusion: 2 - property int _borderWidthExclusion: 0 - property color _interiorColorExclusion: "orange" - property color _interiorColorInclusion: "transparent" - property real _interiorOpacityExclusion: 0.2 - property real _interiorOpacityInclusion: 1 - - function addPolygon(inclusionPolygon) { - // Initial polygon is inset to take 2/3rds space - var rect = Qt.rect(map.centerViewport.x, map.centerViewport.y, map.centerViewport.width, map.centerViewport.height) - rect.x += (rect.width * 0.25) / 2 - rect.y += (rect.height * 0.25) / 2 - rect.width *= 0.75 - rect.height *= 0.75 - - var centerCoord = map.toCoordinate(Qt.point(rect.x + (rect.width / 2), rect.y + (rect.height / 2)), false /* clipToViewPort */) - var topLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */) - var topRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y), false /* clipToViewPort */) - var bottomLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y + rect.height), false /* clipToViewPort */) - var bottomRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */) - - // Initial polygon has max width and height of 3000 meters - var halfWidthMeters = Math.min(topLeftCoord.distanceTo(topRightCoord), 3000) / 2 - var halfHeightMeters = Math.min(topLeftCoord.distanceTo(bottomLeftCoord), 3000) / 2 - topLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 0) - topRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 0) - bottomLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 180) - bottomRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 180) - - console.log(map.center) - console.log(topLeftCoord) - console.log(bottomRightCoord) - - if (inclusionPolygon) { - myGeoFenceController.addInclusion(topLeftCoord, bottomRightCoord) - } else { - myGeoFenceController.addExclusion(topLeftCoord, bottomRightCoord) - } - } - - Component.onCompleted: { - //_breachReturnPointComponent = breachReturnPointComponent.createObject(map) - //map.addMapItem(_breachReturnPointComponent) - //_mouseAreaComponent = mouseAreaComponent.createObject(map) - _paramCircleFenceComponent = paramCircleFenceComponent.createObject(map) - map.addMapItem(_paramCircleFenceComponent) - } - - Component.onDestruction: { - //_breachReturnPointComponent.destroy() - //_mouseAreaComponent.destroy() - _paramCircleFenceComponent.destroy() - } - - // Mouse area to capture breach return point coordinate - Component { - id: mouseAreaComponent - - MouseArea { - anchors.fill: map - visible: interactive - onClicked: myGeoFenceController.breachReturnPoint = map.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) - } - } - - Instantiator { - model: _polygons - - delegate : QGCMapPolygonVisuals { - mapControl: map - mapPolygon: object - borderWidth: object.inclusion ? _borderWidthInclusion : _borderWidthExclusion - borderColor: _borderColor - interiorColor: object.inclusion ? _interiorColorInclusion : _interiorColorExclusion - interiorOpacity: object.inclusion ? _interiorOpacityInclusion : _interiorOpacityExclusion - } - } - - Instantiator { - model: _circles - - delegate : QGCMapCircleVisuals { - mapControl: map - mapCircle: object - borderWidth: object.inclusion ? _borderWidthInclusion : _borderWidthExclusion - borderColor: _borderColor - interiorColor: object.inclusion ? _interiorColorInclusion : _interiorColorExclusion - interiorOpacity: object.inclusion ? _interiorOpacityInclusion : _interiorOpacityExclusion - } - } - - // Circular geofence specified from parameter - Component { - id: paramCircleFenceComponent - - MapCircle { - color: _interiorColorInclusion - opacity: _interiorOpacityInclusion - border.color: _borderColor - border.width: _borderWidthInclusion - center: homePosition - radius: _radius - visible: homePosition.isValid && _radius > 0 - - property real _radius: myGeoFenceController.paramCircularFence - - on_RadiusChanged: console.log("_radius", _radius, homePosition.isValid, homePosition) - } - } - - // Breach return point - Component { - id: breachReturnPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: myGeoFenceController.breachReturnPoint - - sourceItem: MissionItemIndexLabel { - label: "B" - } - } - } -} diff --git a/src/QuadView/MissionItemEditor.qml b/src/QuadView/MissionItemEditor.qml deleted file mode 100644 index 694eecb93..000000000 --- a/src/QuadView/MissionItemEditor.qml +++ /dev/null @@ -1,222 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Dialogs 1.2 -import QtQml 2.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 - - -/// Mission item edit control -Rectangle { - id: _root - height: editorLoader.visible ? (editorLoader.y + editorLoader.height + (_margin * 2)) : (commandPicker.y + commandPicker.height + _margin / 2) - color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade - radius: _radius - - property var map ///< Map control - property var masterController - property var missionItem ///< MissionItem associated with this editor - property bool readOnly ///< true: read only view, false: full editing view - property var rootQgcView - - signal clicked - signal remove - signal insertWaypoint - signal insertComplexItem(string complexItemName) - - property var _masterController: masterController - property var _missionController: _masterController.missionController - property bool _currentItem: missionItem.isCurrentItem - property color _outerTextColor: _currentItem ? qgcPal.primaryButtonText : qgcPal.text - property bool _noMissionItemsAdded: ListView.view.model.count === 1 - property real _sectionSpacer: ScreenTools.defaultFontPixelWidth / 2 // spacing between section headings - property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1 - - readonly property real _editFieldWidth: Math.min(width - _margin * 2, ScreenTools.defaultFontPixelWidth * 12) - readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _hamburgerSize: commandPicker.height * 0.75 - readonly property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly - - QGCPalette { - id: qgcPal - colorGroupEnabled: enabled - } - - FocusScope { - id: currentItemScope - anchors.fill: parent - - MouseArea { - anchors.fill: parent - onClicked: { - currentItemScope.focus = true - _root.clicked() - } - } - } - - Component { - id: editPositionDialog - - EditPositionDialog { - coordinate: missionItem.coordinate - onCoordinateChanged: missionItem.coordinate = coordinate - } - } - - QGCLabel { - id: label - anchors.verticalCenter: commandPicker.verticalCenter - anchors.leftMargin: _margin - anchors.left: parent.left - text: missionItem.homePosition ? "P" : missionItem.sequenceNumber - color: _outerTextColor - } - - QGCColoredImage { - id: hamburger - anchors.rightMargin: ScreenTools.defaultFontPixelWidth - anchors.right: parent.right - anchors.verticalCenter: commandPicker.verticalCenter - width: _hamburgerSize - height: _hamburgerSize - sourceSize.height: _hamburgerSize - source: "qrc:/qmlimages/Hamburger.svg" - visible: missionItem.isCurrentItem && missionItem.sequenceNumber !== 0 - color: qgcPal.text - } - - QGCMouseArea { - fillItem: hamburger - visible: hamburger.visible - onClicked: { - currentItemScope.focus = true - hamburgerMenu.popup() - } - - Menu { - id: hamburgerMenu - - MenuItem { - text: qsTr("Insert waypoint") - onTriggered: insertWaypoint() - } - - Menu { - id: patternMenu - title: qsTr("Insert pattern") - visible: !_singleComplexItem - - Instantiator { - model: _missionController.complexMissionItemNames - - onObjectAdded: patternMenu.insertItem(index, object) - onObjectRemoved: patternMenu.removeItem(object) - - MenuItem { - text: modelData - onTriggered: insertComplexItem(modelData) - } - } - } - - MenuItem { - text: qsTr("Insert ") + _missionController.complexMissionItemNames[0] - visible: _singleComplexItem - onTriggered: insertComplexItem(_missionController.complexMissionItemNames[0]) - } - - MenuItem { - text: qsTr("Delete") - onTriggered: remove() - } - - MenuItem { - text: qsTr("Change command...") - onTriggered: commandPicker.clicked() - visible: missionItem.isSimpleItem && !_waypointsOnlyMode - } - - MenuItem { - text: qsTr("Edit position...") - visible: missionItem.specifiesCoordinate - onTriggered: qgcView.showDialog(editPositionDialog, qsTr("Edit Position"), qgcView.showDialogDefaultWidth, StandardButton.Close) - } - - MenuSeparator { - visible: missionItem.isSimpleItem && !_waypointsOnlyMode - } - - MenuItem { - text: qsTr("Show all values") - checkable: true - checked: missionItem.isSimpleItem ? missionItem.rawEdit : false - visible: missionItem.isSimpleItem && !_waypointsOnlyMode - - onTriggered: { - if (missionItem.rawEdit) { - if (missionItem.friendlyEditAllowed) { - missionItem.rawEdit = false - } else { - qgcView.showMessage(qsTr("Mission Edit"), qsTr("You have made changes to the mission item which cannot be shown in Simple Mode"), StandardButton.Ok) - } - } else { - missionItem.rawEdit = true - } - checked = missionItem.rawEdit - } - } - } - } - - QGCButton { - id: commandPicker - anchors.topMargin: _margin / 2 - anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2 - anchors.rightMargin: ScreenTools.defaultFontPixelWidth - anchors.left: label.right - anchors.top: parent.top - visible: !commandLabel.visible - text: missionItem.commandName - - Component { - id: commandDialog - - MissionCommandDialog { - missionItem: _root.missionItem - } - } - - onClicked: qgcView.showDialog(commandDialog, qsTr("Select Mission Command"), qgcView.showDialogDefaultWidth, StandardButton.Cancel) - } - - QGCLabel { - id: commandLabel - anchors.fill: commandPicker - visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode - verticalAlignment: Text.AlignVCenter - text: missionItem.commandName - color: _outerTextColor - } - - Loader { - id: editorLoader - anchors.leftMargin: _margin - anchors.topMargin: _margin - anchors.left: parent.left - anchors.top: commandPicker.bottom - source: missionItem.editorQml - visible: _currentItem - - property var masterController: _masterController - property real availableWidth: _root.width - (_margin * 2) ///< How wide the editor should be - property var editorRoot: _root - } -} // Rectangle diff --git a/src/QuadView/MissionItemMapVisual.qml b/src/QuadView/MissionItemMapVisual.qml deleted file mode 100644 index 96d07ff67..000000000 --- a/src/QuadView/MissionItemMapVisual.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 - - -/// Mission item map visual -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - signal clicked(int sequenceNumber) - - property var _visualItem - - Component.onCompleted: { - if (object.mapVisualQML) { - var component = Qt.createComponent(object.mapVisualQML) - if (component.status === Component.Error) { - console.log("Error loading Qml: ", object.mapVisualQML, component.errorString()) - } - _visualItem = component.createObject(map, { "map": _root.map, "qgcView": _root.qgcView }) - _visualItem.clicked.connect(_root.clicked) - } - } - - Component.onDestruction: { - if (_visualItem) { - _visualItem.destroy() - } - } -} diff --git a/src/QuadView/MissionItemStatus.qml b/src/QuadView/MissionItemStatus.qml deleted file mode 100644 index 150be13b3..000000000 --- a/src/QuadView/MissionItemStatus.qml +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.FactSystem 1.0 -import QGroundControl.FactControls 1.0 - -Rectangle { - id: root - radius: ScreenTools.defaultFontPixelWidth * 0.5 - color: qgcPal.window - opacity: 0.80 - clip: true - - property var missionItems ///< List of all available mission items - - property real maxWidth: parent.width - readonly property real _margins: ScreenTools.defaultFontPixelWidth - - onMaxWidthChanged: { - var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1) - root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth - } - - QGCPalette { id: qgcPal } - - QGCLabel { - id: label - anchors.top: parent.bottom - width: parent.height - text: qsTr("Terrain Altitude") - horizontalAlignment: Text.AlignHCenter - rotation: -90 - transformOrigin: Item.TopLeft - } - - QGCListView { - id: statusListView - anchors.margins: _margins - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.leftMargin: ScreenTools.defaultFontPixelHeight - anchors.left: parent.left - anchors.right: parent.right - model: missionItems - highlightMoveDuration: 250 - orientation: ListView.Horizontal - spacing: 0 - clip: true - currentIndex: _missionController.currentPlanViewIndex - - onCountChanged: { - var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1) - root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth - } - - delegate: Item { - height: statusListView.height - width: display ? (indicator.width + spacing) : 0 - visible: display - - property real availableHeight: height - indicator.height - property bool _coordValid: object.coordinate.isValid - property bool _terrainAvailable: !isNaN(object.terrainPercent) - property real _terrainPercent: _terrainAvailable ? object.terrainPercent : 1 - - readonly property bool display: object.specifiesCoordinate && !object.isStandaloneCoordinate - readonly property real spacing: ScreenTools.defaultFontPixelWidth * ScreenTools.smallFontPointRatio - - Rectangle { - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - width: indicator.width - height: _terrainAvailable ? Math.max(availableHeight * _terrainPercent, 1) : parent.height - color: _terrainAvailable ? (object.terrainCollision ? "red": qgcPal.text) : "yellow" - visible: _coordValid - } - - MissionItemIndexLabel { - id: indicator - anchors.horizontalCenter: parent.horizontalCenter - y: availableHeight - (availableHeight * object.altPercent) - small: true - checked: object.isCurrentItem - label: object.abbreviation.charAt(0) - index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber - visible: true - } - } - } -} - - diff --git a/src/QuadView/MissionSettingsEditor.qml b/src/QuadView/MissionSettingsEditor.qml deleted file mode 100644 index 9c9bffeb0..000000000 --- a/src/QuadView/MissionSettingsEditor.qml +++ /dev/null @@ -1,239 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -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.SettingsManager 1.0 -import QGroundControl.Controllers 1.0 - -// Editor for Mission Settings -Rectangle { - id: valuesRect - width: availableWidth - height: valuesColumn.height + (_margin * 2) - color: qgcPal.windowShadeDark - visible: missionItem.isCurrentItem - radius: _radius - - property var _masterControler: masterController - property var _missionController: _masterControler.missionController - property var _missionVehicle: _masterControler.controllerVehicle - property bool _vehicleHasHomePosition: _missionVehicle.homePosition.isValid - property bool _offlineEditing: _missionVehicle.isOfflineEditingVehicle - property bool _showOfflineVehicleCombos: _multipleFirmware - property bool _enableOfflineVehicleCombos: _offlineEditing && _noMissionItemsAdded - property bool _showCruiseSpeed: !_missionVehicle.multiRotor - property bool _showHoverSpeed: _missionVehicle.multiRotor || _missionVehicle.vtol - property bool _multipleFirmware: QGroundControl.supportedFirmwareCount > 2 - property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 16 - property bool _mobile: ScreenTools.isMobile - property var _savePath: QGroundControl.settingsManager.appSettings.missionSavePath - property var _fileExtension: QGroundControl.settingsManager.appSettings.missionFileExtension - property var _appSettings: QGroundControl.settingsManager.appSettings - property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly - property bool _showCameraSection: (_waypointsOnlyMode || QGroundControl.corePlugin.showAdvancedUI) && !_missionVehicle.apmFirmware - property bool _simpleMissionStart: QGroundControl.corePlugin.options.showSimpleMissionStart - property bool _showFlightSpeed: !_missionVehicle.vtol && !_simpleMissionStart && !_missionVehicle.apmFirmware - - readonly property string _firmwareLabel: qsTr("Firmware") - readonly property string _vehicleLabel: qsTr("Vehicle") - readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 - - QGCPalette { id: qgcPal } - QGCFileDialogController { id: fileController } - - Column { - id: valuesColumn - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - spacing: _margin - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: ScreenTools.defaultFontPixelWidth - rowSpacing: columnSpacing - columns: 2 - - QGCLabel { - text: qsTr("Waypoint alt") - } - FactTextField { - fact: QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude - Layout.fillWidth: true - } - - QGCCheckBox { - id: flightSpeedCheckBox - text: qsTr("Flight speed") - visible: _showFlightSpeed - checked: missionItem.speedSection.specifyFlightSpeed - onClicked: missionItem.speedSection.specifyFlightSpeed = checked - } - FactTextField { - Layout.fillWidth: true - fact: missionItem.speedSection.flightSpeed - visible: _showFlightSpeed - enabled: flightSpeedCheckBox.checked - } - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: !_simpleMissionStart - - CameraSection { - id: cameraSection - checked: !_waypointsOnlyMode && missionItem.cameraSection.settingsSpecified - visible: _showCameraSection - } - - QGCLabel { - anchors.left: parent.left - anchors.right: parent.right - text: qsTr("Above camera commands will take affect immediately upon mission start.") - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignHCenter - font.pointSize: ScreenTools.smallFontPointSize - visible: _showCameraSection && cameraSection.checked - } - - SectionHeader { - id: missionEndHeader - text: qsTr("Mission End") - checked: true - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: missionEndHeader.checked - - QGCCheckBox { - text: qsTr("Return To Launch") - checked: missionItem.missionEndRTL - onClicked: missionItem.missionEndRTL = checked - } - } - - - SectionHeader { - id: vehicleInfoSectionHeader - text: qsTr("Vehicle Info") - visible: _offlineEditing && !_waypointsOnlyMode - checked: false - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: ScreenTools.defaultFontPixelWidth - rowSpacing: columnSpacing - columns: 2 - visible: vehicleInfoSectionHeader.visible && vehicleInfoSectionHeader.checked - - QGCLabel { - text: _firmwareLabel - Layout.fillWidth: true - visible: _showOfflineVehicleCombos - } - FactComboBox { - fact: QGroundControl.settingsManager.appSettings.offlineEditingFirmwareType - indexModel: false - Layout.preferredWidth: _fieldWidth - visible: _showOfflineVehicleCombos - enabled: _enableOfflineVehicleCombos - } - - QGCLabel { - text: _vehicleLabel - Layout.fillWidth: true - visible: _showOfflineVehicleCombos - } - FactComboBox { - fact: QGroundControl.settingsManager.appSettings.offlineEditingVehicleType - indexModel: false - Layout.preferredWidth: _fieldWidth - visible: _showOfflineVehicleCombos - enabled: _enableOfflineVehicleCombos - } - - QGCLabel { - text: qsTr("Cruise speed") - visible: _showCruiseSpeed - Layout.fillWidth: true - } - FactTextField { - fact: QGroundControl.settingsManager.appSettings.offlineEditingCruiseSpeed - visible: _showCruiseSpeed - Layout.preferredWidth: _fieldWidth - } - - QGCLabel { - text: qsTr("Hover speed") - visible: _showHoverSpeed - Layout.fillWidth: true - } - FactTextField { - fact: QGroundControl.settingsManager.appSettings.offlineEditingHoverSpeed - visible: _showHoverSpeed - Layout.preferredWidth: _fieldWidth - } - } // GridLayout - - SectionHeader { - id: plannedHomePositionSection - text: qsTr("Planned Home Position") - visible: !_vehicleHasHomePosition - checked: false - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: plannedHomePositionSection.checked && !_vehicleHasHomePosition - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: ScreenTools.defaultFontPixelWidth - rowSpacing: columnSpacing - columns: 2 - - QGCLabel { - text: qsTr("Altitude") - } - FactTextField { - fact: missionItem.plannedHomePositionAltitude - Layout.fillWidth: true - } - } - - QGCLabel { - width: parent.width - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize - text: qsTr("Actual position set by vehicle at flight time.") - horizontalAlignment: Text.AlignHCenter - } - - QGCButton { - text: qsTr("Set Home To Map Center") - onClicked: missionItem.coordinate = map.center - anchors.horizontalCenter: parent.horizontalCenter - } - } - } // Column - } // Column -} // Rectangle diff --git a/src/QuadView/RallyPointEditorHeader.qml b/src/QuadView/RallyPointEditorHeader.qml deleted file mode 100644 index 0c5d677c8..000000000 --- a/src/QuadView/RallyPointEditorHeader.qml +++ /dev/null @@ -1,67 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Controls 1.0 - -QGCFlickable { - height: outerEditorRect.height - contentHeight: outerEditorRect.height - clip: true - - property var controller ///< RallyPointController - - readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 - - Rectangle { - id: outerEditorRect - width: parent.width - height: innerEditorRect.y + innerEditorRect.height + (_margin * 2) - radius: _radius - color: qgcPal.missionItemEditor - - QGCLabel { - id: editorLabel - anchors.margins: _margin - anchors.left: parent.left - anchors.top: parent.top - text: qsTr("Rally Points") - } - - Rectangle { - id: innerEditorRect - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: editorLabel.bottom - height: helpLabel.height + helpLabel.height + (_margin * 2) - color: qgcPal.windowShadeDark - radius: _radius - - QGCLabel { - id: infoLabel - anchors.margins: _margin - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize - text: qsTr("Rally Points provide alternate landing points when performing a Return to Launch (RTL).") - } - - QGCLabel { - id: helpLabel - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: infoLabel.bottom - wrapMode: Text.WordWrap - text: controller.supported ? - qsTr("Click in the map to add new rally points.") : - qsTr("This vehicle does not support Rally Points.") - } - } - } -} diff --git a/src/QuadView/RallyPointItemEditor.qml b/src/QuadView/RallyPointItemEditor.qml deleted file mode 100644 index 9ec63847a..000000000 --- a/src/QuadView/RallyPointItemEditor.qml +++ /dev/null @@ -1,121 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -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 - -Rectangle { - id: root - height: _currentItem ? valuesRect.y + valuesRect.height + (_margin * 2) : titleBar.y - titleBar.height + _margin - color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade - radius: _radius - - property var rallyPoint ///< RallyPoint object associated with editor - property var controller ///< RallyPointController - - property bool _currentItem: rallyPoint ? rallyPoint === controller.currentRallyPoint : false - property color _outerTextColor: _currentItem ? "black" : qgcPal.text - - readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2 - readonly property real _titleHeight: ScreenTools.defaultFontPixelHeight * 2 - - QGCPalette { id: qgcPal; colorGroupEnabled: true } - - Item { - id: titleBar - anchors.margins: _margin - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - height: _titleHeight - - MissionItemIndexLabel { - id: indicator - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - label: "R" - checked: true - } - - QGCLabel { - anchors.leftMargin: _margin - anchors.left: indicator.right - anchors.verticalCenter: parent.verticalCenter - text: qsTr("Rally Point") - color: _outerTextColor - } - - QGCColoredImage { - id: hamburger - anchors.rightMargin: _margin - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - width: ScreenTools.defaultFontPixelWidth * 2 - height: width - sourceSize.height: height - source: "qrc:/qmlimages/Hamburger.svg" - color: qgcPal.text - - MouseArea { - anchors.fill: parent - onClicked: hamburgerMenu.popup() - - Menu { - id: hamburgerMenu - - MenuItem { - text: qsTr("Delete") - onTriggered: controller.removePoint(rallyPoint) - } - } - } - } - } // Item - titleBar - - Rectangle { - id: valuesRect - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: titleBar.bottom - height: valuesGrid.height + (_margin * 2) - color: qgcPal.windowShadeDark - visible: _currentItem - radius: _radius - - GridLayout { - id: valuesGrid - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - rowSpacing: _margin - columnSpacing: _margin - rows: rallyPoint ? rallyPoint.textFieldFacts.length : 0 - flow: GridLayout.TopToBottom - - Repeater { - model: rallyPoint ? rallyPoint.textFieldFacts : 0 - - QGCLabel { - text: modelData.name + ":" - } - } - - Repeater { - model: rallyPoint ? rallyPoint.textFieldFacts : 0 - - FactTextField { - Layout.fillWidth: true - showUnits: true - fact: modelData - } - } - } // GridLayout - } // Rectangle -} // Rectangle diff --git a/src/QuadView/RallyPointMapVisuals.qml b/src/QuadView/RallyPointMapVisuals.qml deleted file mode 100644 index 1586b4c8c..000000000 --- a/src/QuadView/RallyPointMapVisuals.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// Rally Point map visuals -Item { - id: _root - z: QGroundControl.zOrderMapItems - - property var map - property var myRallyPointController - property bool interactive: false ///< true: user can interact with items - property bool planView: false ///< true: visuals showing in plan view - - property bool _interactive: interactive - property var _rallyPointsComponent - property bool _rallyPointsSupported: myRallyPointController.supported - property var _rallyPoints: myRallyPointController.points - - Component.onCompleted: { - _rallyPointsComponent = rallyPointsComponent.createObject(map) - } - - Component.onDestruction: { - _rallyPointsComponent.destroy() - } - - Component { - id: dragAreaComponent - - MissionItemIndicatorDrag { - mapControl: _root.map - itemCoordinate: rallyPointObject.coordinate - visible: rallyPointObject === myRallyPointController.currentRallyPoint - - property var rallyPointObject - - onItemCoordinateChanged: rallyPointObject.coordinate = itemCoordinate - } - } - - Component { - id: rallyPointComponent - - MapQuickItem { - id: itemIndicator - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - - property var rallyPointObject - - sourceItem: MissionItemIndexLabel { - id: itemIndexLabel - label: qsTr("R", "rally point map item label") - checked: _editingLayer == _layerRallyPoints ? rallyPointObject === myRallyPointController.currentRallyPoint : false - - onClicked: myRallyPointController.currentRallyPoint = rallyPointObject - } - } - } - - // Add all rally points to the map - Component { - id: rallyPointsComponent - - Repeater { - model: _rallyPoints - - delegate: Item { - property var _visuals: [ ] - - Component.onCompleted: { - var rallyPointIndicator = rallyPointComponent.createObject(map) - rallyPointIndicator.coordinate = Qt.binding(function() { return object.coordinate }) - rallyPointIndicator.rallyPointObject = Qt.binding(function() { return object }) - map.addMapItem(rallyPointIndicator) - _visuals.push(rallyPointIndicator) - - var dragArea = dragAreaComponent.createObject(map, { "itemIndicator": rallyPointIndicator, "rallyPointObject": object }) - _visuals.push(dragArea) - } - - Component.onDestruction: { - for (var i=0; i<_visuals.length; i++) { - _visuals[i].destroy() - } - _visuals = [ ] - } - } - } - } - -} diff --git a/src/QuadView/SimpleItemEditor.qml b/src/QuadView/SimpleItemEditor.qml deleted file mode 100644 index 7ee452e86..000000000 --- a/src/QuadView/SimpleItemEditor.qml +++ /dev/null @@ -1,264 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Dialogs 1.2 -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 - -// Editor for Simple mission items -Rectangle { - width: availableWidth - height: valuesColumn.height + (_margin * 2) - color: qgcPal.windowShadeDark - radius: _radius - - property bool _specifiesAltitude: missionItem.specifiesAltitude - property real _margin: ScreenTools.defaultFontPixelHeight / 2 - property bool _supportsTerrainFrame: missionItem - - property string _altModeRelativeHelpText: qsTr("Altitude relative to home altitude") - property string _altModeAbsoluteHelpText: qsTr("Altitude above mean sea level") - property string _altModeAboveTerrainHelpText: qsTr("Altitude above terrain\nActual AMSL altitude: %1 %2").arg(missionItem.amslAltAboveTerrain.valueString).arg(missionItem.amslAltAboveTerrain.units) - property string _altModeTerrainFrameHelpText: qsTr("Using terrain reference frame") - - function updateAltitudeModeText() { - if (missionItem.altitudeMode === QGroundControl.AltitudeModeRelative) { - altModeLabel.text = qsTr("Altitude") - altModeHelp.text = _altModeRelativeHelpText - } else if (missionItem.altitudeMode === QGroundControl.AltitudeModeAbsolute) { - altModeLabel.text = qsTr("Above Mean Sea Level") - altModeHelp.text = _altModeAbsoluteHelpText - } else if (missionItem.altitudeMode === QGroundControl.AltitudeModeAboveTerrain) { - altModeLabel.text = qsTr("Above Terrain") - altModeHelp.text = Qt.binding(function() { return _altModeAboveTerrainHelpText }) - } else if (missionItem.altitudeMode === QGroundControl.AltitudeModeTerrainFrame) { - altModeLabel.text = qsTr("Terrain Frame") - altModeHelp.text = _altModeTerrainFrameHelpText - } else { - altModeLabel.text = qsTr("Internal Error") - altModeHelp.text = "" - } - } - - Component.onCompleted: updateAltitudeModeText() - - Connections { - target: missionItem - onAltitudeModeChanged: updateAltitudeModeText() - } - - Column { - id: valuesColumn - anchors.margins: _margin - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - spacing: _margin - - QGCLabel { - width: parent.width - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize - text: missionItem.rawEdit ? - qsTr("Provides advanced access to all commands/parameters. Be very careful!") : - missionItem.commandDescription - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columns: 2 - - Repeater { - model: missionItem.comboboxFacts - - QGCLabel { - text: object.name - visible: object.name !== "" - Layout.column: 0 - Layout.row: index - } - } - - Repeater { - model: missionItem.comboboxFacts - - FactComboBox { - indexModel: false - model: object.enumStrings - fact: object - Layout.column: 1 - Layout.row: index - Layout.fillWidth: true - } - } - } - - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - height: altColumn.y + altColumn.height + _margin - color: qgcPal.windowShade - visible: _specifiesAltitude - - Column { - id: altColumn - anchors.margins: _margin - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - - Item { - width: altHamburger.x + altHamburger.width - height: altModeLabel.height - - QGCLabel { id: altModeLabel } - - QGCColoredImage { - id: altHamburger - anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 4 - anchors.left: altModeLabel.right - anchors.verticalCenter: altModeLabel.verticalCenter - width: ScreenTools.defaultFontPixelHeight / 2 - height: width - sourceSize.height: height - source: "/res/DropArrow.svg" - color: qgcPal.text - } - - QGCMouseArea { - anchors.fill: parent - onClicked: altHamburgerMenu.popup() - } - - Menu { - id: altHamburgerMenu - - MenuItem { - text: qsTr("Altitude Relative To Home") - checkable: true - checked: missionItem.altitudeMode === QGroundControl.AltitudeModeRelative - onTriggered: missionItem.altitudeMode = QGroundControl.AltitudeModeRelative - } - - MenuItem { - text: qsTr("Altitude Above Mean Sea Level") - checkable: true - checked: missionItem.altitudeMode === QGroundControl.AltitudeModeAbsolute - visible: QGroundControl.corePlugin.options.showMissionAbsoluteAltitude - onTriggered: missionItem.altitudeMode = QGroundControl.AltitudeModeAbsolute - } - - MenuItem { - text: qsTr("Altitude Above Terrain") - checkable: true - checked: missionItem.altitudeMode === QGroundControl.AltitudeModeAboveTerrain - onTriggered: missionItem.altitudeMode = QGroundControl.AltitudeModeAboveTerrain - visible: missionItem.specifiesCoordinate - } - - MenuItem { - text: qsTr("Terrain Frame") - checkable: true - checked: missionItem.altitudeMode === QGroundControl.AltitudeModeTerrainFrame - visible: missionItem.altitudeMode === QGroundControl.AltitudeModeTerrainFrame - onTriggered: missionItem.altitudeMode = QGroundControl.AltitudeModeTerrainFrame - } - } - } - - AltitudeFactTextField { - id: altField - fact: missionItem.altitude - altitudeMode: missionItem.altitudeMode - anchors.left: parent.left - anchors.right: parent.right - } - - QGCLabel { - id: altModeHelp - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize - anchors.left: parent.left - anchors.right: parent.right - } - } - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - flow: GridLayout.TopToBottom - rows: missionItem.textFieldFacts.count + - missionItem.nanFacts.count + - (missionItem.speedSection.available ? 1 : 0) - columns: 2 - - Repeater { - model: missionItem.textFieldFacts - - QGCLabel { text: object.name } - } - - Repeater { - model: missionItem.nanFacts - - QGCCheckBox { - text: object.name - checked: !isNaN(object.rawValue) - onClicked: object.rawValue = checked ? 0 : NaN - } - } - - QGCCheckBox { - id: flightSpeedCheckbox - text: qsTr("Flight Speed") - checked: missionItem.speedSection.specifyFlightSpeed - onClicked: missionItem.speedSection.specifyFlightSpeed = checked - visible: missionItem.speedSection.available - } - - - Repeater { - model: missionItem.textFieldFacts - - FactTextField { - showUnits: true - fact: object - Layout.fillWidth: true - enabled: !object.readOnly - } - } - - Repeater { - model: missionItem.nanFacts - - FactTextField { - showUnits: true - fact: object - Layout.fillWidth: true - enabled: !isNaN(object.rawValue) - } - } - - FactTextField { - fact: missionItem.speedSection.flightSpeed - Layout.fillWidth: true - enabled: flightSpeedCheckbox.checked - visible: missionItem.speedSection.available - } - } - - CameraSection { - checked: missionItem.cameraSection.settingsSpecified - visible: missionItem.cameraSection.available - } - } // Column -} // Rectangle diff --git a/src/QuadView/SimpleItemMapVisual.qml b/src/QuadView/SimpleItemMapVisual.qml deleted file mode 100644 index 244c7f4c2..000000000 --- a/src/QuadView/SimpleItemMapVisual.qml +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// Simple Mission Item visuals -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - property var _missionItem: object - property var _itemVisual - property var _dragArea - property bool _itemVisualShowing: false - property bool _dragAreaShowing: false - - signal clicked(int sequenceNumber) - - function hideItemVisuals() { - if (_itemVisualShowing) { - _itemVisual.destroy() - _itemVisualShowing = false - } - } - - function showItemVisuals() { - if (!_itemVisualShowing) { - _itemVisual = indicatorComponent.createObject(map) - map.addMapItem(_itemVisual) - _itemVisualShowing = true - } - } - - function hideDragArea() { - if (_dragAreaShowing) { - _dragArea.destroy() - _dragAreaShowing = false - } - } - - function showDragArea() { - if (!_dragAreaShowing && _missionItem.specifiesCoordinate) { - _dragArea = dragAreaComponent.createObject(map) - _dragAreaShowing = true - } - } - - Component.onCompleted: { - showItemVisuals() - if (_missionItem.isCurrentItem && map.planView) { - showDragArea() - } - } - - Component.onDestruction: { - hideDragArea() - hideItemVisuals() - } - - - Connections { - target: _missionItem - - onIsCurrentItemChanged: { - if (_missionItem.isCurrentItem) { - showDragArea() - } else { - hideDragArea() - } - } - } - - // Control which is used to drag items - Component { - id: dragAreaComponent - - MissionItemIndicatorDrag { - mapControl: _root.map - itemIndicator: _itemVisual - itemCoordinate: _missionItem.coordinate - - onItemCoordinateChanged: _missionItem.coordinate = itemCoordinate - } - } - - Component { - id: indicatorComponent - - MissionItemIndicator { - coordinate: _missionItem.coordinate - visible: _missionItem.specifiesCoordinate - z: QGroundControl.zOrderMapItems - missionItem: _missionItem - sequenceNumber: _missionItem.sequenceNumber - - onClicked: _root.clicked(_missionItem.sequenceNumber) - - // These are the non-coordinate child mission items attached to this item - Row { - anchors.top: parent.top - anchors.left: parent.right - - Repeater { - model: _missionItem.childItems - - delegate: MissionItemIndexLabel { - z: 2 - label: object.abbreviation.length === 0 ? object.sequenceNumber : object.abbreviation.charAt(0) - checked: object.isCurrentItem - child: true - specifiesCoordinate: false - - onClicked: _root.clicked(object.sequenceNumber) - } - } - } - } - } -} diff --git a/src/QuadView/StructureScanEditor.qml b/src/QuadView/StructureScanEditor.qml deleted file mode 100644 index 380ef8f0e..000000000 --- a/src/QuadView/StructureScanEditor.qml +++ /dev/null @@ -1,185 +0,0 @@ -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 - property real _cameraMinTriggerInterval: missionItem.cameraCalc.minTriggerInterval.rawValue - - function polygonCaptureStarted() { - missionItem.clearPolygon() - } - - function polygonCaptureFinished(coordinates) { - for (var i=0; i 0 && _cameraMinTriggerInterval !== 0 && _cameraMinTriggerInterval > missionItem.timeBetweenShots - } - - CameraCalc { - cameraCalc: missionItem.cameraCalc - vehicleFlightIsFrontal: false - distanceToSurfaceLabel: qsTr("Scan Distance") - frontalDistanceLabel: qsTr("Layer Height") - sideDistanceLabel: qsTr("Trigger Distance") - } - - SectionHeader { - id: scanHeader - text: qsTr("Scan") - } - - Column { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: scanHeader.checked - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - - FactComboBox { - fact: missionItem.startFromTop - indexModel: true - model: [ qsTr("Start Scan From Bottom"), qsTr("Start Scan From Top") ] - Layout.columnSpan: 2 - Layout.fillWidth: true - } - - QGCLabel { - text: qsTr("Structure Height") - } - FactTextField { - fact: missionItem.structureHeight - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Scan Bottom Alt") } - FactTextField { - fact: missionItem.scanBottomAlt - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Entrance/Exit Alt") } - FactTextField { - fact: missionItem.entranceAlt - Layout.fillWidth: true - } - - QGCLabel { - text: qsTr("Gimbal Pitch") - visible: missionItem.cameraCalc.isManualCamera - } - FactTextField { - fact: missionItem.gimbalPitch - Layout.fillWidth: true - visible: missionItem.cameraCalc.isManualCamera - } - } - - Item { - height: ScreenTools.defaultFontPixelHeight / 2 - width: 1 - } - - QGCButton { - text: qsTr("Rotate entry point") - onClicked: missionItem.rotateEntryPoint() - } - } // Column - Scan - - SectionHeader { - id: statsHeader - text: qsTr("Statistics") - } - - Grid { - columns: 2 - columnSpacing: ScreenTools.defaultFontPixelWidth - visible: statsHeader.checked - - QGCLabel { text: qsTr("Layers") } - QGCLabel { text: missionItem.layers.valueString } - - QGCLabel { text: qsTr("Layer Height") } - QGCLabel { text: missionItem.cameraCalc.adjustedFootprintFrontal.valueString + " " + QGroundControl.appSettingsDistanceUnitsString } - - QGCLabel { text: qsTr("Top Layer Alt") } - QGCLabel { text: QGroundControl.metersToAppSettingsDistanceUnits(missionItem.topFlightAlt).toFixed(1) + " " + QGroundControl.appSettingsDistanceUnitsString } - - QGCLabel { text: qsTr("Bottom Layer Alt") } - QGCLabel { text: QGroundControl.metersToAppSettingsDistanceUnits(missionItem.bottomFlightAlt).toFixed(1) + " " + QGroundControl.appSettingsDistanceUnitsString } - - 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.adjustedFootprintSide.valueString + " " + QGroundControl.appSettingsDistanceUnitsString } - } - } // Column -} // Rectangle diff --git a/src/QuadView/StructureScanMapVisual.qml b/src/QuadView/StructureScanMapVisual.qml deleted file mode 100644 index 333c53b99..000000000 --- a/src/QuadView/StructureScanMapVisual.qml +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// Survey Complex Mission Item visuals -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - property var _missionItem: object - property var _structurePolygon: object.structurePolygon - property var _flightPolygon: object.flightPolygon - property var _entryCoordinate - property var _exitCoordinate - - signal clicked(int sequenceNumber) - - function _addVisualElements() { - _entryCoordinate = entryPointComponent.createObject(map) - _exitCoordinate = exitPointComponent.createObject(map) - map.addMapItem(_entryCoordinate) - map.addMapItem(_exitCoordinate) - } - - function _destroyVisualElements() { - _entryCoordinate.destroy() - _exitCoordinate.destroy() - } - - /// Add an initial 4 sided polygon if there is none - function _addInitialPolygon() { - if (_structurePolygon.count < 3) { - // Initial polygon is inset to take 2/3rds space - var rect = Qt.rect(map.centerViewport.x, map.centerViewport.y, map.centerViewport.width, map.centerViewport.height) - rect.x += (rect.width * 0.25) / 2 - rect.y += (rect.height * 0.25) / 2 - rect.width *= 0.75 - rect.height *= 0.75 - - var centerCoord = map.toCoordinate(Qt.point(rect.x + (rect.width / 2), rect.y + (rect.height / 2)), false /* clipToViewPort */) - var topLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */) - var topRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y), false /* clipToViewPort */) - var bottomLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y + rect.height), false /* clipToViewPort */) - var bottomRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */) - - // Adjust polygon to max size - var maxSize = 100 - var halfWidthMeters = Math.min(topLeftCoord.distanceTo(topRightCoord), maxSize) / 2 - var halfHeightMeters = Math.min(topLeftCoord.distanceTo(bottomLeftCoord), maxSize) / 2 - topLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 0) - topRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 0) - bottomLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 180) - bottomRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 180) - - _structurePolygon.appendVertex(topLeftCoord) - _structurePolygon.appendVertex(topRightCoord) - _structurePolygon.appendVertex(bottomRightCoord) - _structurePolygon.appendVertex(bottomLeftCoord) - } - } - - Component.onCompleted: { - _addInitialPolygon() - _addVisualElements() - } - - Component.onDestruction: { - _destroyVisualElements() - } - - QGCMapPolygonVisuals { - qgcView: _root.qgcView - mapControl: map - mapPolygon: _structurePolygon - interactive: _missionItem.isCurrentItem - borderWidth: 1 - borderColor: "black" - interiorColor: "green" - interiorOpacity: 0.25 - } - - QGCMapPolygonVisuals { - qgcView: _root.qgcView - mapControl: map - mapPolygon: _flightPolygon - interactive: false - borderWidth: 2 - borderColor: "white" - } - - // Entry point - Component { - id: entryPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.coordinate - visible: _missionItem.exitCoordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.sequenceNumber - label: "Entry" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - // Exit point - Component { - id: exitPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.exitCoordinate - visible: _missionItem.exitCoordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.lastSequenceNumber - label: "Exit" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } -} diff --git a/src/QuadView/SurveyItemEditor.qml b/src/QuadView/SurveyItemEditor.qml deleted file mode 100644 index 183dc259e..000000000 --- a/src/QuadView/SurveyItemEditor.qml +++ /dev/null @@ -1,238 +0,0 @@ -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.FactSystem 1.0 -import QGroundControl.FactControls 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.FlightMap 1.0 - -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 - property real _cameraMinTriggerInterval: missionItem.cameraCalc.minTriggerInterval.rawValue - - function polygonCaptureStarted() { - missionItem.clearPolygon() - } - - function polygonCaptureFinished(coordinates) { - for (var i=0; i 0 && _cameraMinTriggerInterval !== 0 && _cameraMinTriggerInterval > missionItem.timeBetweenShots - } - - CameraCalc { - cameraCalc: missionItem.cameraCalc - vehicleFlightIsFrontal: true - distanceToSurfaceLabel: qsTr("Altitude") - frontalDistanceLabel: qsTr("Trigger Distance") - sideDistanceLabel: qsTr("Spacing") - } - - SectionHeader { - id: transectsHeader - text: qsTr("Transects") - } - - GridLayout { - anchors.left: parent.left - anchors.right: parent.right - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - visible: transectsHeader.checked - - QGCLabel { text: qsTr("Angle") } - FactTextField { - fact: missionItem.gridAngle - Layout.fillWidth: true - onUpdated: angleSlider.value = missionItem.gridAngle.value - } - - QGCSlider { - id: angleSlider - minimumValue: 0 - maximumValue: 359 - stepSize: 1 - tickmarksEnabled: false - Layout.fillWidth: true - Layout.columnSpan: 2 - Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5 - onValueChanged: missionItem.gridAngle.value = value - Component.onCompleted: value = missionItem.gridAngle.value - updateValueWhileDragging: true - } - - QGCLabel { text: qsTr("Turnaround dist") } - FactTextField { - fact: missionItem.turnAroundDistance - Layout.fillWidth: true - } - } - - ColumnLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: transectsHeader.checked - - QGCButton { - text: qsTr("Rotate Entry Point") - onClicked: missionItem.rotateEntryPoint(); - } - - /* - Temporarily removed due to bug https://github.com/mavlink/qgroundcontrol/issues/7005 - FactCheckBox { - text: qsTr("Split concave polygons") - fact: _splitConcave - visible: _splitConcave.visible - property Fact _splitConcave: missionItem.splitConcavePolygons - } - */ - - FactCheckBox { - text: qsTr("Hover and capture image") - fact: missionItem.hoverAndCapture - visible: missionItem.hoverAndCaptureAllowed - enabled: !missionItem.followTerrain - onClicked: { - if (checked) { - missionItem.cameraTriggerInTurnAround.rawValue = false - } - } - } - - FactCheckBox { - text: qsTr("Refly at 90 deg offset") - fact: missionItem.refly90Degrees - enabled: !missionItem.followTerrain - } - - FactCheckBox { - text: qsTr("Images in turnarounds") - fact: missionItem.cameraTriggerInTurnAround - enabled: missionItem.hoverAndCaptureAllowed ? !missionItem.hoverAndCapture.rawValue : true - } - - FactCheckBox { - text: qsTr("Fly alternate transects") - fact: missionItem.flyAlternateTransects - visible: _vehicle.fixedWing || _vehicle.vtol - } - - QGCCheckBox { - id: relAlt - Layout.alignment: Qt.AlignLeft - text: qsTr("Relative altitude") - checked: missionItem.cameraCalc.distanceToSurfaceRelative - enabled: missionItem.cameraCalc.isManualCamera && !missionItem.followTerrain - visible: QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || (!missionItem.cameraCalc.distanceToSurfaceRelative && !missionItem.followTerrain) - onClicked: missionItem.cameraCalc.distanceToSurfaceRelative = checked - - Connections { - target: missionItem.cameraCalc - onDistanceToSurfaceRelativeChanged: relAlt.checked = missionItem.cameraCalc.distanceToSurfaceRelative - } - } - } - - SectionHeader { - id: terrainHeader - text: qsTr("Terrain") - checked: missionItem.followTerrain - } - - ColumnLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: _margin - visible: terrainHeader.checked - - QGCCheckBox { - id: followsTerrainCheckBox - text: qsTr("Vehicle follows terrain") - checked: missionItem.followTerrain - onClicked: missionItem.followTerrain = checked - } - - GridLayout { - Layout.fillWidth: true - columnSpacing: _margin - rowSpacing: _margin - columns: 2 - visible: followsTerrainCheckBox.checked - - QGCLabel { text: qsTr("Tolerance") } - FactTextField { - fact: missionItem.terrainAdjustTolerance - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Max Climb Rate") } - FactTextField { - fact: missionItem.terrainAdjustMaxClimbRate - Layout.fillWidth: true - } - - QGCLabel { text: qsTr("Max Descent Rate") } - FactTextField { - fact: missionItem.terrainAdjustMaxDescentRate - Layout.fillWidth: true - } - } - } - - SectionHeader { - id: statsHeader - text: qsTr("Statistics") - } - - TransectStyleComplexItemStats { } - } // Column -} // Rectangle diff --git a/src/QuadView/SurveyMapVisual.qml b/src/QuadView/SurveyMapVisual.qml deleted file mode 100644 index dbcc03f3e..000000000 --- a/src/QuadView/SurveyMapVisual.qml +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** - * - * (c) 2009-2016 QGROUNDCONTROL PROJECT - * - * QGroundControl is licensed according to the terms in the file - * COPYING.md in the root of the source code directory. - * - ****************************************************************************/ - -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtLocation 5.3 -import QtPositioning 5.3 - -import QGroundControl 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 -import QGroundControl.FlightMap 1.0 - -/// Survey Complex Mission Item visuals -Item { - id: _root - - property var map ///< Map control to place item in - property var qgcView ///< QGCView to use for popping dialogs - - property var _missionItem: object - property var _mapPolygon: object.surveyAreaPolygon - property var _visualTransectsComponent - property var _entryCoordinate - property var _exitCoordinate - - signal clicked(int sequenceNumber) - - function _addVisualElements() { - _visualTransectsComponent = visualTransectsComponent.createObject(map) - _entryCoordinate = entryPointComponent.createObject(map) - _exitCoordinate = exitPointComponent.createObject(map) - map.addMapItem(_visualTransectsComponent) - map.addMapItem(_entryCoordinate) - map.addMapItem(_exitCoordinate) - } - - function _destroyVisualElements() { - _visualTransectsComponent.destroy() - _entryCoordinate.destroy() - _exitCoordinate.destroy() - } - - /// Add an initial 4 sided polygon if there is none - function _addInitialPolygon() { - if (_mapPolygon.count < 3) { - // Initial polygon is inset to take 2/3rds space - var rect = Qt.rect(map.centerViewport.x, map.centerViewport.y, map.centerViewport.width, map.centerViewport.height) - rect.x += (rect.width * 0.25) / 2 - rect.y += (rect.height * 0.25) / 2 - rect.width *= 0.75 - rect.height *= 0.75 - - var centerCoord = map.toCoordinate(Qt.point(rect.x + (rect.width / 2), rect.y + (rect.height / 2)), false /* clipToViewPort */) - var topLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */) - var topRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y), false /* clipToViewPort */) - var bottomLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y + rect.height), false /* clipToViewPort */) - var bottomRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */) - - // Initial polygon has max width and height of 3000 meters - var halfWidthMeters = Math.min(topLeftCoord.distanceTo(topRightCoord), 3000) / 2 - var halfHeightMeters = Math.min(topLeftCoord.distanceTo(bottomLeftCoord), 3000) / 2 - topLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 0) - topRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 0) - bottomLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 180) - bottomRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 180) - - _mapPolygon.appendVertex(topLeftCoord) - _mapPolygon.appendVertex(topRightCoord) - _mapPolygon.appendVertex(bottomRightCoord) - _mapPolygon.appendVertex(bottomLeftCoord) - } - } - - Component.onCompleted: { - _addInitialPolygon() - _addVisualElements() - } - - Component.onDestruction: { - _destroyVisualElements() - } - - QGCMapPolygonVisuals { - id: mapPolygonVisuals - qgcView: _root.qgcView - mapControl: map - mapPolygon: _mapPolygon - interactive: _missionItem.isCurrentItem - borderWidth: 1 - borderColor: "black" - interiorColor: "green" - interiorOpacity: 0.5 - } - - // Transect lines - Component { - id: visualTransectsComponent - - MapPolyline { - line.color: "white" - line.width: 2 - path: _missionItem.visualTransectPoints - } - } - - // Entry point - Component { - id: entryPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.coordinate - visible: _missionItem.exitCoordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.sequenceNumber - label: "Entry" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } - - // Exit point - Component { - id: exitPointComponent - - MapQuickItem { - anchorPoint.x: sourceItem.anchorPointX - anchorPoint.y: sourceItem.anchorPointY - z: QGroundControl.zOrderMapItems - coordinate: _missionItem.exitCoordinate - visible: _missionItem.exitCoordinate.isValid - - sourceItem: MissionItemIndexLabel { - index: _missionItem.lastSequenceNumber - label: "Exit" - checked: _missionItem.isCurrentItem - onClicked: _root.clicked(_missionItem.sequenceNumber) - } - } - } -} diff --git a/src/QuadView/TransectStyleComplexItemStats.qml b/src/QuadView/TransectStyleComplexItemStats.qml deleted file mode 100644 index 0dec0c106..000000000 --- a/src/QuadView/TransectStyleComplexItemStats.qml +++ /dev/null @@ -1,30 +0,0 @@ -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/QuadView/QuadToolBar.qml b/src/WimaView/WimaToolBar.qml similarity index 100% rename from src/QuadView/QuadToolBar.qml rename to src/WimaView/WimaToolBar.qml diff --git a/src/QuadView/QuadView.qml b/src/WimaView/WimaView.qml similarity index 100% rename from src/QuadView/QuadView.qml rename to src/WimaView/WimaView.qml diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 47a10dd2f..84814b4b9 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -33,12 +33,12 @@ Item { property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property string formatedMessage: activeVehicle ? activeVehicle.formatedMessage : "" - property var _viewList: [ settingsViewLoader, setupViewLoader, planViewLoader, quadViewLoader, flightView, analyzeViewLoader ] + property var _viewList: [ settingsViewLoader, setupViewLoader, planViewLoader, wimaViewLoader, flightView, analyzeViewLoader ] readonly property string _settingsViewSource: "AppSettings.qml" readonly property string _setupViewSource: "SetupView.qml" readonly property string _planViewSource: "PlanView.qml" - readonly property string _quadViewSource: "QuadView.qml" + readonly property string _wimaViewSource: "WimaView.qml" readonly property string _analyzeViewSource: "AnalyzeView.qml" onHeightChanged: { @@ -110,19 +110,19 @@ Item { planToolBar.visible = true } - function showQuadView() { + function showWimaView() { mainWindow.enableToolbar() rootLoader.sourceComponent = null if(currentPopUp) { currentPopUp.close() } - if (quadViewLoader.source != _quadViewSource) { - quadViewLoader.source = _quadViewSource + if (wimaViewLoader.source != _wimaViewSource) { + wimaViewLoader.source = _wimaViewSource } ScreenTools.availableHeight = parent.height - toolBar.height hideAllViews() - quadViewLoader.visible = true - quadToolBar.visible = true + wimaViewLoader.visible = true + wimaToolBar.visible = true } function showFlyView() { @@ -309,7 +309,7 @@ Item { onShowSetupView: mainWindow.showSetupView() onShowFlyView: mainWindow.showFlyView() onShowPlanView: mainWindow.showPlanView() - onShowQuadView: mainWindow.showQuadView() + onShowWimaView: mainWindow.showWimaView() onShowAnalyzeView: mainWindow.showAnalyzeView() onArmVehicle: flightView.guidedController.confirmAction(flightView.guidedController.actionArm) onDisarmVehicle: { @@ -344,8 +344,8 @@ Item { } } - QuadToolBar { - id: quadToolBar + WimaToolBar { + id: wimaToolBar height: ScreenTools.toolbarHeight anchors.left: parent.left anchors.right: parent.right @@ -353,7 +353,7 @@ Item { z: toolBar.z + 1 onShowFlyView: { - quadToolBar.visible = false + wimaToolBar.visible = false mainWindow.showFlyView() } } @@ -394,11 +394,11 @@ Item { } Loader { - id: quadViewLoader + id: wimaViewLoader anchors.fill: parent visible: false - property var toolbar: quadToolBar + property var toolbar: wimaToolBar } FlightDisplayView { diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 56bb50c34..b16b0dbd0 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -30,7 +30,7 @@ Rectangle { signal showSettingsView signal showSetupView signal showPlanView - signal showQuadView + signal showWimaView signal showFlyView signal showAnalyzeView signal armVehicle @@ -50,8 +50,8 @@ Rectangle { planButton.checked = true } - function checkQuadButton() { - quadButton.checked = true + function checkWimaButton() { + wimaButton.checked = true } function checkFlyButton() { @@ -127,12 +127,12 @@ Rectangle { } QGCToolBarButton { - id: quadButton + id: wimaButton anchors.top: parent.top anchors.bottom: parent.bottom exclusiveGroup: mainActionGroup source: "/res/waves.svg" - onClicked: toolBar.showQuadView() + onClicked: toolBar.showWimaView() } QGCToolBarButton { -- 2.22.0