diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index b86b5d2bc4c6b1ae7c4f3ec42c4475cf1c15d9c6..a8306f2dddeced69445eff363e9eeb1f80f41a4f 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -75,6 +75,7 @@
src/QmlControls/MultiRotorMotorDisplay.qml
src/QmlControls/NoMouseThroughRectangle.qml
src/QmlControls/OfflineMapButton.qml
+ src/QmlControls/PageView.qml
src/QmlControls/ParameterEditor.qml
src/QmlControls/ParameterEditorDialog.qml
src/PlanView/PlanToolBar.qml
@@ -163,11 +164,7 @@
src/FlightMap/Widgets/QGCPitchIndicator.qml
src/FlightMap/QGCVideoBackground.qml
src/FlightMap/qmldir
- src/FlightMap/Widgets/CameraWidget.qml
- src/FlightMap/Widgets/ValuesWidget.qml
- src/FlightMap/Widgets/VehicleHealthWidget.qml
src/FlightMap/MapItems/VehicleMapItem.qml
- src/FlightMap/Widgets/VibrationWidget.qml
src/QmlControls/QGroundControl.ScreenTools.qmldir
src/QmlControls/ScreenTools.qml
src/QmlControls/QmlTest.qml
@@ -189,6 +186,10 @@
src/ui/preferences/UdpSettings.qml
src/VehicleSetup/VehicleSummary.qml
src/FlightDisplay/VirtualJoystick.qml
+ src/FlightMap/Widgets/CameraPageWidget.qml
+ src/FlightMap/Widgets/ValuePageWidget.qml
+ src/FlightMap/Widgets/HealthPageWidget.qml
+ src/FlightMap/Widgets/VibrationPageWidget.qml
src/MissionManager/MavCmdInfoCommon.json
diff --git a/src/FlightMap/Widgets/CameraPageWidget.qml b/src/FlightMap/Widgets/CameraPageWidget.qml
new file mode 100644
index 0000000000000000000000000000000000000000..68e90505dfeae884e23304212dce2960714506ed
--- /dev/null
+++ b/src/FlightMap/Widgets/CameraPageWidget.qml
@@ -0,0 +1,32 @@
+/****************************************************************************
+ *
+ * (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.Layouts 1.2
+
+import QGroundControl 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+/// Camera page for Instrument Panel PageView
+Column {
+ width: pageWidth
+ spacing: ScreenTools.defaultFontPixelHeight
+
+ property bool showSettingsIcon: false
+
+ property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
+
+ QGCButton {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Trigger Camera")
+ onClicked: _activeVehicle.triggerCamera()
+ enabled: _activeVehicle
+ }
+}
diff --git a/src/FlightMap/Widgets/CameraWidget.qml b/src/FlightMap/Widgets/CameraWidget.qml
deleted file mode 100644
index 080bfd372d44fab41af788e97bc80de6f9574a3c..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/CameraWidget.qml
+++ /dev/null
@@ -1,54 +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.Layouts 1.2
-
-import QGroundControl 1.0
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-/// Camera controls used in InstrumentSwipeView
-QGCFlickable {
- id: _root
- height: Math.min(maxHeight, column.height)
- contentHeight: column.height
- flickableDirection: Flickable.VerticalFlick
- clip: true
-
- property var qgcView
- property color textColor
- property var maxHeight
-
- property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
-
- MouseArea {
- anchors.fill: parent
- onClicked: showNextPage()
- }
-
- Column {
- id: column
- width: parent.width
- spacing: ScreenTools.defaultFontPixelHeight
-
- QGCLabel {
- anchors.horizontalCenter: parent.horizontalCenter
- color: textColor
- text: qsTr("Camera Controls")
- }
-
- QGCButton {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Trigger Camera")
- onClicked: _activeVehicle.triggerCamera()
- enabled: _activeVehicle
- }
- }
-}
diff --git a/src/FlightMap/Widgets/HealthPageWidget.qml b/src/FlightMap/Widgets/HealthPageWidget.qml
new file mode 100644
index 0000000000000000000000000000000000000000..834106737949f3eded9f0e7d0d3135311ce6b56a
--- /dev/null
+++ b/src/FlightMap/Widgets/HealthPageWidget.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+ *
+ * (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.Layouts 1.2
+
+import QGroundControl 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+/// Health page for Instrument Panel PageWidget
+Column {
+ width: pageWidth
+
+ property bool showSettingsIcon: false
+
+ property var _unhealthySensors: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.unhealthySensors : [ ]
+
+ QGCLabel {
+ width: parent.width
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("All systems healthy")
+ visible: healthRepeater.count == 0
+ }
+
+ Repeater {
+ id: healthRepeater
+ model: _unhealthySensors
+
+ Row {
+ Image {
+ source: "/qmlimages/Yield.svg"
+ height: ScreenTools.defaultFontPixelHeight
+ sourceSize.height: height
+ fillMode: Image.PreserveAspectFit
+ }
+
+ QGCLabel {
+ text: modelData
+ }
+ }
+ }
+}
diff --git a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
index a1b48d986e203da7d9e33c947a80fac1a3d971c3..4e2fe1dc7d3711e3b52a5ee00e4c89cd221691e4 100644
--- a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+++ b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
@@ -60,24 +60,6 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
}
- Image {
- id: gearThingy
- anchors.bottomMargin: _topBottomMargin
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- source: qgcPal.globalTheme == QGCPalette.Light ? "/res/gear-black.svg" : "/res/gear-white.svg"
- mipmap: true
- opacity: 0.5
- width: root.height * 0.15
- sourceSize.width: width
- fillMode: Image.PreserveAspectFit
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: _valuesWidget.showPicker()
- }
-
Item {
id: _valuesItem
anchors.topMargin: ScreenTools.defaultFontPixelHeight / 4
@@ -90,17 +72,13 @@ Rectangle {
color: qgcPal.window
}
- InstrumentSwipeView {
+ PageView {
id: _valuesWidget
anchors.margins: 1
anchors.left: parent.left
anchors.right: parent.right
qgcView: root._qgcView
- textColor: qgcPal.text
- backgroundColor: qgcPal.window
maxHeight: _availableValueHeight
}
}
-
-
}
diff --git a/src/FlightMap/Widgets/ValuesWidget.qml b/src/FlightMap/Widgets/ValuePageWidget.qml
similarity index 87%
rename from src/FlightMap/Widgets/ValuesWidget.qml
rename to src/FlightMap/Widgets/ValuePageWidget.qml
index 1d8733363e57cef25646f424a6c94dfee06d73cb..8863bccb647f99941694bb7baf08420b510f1266 100644
--- a/src/FlightMap/Widgets/ValuesWidget.qml
+++ b/src/FlightMap/Widgets/ValuePageWidget.qml
@@ -7,7 +7,6 @@
*
****************************************************************************/
-
import QtQuick 2.3
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
@@ -20,16 +19,13 @@ import QGroundControl.Controllers 1.0
import QGroundControl.Palette 1.0
import QGroundControl 1.0
-QGCFlickable {
- id: _root
- height: Math.min(maxHeight, _smallFlow.y + _smallFlow.height)
- contentHeight: _smallFlow.y + _smallFlow.height
- flickableDirection: Flickable.VerticalFlick
- clip: true
+/// Value page for InstrumentPanel PageView
+Column {
+ id: _largeColumn
+ width: pageWidth
+ spacing: _margins
- property var qgcView
- property color textColor
- property var maxHeight
+ property bool showSettingsIcon: true
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
property real _margins: ScreenTools.defaultFontPixelWidth / 2
@@ -40,7 +36,7 @@ QGCFlickable {
id: controller
}
- function showPicker() {
+ function showSettings() {
qgcView.showDialog(propertyPicker, qsTr("Value Widget Setup"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
}
@@ -53,36 +49,39 @@ QGCFlickable {
return false
}
- MouseArea {
- anchors.fill: parent
- onClicked: showNextPage()
- }
+ Repeater {
+ model: _activeVehicle ? controller.largeValues : 0
+ Loader {
+ sourceComponent: fact ? largeValue : undefined
+ property Fact fact: _activeVehicle.getFact(modelData.replace("Vehicle.", ""))
+ }
+ } // Repeater - Large
- Column {
- id: _largeColumn
- width: parent.width
- spacing: _margins
+ Flow {
+ id: _smallFlow
+ width: parent.width
+ layoutDirection: Qt.LeftToRight
+ spacing: _margins
Repeater {
- model: _activeVehicle ? controller.largeValues : 0
+ model: _activeVehicle ? controller.smallValues : 0
Loader {
- sourceComponent: fact ? largeValue : undefined
+ sourceComponent: fact ? smallValue : undefined
property Fact fact: _activeVehicle.getFact(modelData.replace("Vehicle.", ""))
}
- } // Repeater - Large
- } // Column - Large
+ } // Repeater - Small
+ } // Flow
Component {
id: largeValue
Column {
width: _largeColumn.width
- property bool largeValue: _root.listContains(controller.altitudeProperties, fact.name)
+ property bool largeValue: listContains(controller.altitudeProperties, fact.name)
QGCLabel {
width: parent.width
horizontalAlignment: Text.AlignHCenter
- color: textColor
fontSizeMode: Text.HorizontalFit
text: fact.shortDescription + (fact.units ? " (" + fact.units + ")" : "")
}
@@ -92,34 +91,16 @@ QGCFlickable {
font.pointSize: ScreenTools.mediumFontPointSize * (largeValue ? 1.3 : 1.0)
font.family: largeValue ? ScreenTools.demiboldFontFamily : ScreenTools.normalFontFamily
fontSizeMode: Text.HorizontalFit
- color: textColor
text: fact.valueString
}
}
}
- Flow {
- id: _smallFlow
- width: parent.width
- anchors.topMargin: _margins
- anchors.top: _largeColumn.bottom
- layoutDirection: Qt.LeftToRight
- spacing: _margins
-
- Repeater {
- model: _activeVehicle ? controller.smallValues : 0
- Loader {
- sourceComponent: fact ? smallValue : undefined
- property Fact fact: _activeVehicle.getFact(modelData.replace("Vehicle.", ""))
- }
- } // Repeater - Small
- } // Flow
-
Component {
id: smallValue
Column {
- width: (_root.width / 2) - (_margins / 2) - 0.1
+ width: (pageWidth / 2) - (_margins / 2) - 0.1
clip: true
QGCLabel {
@@ -127,13 +108,11 @@ QGCFlickable {
horizontalAlignment: Text.AlignHCenter
font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize
fontSizeMode: Text.HorizontalFit
- color: textColor
text: fact.shortDescription
}
QGCLabel {
width: parent.width
horizontalAlignment: Text.AlignHCenter
- color: textColor
fontSizeMode: Text.HorizontalFit
text: fact.enumOrValueString
}
@@ -142,7 +121,6 @@ QGCFlickable {
horizontalAlignment: Text.AlignHCenter
font.pointSize: ScreenTools.isTinyScreen ? ScreenTools.smallFontPointSize * 0.75 : ScreenTools.smallFontPointSize
fontSizeMode: Text.HorizontalFit
- color: textColor
text: fact.units
}
}
diff --git a/src/FlightMap/Widgets/VehicleHealthWidget.qml b/src/FlightMap/Widgets/VehicleHealthWidget.qml
deleted file mode 100644
index 60834cf49bedb050d73c948e829176d60a8e93f4..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/VehicleHealthWidget.qml
+++ /dev/null
@@ -1,73 +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.Layouts 1.2
-
-import QGroundControl 1.0
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-QGCFlickable {
- id: _root
- height: Math.min(maxHeight, healthColumn.y + healthColumn.height)
- contentHeight: healthColumn.y + healthColumn.height
- flickableDirection: Flickable.VerticalFlick
- clip: true
-
- property var qgcView
- property color textColor
- property var maxHeight
-
- property var unhealthySensors: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.unhealthySensors : [ ]
-
- MouseArea {
- anchors.fill: parent
- onClicked: showNextPage()
- }
-
- Column {
- id: healthColumn
- width: parent.width
-
- QGCLabel {
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- color: textColor
- text: qsTr("Vehicle Health")
- }
-
- QGCLabel {
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- color: textColor
- text: qsTr("All systems healthy")
- visible: healthRepeater.count == 0
- }
-
- Repeater {
- id: healthRepeater
- model: unhealthySensors
-
- Row {
- Image {
- source: "/qmlimages/Yield.svg"
- height: ScreenTools.defaultFontPixelHeight
- sourceSize.height: height
- fillMode: Image.PreserveAspectFit
- }
-
- QGCLabel {
- color: textColor
- text: modelData
- }
- }
- }
- }
-}
diff --git a/src/FlightMap/Widgets/VibrationPageWidget.qml b/src/FlightMap/Widgets/VibrationPageWidget.qml
new file mode 100644
index 0000000000000000000000000000000000000000..aedba7c08730233624c4d353a82633c98c9c28e4
--- /dev/null
+++ b/src/FlightMap/Widgets/VibrationPageWidget.qml
@@ -0,0 +1,153 @@
+/****************************************************************************
+ *
+ * (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 QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+import QGroundControl.FactSystem 1.0
+import QGroundControl.Controllers 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl 1.0
+
+Rectangle {
+ height: barRow.y + barRow.height
+ width: pageWidth
+ color: qgcPal.window
+
+ property bool showSettingsIcon: false
+
+ property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
+ property bool _available: _activeVehicle ? !isNaN(_activeVehicle.vibration.xAxis.value) : false
+ property real _margins: ScreenTools.defaultFontPixelWidth / 2
+ property real _barWidth: Math.round(ScreenTools.defaultFontPixelWidth * 3)
+
+ readonly property real _barMinimum: 0.0
+ readonly property real _barMaximum: 90.0
+ readonly property real _barBadValue: 60.0
+
+ QGCPalette { id:qgcPal; colorGroupEnabled: true }
+
+ QGCLabel {
+ id: title
+ text: qsTr("Vibe")
+ anchors.horizontalCenter: barRow.horizontalCenter
+ }
+
+ Row {
+ id: barRow
+ anchors.margins: _margins
+ anchors.top: title.bottom
+ anchors.left: parent.left
+ spacing: _margins
+
+ Column {
+ ProgressBar {
+ id: xBar
+ height: 50
+ orientation: Qt.Vertical
+ minimumValue: _barMinimum
+ maximumValue: _barMaximum
+ value: _activeVehicle ? _activeVehicle.vibration.xAxis.value : 0
+ }
+
+ QGCLabel {
+ id: xBarLabel
+ text: "X"
+ anchors.horizontalCenter: xBar.horizontalCenter
+ }
+ }
+
+ Column {
+ ProgressBar {
+ id: yBar
+ height: 50
+ orientation: Qt.Vertical
+ minimumValue: _barMinimum
+ maximumValue: _barMaximum
+ value: _activeVehicle ? _activeVehicle.vibration.yAxis.value : 0
+ }
+
+ QGCLabel {
+ anchors.horizontalCenter: yBar.horizontalCenter
+ text: "Y"
+ }
+ }
+
+ Column {
+ ProgressBar {
+ id: zBar
+ height: 50
+ orientation: Qt.Vertical
+ minimumValue: _barMinimum
+ maximumValue: _barMaximum
+ value: _activeVehicle ? _activeVehicle.vibration.zAxis.value : 0
+ }
+
+ QGCLabel {
+ anchors.horizontalCenter: zBar.horizontalCenter
+ text: "Z"
+ }
+ }
+ } // Row
+
+ // Max vibe indication line at 60
+ Rectangle {
+ anchors.topMargin: xBar.height * (1.0 - ((_barBadValue - _barMinimum) / (_barMaximum - _barMinimum)))
+ anchors.top: barRow.top
+ anchors.left: barRow.left
+ anchors.right: barRow.right
+ width: barRow.width
+ height: 1
+ color: "red"
+ }
+
+ QGCLabel {
+ id: clipLabel
+ anchors.margins: _margins
+ anchors.left: barRow.right
+ anchors.right: parent.right
+ text: qsTr("Clip count")
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Column {
+ id: clipColumn
+ anchors.top: barRow.top
+ anchors.horizontalCenter: clipLabel.horizontalCenter
+
+ QGCLabel {
+ text: qsTr("Accel 1: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount1.valueString : "")
+ }
+
+ QGCLabel {
+ text: qsTr("Accel 2: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount2.valueString : "")
+ }
+
+ QGCLabel {
+ text: qsTr("Accel 3: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "")
+ }
+ }
+
+ // Not available overlay
+ Rectangle {
+ anchors.fill: parent
+ color: qgcPal.window
+ opacity: 0.75
+ visible: !_available
+
+ QGCLabel {
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: qsTr("Not Available")
+ }
+ }
+} // Item
diff --git a/src/FlightMap/Widgets/VibrationWidget.qml b/src/FlightMap/Widgets/VibrationWidget.qml
deleted file mode 100644
index 896d93a69efd963e5d280c2559d40c5ec2f0ce95..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/VibrationWidget.qml
+++ /dev/null
@@ -1,177 +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 QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-import QGroundControl.FactSystem 1.0
-import QGroundControl.Controllers 1.0
-import QGroundControl.Palette 1.0
-import QGroundControl 1.0
-
-QGCFlickable {
- id: _root
- height: Math.min(maxHeight, innerItem.height)
- contentHeight: innerItem.height
- flickableDirection: Flickable.VerticalFlick
- clip: true
-
- property color textColor
- property color backgroundColor
- property var maxHeight
-
- property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
- property real _margins: ScreenTools.defaultFontPixelWidth / 2
- property real _barWidth: Math.round(ScreenTools.defaultFontPixelWidth * 3)
-
- readonly property real _barMinimum: 0.0
- readonly property real _barMaximum: 90.0
- readonly property real _barBadValue: 60.0
-
- QGCPalette { id:qgcPal; colorGroupEnabled: true }
-
- MouseArea {
- anchors.fill: parent
- onClicked: showNextPage()
- }
-
- Item {
- id: innerItem
- width: parent.width
- height: barRow.y + barRow.height
-
- QGCLabel {
- id: title
- color: textColor
- text: qsTr("Vibe")
- anchors.horizontalCenter: barRow.horizontalCenter
- }
-
- Row {
- id: barRow
- anchors.margins: _margins
- anchors.top: title.bottom
- anchors.left: parent.left
- spacing: _margins
-
- Column {
- ProgressBar {
- id: xBar
- height: 50
- orientation: Qt.Vertical
- minimumValue: _barMinimum
- maximumValue: _barMaximum
- value: _activeVehicle ? _activeVehicle.vibration.xAxis.value : 0
- }
-
- QGCLabel {
- id: xBarLabel
- color: textColor
- text: "X"
- anchors.horizontalCenter: xBar.horizontalCenter
- }
- }
-
- Column {
- ProgressBar {
- id: yBar
- height: 50
- orientation: Qt.Vertical
- minimumValue: _barMinimum
- maximumValue: _barMaximum
- value: _activeVehicle ? _activeVehicle.vibration.yAxis.value : 0
- }
-
- QGCLabel {
- anchors.horizontalCenter: yBar.horizontalCenter
- color: textColor
- text: "Y"
- }
- }
-
- Column {
- ProgressBar {
- id: zBar
- height: 50
- orientation: Qt.Vertical
- minimumValue: _barMinimum
- maximumValue: _barMaximum
- value: _activeVehicle ? _activeVehicle.vibration.zAxis.value : 0
- }
-
- QGCLabel {
- anchors.horizontalCenter: zBar.horizontalCenter
- color: textColor
- text: "Z"
- }
- }
- } // Row
-
- // Max vibe indication line at 60
- Rectangle {
- anchors.topMargin: xBar.height * (1.0 - ((_barBadValue - _barMinimum) / (_barMaximum - _barMinimum)))
- anchors.top: barRow.top
- anchors.left: barRow.left
- anchors.right: barRow.right
- width: barRow.width
- height: 1
- color: "red"
- }
-
- QGCLabel {
- id: clipLabel
- anchors.margins: _margins
- anchors.left: barRow.right
- anchors.right: parent.right
- color: textColor
- text: qsTr("Clip count")
- horizontalAlignment: Text.AlignHCenter
- }
-
- Column {
- id: clipColumn
- anchors.top: barRow.top
- anchors.horizontalCenter: clipLabel.horizontalCenter
-
- QGCLabel {
- text: qsTr("Accel 1: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount1.valueString : "")
- color: textColor
- }
-
- QGCLabel {
- text: qsTr("Accel 2: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount2.valueString : "")
- color: textColor
- }
-
- QGCLabel {
- text: qsTr("Accel 3: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "")
- color: textColor
- }
- }
-
- // Not available overlay
- Rectangle {
- anchors.fill: parent
- color: backgroundColor
- opacity: 0.75
- visible: _activeVehicle ? isNaN(_activeVehicle.vibration.xAxis.value) : false
-
- QGCLabel {
- anchors.fill: parent
- text: qsTr("Not Available")
- color: textColor
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- } // Item
-} // QGCFLickable
diff --git a/src/FlightMap/qmldir b/src/FlightMap/qmldir
index c0c4f24b2a5195e186f1eb5aba323b0eef61501f..02dcde2206cf804bd831acdb26b57352a8c3706c 100644
--- a/src/FlightMap/qmldir
+++ b/src/FlightMap/qmldir
@@ -5,7 +5,6 @@ FlightMap 1.0 FlightMap.qml
QGCVideoBackground 1.0 QGCVideoBackground.qml
# Widgets
-CameraWidget 1.0 CameraWidget.qml
CenterMapDropButton 1.0 CenterMapDropButton.qml
CenterMapDropPanel 1.0 CenterMapDropPanel.qml
CompassRing 1.0 CompassRing.qml
@@ -17,9 +16,6 @@ QGCAttitudeHUD 1.0 QGCAttitudeHUD.qml
QGCAttitudeWidget 1.0 QGCAttitudeWidget.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
-ValuesWidget 1.0 ValuesWidget.qml
-VehicleHealthWidget 1.0 VehicleHealthWidget.qml
-VibrationWidget 1.0 VibrationWidget.qml
# Map items
CameraTriggerIndicator 1.0 CameraTriggerIndicator.qml
diff --git a/src/QmlControls/PageView.qml b/src/QmlControls/PageView.qml
new file mode 100644
index 0000000000000000000000000000000000000000..80196383c57ca0623df00631fa437cdf9047fc53
--- /dev/null
+++ b/src/QmlControls/PageView.qml
@@ -0,0 +1,71 @@
+import QtQuick 2.3
+import QtQuick.Controls 1.2
+import QtQuick.Layouts 1.2
+
+import QGroundControl 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.ScreenTools 1.0
+
+Rectangle {
+ id: _root
+ height: pageFlickable.y + pageFlickable.height + _margins
+ color: qgcPal.window
+
+ property var qgcView ///< QGCView to use for showing dialogs
+ property real maxHeight ///< Maximum height that should be taken, smaller than this is ok
+
+ property real _margins: ScreenTools.defaultFontPixelWidth / 2
+ property real _pageWidth: _root.width
+ property var _instrumentPages: QGroundControl.corePlugin.instrumentPages
+
+ QGCPalette { id:qgcPal; colorGroupEnabled: parent.enabled }
+
+ QGCComboBox {
+ id: pageCombo
+ anchors.left: parent.left
+ anchors.right: parent.right
+ model: _instrumentPages
+ textRole: "title"
+ centeredLabel: true
+ pointSize: ScreenTools.smallFontPointSize
+
+ Image {
+ anchors.leftMargin: _margins
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ source: qgcPal.globalTheme == QGCPalette.Light ? "/res/gear-black.svg" : "/res/gear-white.svg"
+ mipmap: true
+ width: parent.height -(_margins * 2)
+ sourceSize.width: width
+ fillMode: Image.PreserveAspectFit
+ visible: pageWidgetLoader.item.showSettingsIcon
+
+ QGCMouseArea {
+ fillItem: parent
+ onClicked: pageWidgetLoader.item.showSettings()
+ }
+ }
+ }
+
+ QGCFlickable {
+ id: pageFlickable
+ anchors.margins: _margins
+ anchors.top: pageCombo.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: Math.min(_maxHeight, pageWidgetLoader.height)
+ contentHeight: pageWidgetLoader.height
+ flickableDirection: Flickable.VerticalFlick
+ clip: true
+
+ property real _maxHeight: maxHeight - y - _margins
+
+ Loader {
+ id: pageWidgetLoader
+ source: _instrumentPages[pageCombo.currentIndex].url
+
+ property var qgcView: _root.qgcView
+ property real pageWidth: parent.width
+ }
+ }
+}
diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl.Controls.qmldir
index 6bff369b7595ca1779ca8ccc269c87a357d5bf2c..ee2a59064d9a97fe243c4fade18a27996c91c2a4 100644
--- a/src/QmlControls/QGroundControl.Controls.qmldir
+++ b/src/QmlControls/QGroundControl.Controls.qmldir
@@ -26,6 +26,7 @@ MissionItemStatus 1.0 MissionItemStatus.qml
ModeSwitchDisplay 1.0 ModeSwitchDisplay.qml
MultiRotorMotorDisplay 1.0 MultiRotorMotorDisplay.qml
NoMouseThroughRectangle 1.0 NoMouseThroughRectangle.qml
+PageView 1.0 PageView.qml
ParameterEditor 1.0 ParameterEditor.qml
ParameterEditorDialog 1.0 ParameterEditorDialog.qml
PlanToolBar 1.0 PlanToolBar.qml