diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index 5c19b22..5a1f2fe 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -232,6 +232,7 @@
src/FlightDisplay/PreFlightSoundCheck.qml
src/FlightDisplay/PreFlightCheckListShowAction.qml
src/FlightDisplay/TerrainProgress.qml
+ src/FlightDisplay/TelemetryValuesBar.qml
src/FlightDisplay/VehicleWarnings.qml
src/QmlControls/QGroundControl/FlightDisplay/qmldir
src/FlightMap/MapItems/CameraTriggerIndicator.qml
diff --git a/src/FlightDisplay/FlyView.qml b/src/FlightDisplay/FlyView.qml
index 7323c8c..3919c76 100644
--- a/src/FlightDisplay/FlyView.qml
+++ b/src/FlightDisplay/FlyView.qml
@@ -52,7 +52,6 @@ Item {
property var _guidedController: guidedActionsController
property var _guidedActionList: guidedActionList
property var _guidedAltSlider: guidedAltSlider
- property var _guidedConfirm: guidedActionConfirm
property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75
property rect _centerViewport: Qt.rect(0, 0, width, height)
property real _rightPanelWidth: ScreenTools.defaultFontPixelWidth * 30
@@ -77,7 +76,6 @@ Item {
FlyViewWidgetLayer {
id: widgetLayer
- anchors.rightMargin: _toolsMargin
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
@@ -100,12 +98,11 @@ Item {
GuidedActionsController {
id: guidedActionsController
missionController: _missionController
- confirmDialog: _guidedConfirm
actionList: _guidedActionList
altitudeSlider: _guidedAltSlider
}
- GuidedActionConfirm {
+ /*GuidedActionConfirm {
id: guidedActionConfirm
anchors.margins: _margins
anchors.bottom: parent.bottom
@@ -113,7 +110,7 @@ Item {
z: QGroundControl.zOrderTopMost
guidedController: _guidedController
altitudeSlider: _guidedAltSlider
- }
+ }*/
GuidedActionList {
id: guidedActionList
@@ -144,7 +141,7 @@ Item {
rightPanelWidth: ScreenTools.defaultFontPixelHeight * 9
pipMode: !_mainWindowIsMap
toolInsets: customOverlay.totalToolInsets
- mapName: "FlightDisplayView"
+ mapName: "FlightDisplayView"
}
FlyViewVideo {
diff --git a/src/FlightDisplay/FlyViewWidgetLayer.qml b/src/FlightDisplay/FlyViewWidgetLayer.qml
index 6ebdd01..4228d2a 100644
--- a/src/FlightDisplay/FlyViewWidgetLayer.qml
+++ b/src/FlightDisplay/FlyViewWidgetLayer.qml
@@ -18,6 +18,7 @@ import QtQuick.Window 2.2
import QtQml.Models 2.1
import QGroundControl 1.0
+import QGroundControl.Controls 1.0
import QGroundControl.Airspace 1.0
import QGroundControl.Airmap 1.0
import QGroundControl.Controllers 1.0
@@ -50,18 +51,18 @@ Item {
QGCToolInsets {
id: _totalToolInsets
- leftEdgeCenterInset: toolStrip.leftInset
leftEdgeTopInset: toolStrip.leftInset
+ leftEdgeCenterInset: toolStrip.leftInset
leftEdgeBottomInset: parentToolInsets.leftEdgeBottomInset
- rightEdgeCenterInset: instrumentPanel.rightInset
- rightEdgeTopInset: instrumentPanel.rightInset
- rightEdgeBottomInset: instrumentPanel.rightInset
- topEdgeCenterInset: parentToolInsets.topEdgeCenterInset
+ rightEdgeTopInset: parentToolInsets.rightEdgeTopInset
+ rightEdgeCenterInset: parentToolInsets.rightEdgeCenterInset
+ rightEdgeBottomInset: parentToolInsets.rightEdgeBottomInset
topEdgeLeftInset: parentToolInsets.topEdgeLeftInset
+ topEdgeCenterInset: parentToolInsets.topEdgeCenterInset
topEdgeRightInset: parentToolInsets.topEdgeRightInset
- bottomEdgeCenterInset: mapScale.centerInset
bottomEdgeLeftInset: parentToolInsets.bottomEdgeLeftInset
- bottomEdgeRightInset: parentToolInsets.bottomEdgeRightInset
+ bottomEdgeCenterInset: mapScale.centerInset
+ bottomEdgeRightInset: telemetryPanel.bottomInset
}
FlyViewMissionCompleteDialog {
@@ -84,6 +85,30 @@ Item {
property real rightInset: visible ? parent.width - x : 0
}
+ TelemetryValuesBar {
+ id: telemetryPanel
+ x: recalcXPosition()
+ anchors.margins: _toolsMargin
+ anchors.bottom: parent.bottom
+
+ function recalcXPosition() {
+ // First try centered
+ var halfRootWidth = _root.width / 2
+ var halfPanelWidth = telemetryPanel.width / 2
+ var leftX = (halfRootWidth - halfPanelWidth) - _toolsMargin
+ var rightX = (halfRootWidth + halfPanelWidth) + _toolsMargin
+ if (leftX >= parentToolInsets.leftEdgeBottomInset || rightX <= parentToolInsets.rightEdgeBottomInset ) {
+ // It will fit in the horizontalCenter
+ return halfRootWidth - halfPanelWidth
+ } else {
+ // Anchor to left edge
+ return parentToolInsets.leftEdgeBottomInset + _toolsMargin
+ }
+ }
+
+ property real bottomInset: height
+ }
+
//-- Virtual Joystick
Loader {
id: virtualJoystickMultiTouch
@@ -105,11 +130,11 @@ Item {
FlyViewToolStrip {
id: toolStrip
anchors.leftMargin: _toolsMargin + parentToolInsets.leftEdgeCenterInset
- anchors.topMargin: _toolsMargin + parentToolInsets.leftEdgeTopInset
+ anchors.topMargin: _toolsMargin + parentToolInsets.topEdgeLeftInset
anchors.left: parent.left
anchors.top: parent.top
z: QGroundControl.zOrderWidgets
- maxHeight: parent.height - y - parentToolInsets.leftEdgeBottomInset - _toolsMargin
+ maxHeight: parent.height - y - parentToolInsets.bottomEdgeLeftInset - _toolsMargin
visible: !QGroundControl.videoManager.fullScreen
onDisplayPreFlightChecklist: preFlightChecklistPopup.open()
@@ -131,14 +156,13 @@ Item {
}
MapScale {
- id: mapScale
- anchors.leftMargin: parentToolInsets.leftEdgeBottomInset + _toolsMargin
- anchors.bottomMargin: parentToolInsets.bottomEdgeCenterInset + _toolsMargin
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- mapControl: _mapControl
- buttonsOnLeft: true
- visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state !== mapControl.pipState.pipState
+ id: mapScale
+ anchors.margins: _toolsMargin
+ anchors.left: toolStrip.right
+ anchors.top: parent.top
+ mapControl: _mapControl
+ buttonsOnLeft: false
+ visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.flyView.showMapScale && mapControl.pipState.state !== mapControl.pipState.pipState
property real centerInset: visible ? parent.height - y : 0
}
diff --git a/src/FlightDisplay/GuidedActionConfirm.qml b/src/FlightDisplay/GuidedActionConfirm.qml
index edbe014..63272eb 100644
--- a/src/FlightDisplay/GuidedActionConfirm.qml
+++ b/src/FlightDisplay/GuidedActionConfirm.qml
@@ -7,28 +7,26 @@
*
****************************************************************************/
-import QtQuick 2.3
-import QtQuick.Controls 1.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
+import QtQuick.Layouts 1.12
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
-/// Guided actions confirmation dialog
Rectangle {
- id: _root
- width: confirmColumn.width + (_margins * 4)
- height: confirmColumn.height + (_margins * 4)
- radius: ScreenTools.defaultFontPixelHeight / 2
- color: qgcPal.window
- border.color: _emergencyAction ? "red" : qgcPal.windowShade
- border.width: _emergencyAction ? 4 : 1
- visible: false
+ id: _root
+ Layout.minimumWidth: mainLayout.width + (_margins * 2)
+ Layout.preferredHeight: mainLayout.height + (_margins * 2)
+ radius: ScreenTools.defaultFontPixelWidth / 2
+ color: qgcPal.windowShadeLight
+ visible: false
property var guidedController
property var altitudeSlider
- property alias title: titleText.text
+ property string title // Currently unused
property alias message: messageText.text
property int action
property var actionData
@@ -37,9 +35,11 @@ Rectangle {
property alias optionText: optionCheckBox.text
property alias optionChecked: optionCheckBox.checked
- property real _margins: ScreenTools.defaultFontPixelWidth
+ property real _margins: ScreenTools.defaultFontPixelWidth / 2
property bool _emergencyAction: action === guidedController.actionEmergencyStop
+ Component.onCompleted: guidedController.confirmDialog = this
+
onHideTriggerChanged: {
if (hideTrigger) {
confirmCancelled()
@@ -50,7 +50,7 @@ Rectangle {
if (immediate) {
visible = true
} else {
- // We delay showing the confirmation for a small amount in order to any other state
+ // We delay showing the confirmation for a small amount in order for any other state
// changes to propogate through the system. This way only the final state shows up.
visibleTimer.restart()
}
@@ -76,76 +76,70 @@ Rectangle {
QGCPalette { id: qgcPal }
- DeadMouseArea {
- anchors.fill: parent
- }
-
- Column {
- id: confirmColumn
- anchors.margins: _margins
- anchors.centerIn: parent
- spacing: _margins
-
- QGCLabel {
- id: titleText
- anchors.left: slider.left
- anchors.right: slider.right
- horizontalAlignment: Text.AlignHCenter
- font.pointSize: ScreenTools.largeFontPointSize
- }
+ ColumnLayout {
+ id: mainLayout
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: _margins
QGCLabel {
id: messageText
- anchors.left: slider.left
- anchors.right: slider.right
+ Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
QGCCheckBox {
- id: optionCheckBox
- anchors.horizontalCenter: parent.horizontalCenter
- text: ""
- visible: text !== ""
+ id: optionCheckBox
+ Layout.alignment: Qt.AlignHCenter
+ text: ""
+ visible: text !== ""
}
- // Action confirmation control
- SliderSwitch {
- id: slider
- confirmText: qsTr("Slide to confirm")
- width: Math.max(implicitWidth, ScreenTools.defaultFontPixelWidth * 30)
-
- onAccept: {
- _root.visible = false
- var altitudeChange = 0
- if (altitudeSlider.visible) {
- altitudeChange = altitudeSlider.getAltitudeChangeValue()
- altitudeSlider.visible = false
- }
- hideTrigger = false
- guidedController.executeAction(_root.action, _root.actionData, altitudeChange, _root.optionChecked)
- if (mapIndicator) {
- mapIndicator.actionConfirmed()
- mapIndicator = undefined
+ RowLayout {
+ Layout.alignment: Qt.AlignHCenter
+ spacing: ScreenTools.defaultFontPixelWidth
+
+ SliderSwitch {
+ id: slider
+ confirmText: qsTr("Slide to confirm")
+ Layout.minimumWidth: Math.max(implicitWidth, ScreenTools.defaultFontPixelWidth * 30)
+
+ onAccept: {
+ _root.visible = false
+ var altitudeChange = 0
+ if (altitudeSlider.visible) {
+ altitudeChange = altitudeSlider.getAltitudeChangeValue()
+ altitudeSlider.visible = false
+ }
+ hideTrigger = false
+ guidedController.executeAction(_root.action, _root.actionData, altitudeChange, _root.optionChecked)
+ if (mapIndicator) {
+ mapIndicator.actionConfirmed()
+ mapIndicator = undefined
+ }
}
}
- }
- }
- QGCColoredImage {
- anchors.margins: _margins
- anchors.top: parent.top
- anchors.right: parent.right
- width: ScreenTools.defaultFontPixelHeight
- height: width
- sourceSize.height: width
- source: "/res/XDelete.svg"
- fillMode: Image.PreserveAspectFit
- color: qgcPal.text
-
- QGCMouseArea {
- fillItem: parent
- onClicked: confirmCancelled()
+ Rectangle {
+ height: slider.height * 0.75
+ width: height
+ radius: height / 2
+ color: qgcPal.primaryButton
+
+ QGCColoredImage {
+ anchors.margins: parent.height / 4
+ anchors.fill: parent
+ source: "/res/XDelete.svg"
+ fillMode: Image.PreserveAspectFit
+ color: qgcPal.text
+ }
+
+ QGCMouseArea {
+ fillItem: parent
+ onClicked: confirmCancelled()
+ }
+ }
}
}
}
+
diff --git a/src/FlightDisplay/TelemetryValuesBar.qml b/src/FlightDisplay/TelemetryValuesBar.qml
new file mode 100644
index 0000000..1f4b1e1
--- /dev/null
+++ b/src/FlightDisplay/TelemetryValuesBar.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+ *
+ * (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.12
+import QtQuick.Layouts 1.12
+
+import QGroundControl 1.0
+import QGroundControl.ScreenTools 1.0
+import QGroundControl.Vehicle 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.Palette 1.0
+
+Rectangle {
+ id: telemetryPanel
+ height: telemetryLayout.height + (_toolsMargin * 2)
+ width: telemetryLayout.width + (_toolsMargin * 2)
+ color: Qt.hsla(_baseBGColor.hslHue, _baseBGColor.hslSaturation, _baseBGColor.hslLightness, 0.5)
+ radius: ScreenTools.defaultFontPixelWidth / 2
+
+ property color _baseBGColor: qgcPal.window
+
+ DeadMouseArea { anchors.fill: parent }
+
+ ColumnLayout {
+ id: telemetryLayout
+ anchors.margins: _toolsMargin
+ anchors.top: parent.top
+ anchors.left: parent.left
+
+ HorizontalFactValueGrid {
+ id: valueArea
+ userSettingsGroup: telemetryBarUserSettingsGroup
+ defaultSettingsGroup: telemetryBarDefaultSettingsGroup
+
+ QGCMouseArea {
+ anchors.fill: parent
+ visible: !parent.settingsUnlocked
+ onClicked: parent.settingsUnlocked = true
+ }
+ }
+
+ GuidedActionConfirm {
+ Layout.fillWidth: true
+ guidedController: _guidedController
+ altitudeSlider: _guidedAltSlider
+ }
+ }
+}
diff --git a/src/FlightMap/Images/MapAddMission.svg b/src/FlightMap/Images/MapAddMission.svg
index 2cbcb9c..fa1fc75 100644
--- a/src/FlightMap/Images/MapAddMission.svg
+++ b/src/FlightMap/Images/MapAddMission.svg
@@ -6,5 +6,5 @@
-
+
diff --git a/src/FlightMap/Images/MapCenter.svg b/src/FlightMap/Images/MapCenter.svg
index 37f6fc0..312ff09 100644
--- a/src/FlightMap/Images/MapCenter.svg
+++ b/src/FlightMap/Images/MapCenter.svg
@@ -3,10 +3,10 @@
diff --git a/src/FlightMap/Images/MapDrawShape.svg b/src/FlightMap/Images/MapDrawShape.svg
index a73a7ad..bcd0c3b 100644
--- a/src/FlightMap/Images/MapDrawShape.svg
+++ b/src/FlightMap/Images/MapDrawShape.svg
@@ -3,7 +3,7 @@
diff --git a/src/FlightMap/Images/MapSync.svg b/src/FlightMap/Images/MapSync.svg
index 2f90fd1..8d19283 100644
--- a/src/FlightMap/Images/MapSync.svg
+++ b/src/FlightMap/Images/MapSync.svg
@@ -2,12 +2,12 @@