diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 4c1deeab950f8315938b7259c8acf480ab478fac..521595b8a31879682174de30585c1fe9611aefda 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -235,7 +235,6 @@ src/FlightMap/Widgets/CompassRing.qml src/FlightMap/MapItems/CustomMapItems.qml src/FlightMap/FlightMap.qml - src/FlightMap/Widgets/InstrumentSwipeView.qml src/FlightMap/Widgets/MapFitFunctions.qml src/FlightMap/MapScale.qml src/FlightMap/MapItems/MissionItemIndicator.qml diff --git a/src/FlightDisplay/FlightDisplayViewWidgets.qml b/src/FlightDisplay/FlightDisplayViewWidgets.qml index 19e92a76672b9330e3f36ad78999d756b5fca472..f0174e409b059fc059738552198655f3e56e5ae2 100644 --- a/src/FlightDisplay/FlightDisplayViewWidgets.qml +++ b/src/FlightDisplay/FlightDisplayViewWidgets.qml @@ -22,15 +22,10 @@ import QGroundControl.Palette 1.0 import QGroundControl.Vehicle 1.0 import QGroundControl.FlightMap 1.0 -Column { - id: _root - spacing: ScreenTools.defaultFontPixelHeight * 0.25 +Loader { + width: parent.width + source: QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.rawValue ? + "qrc:/qml/QGCInstrumentWidgetAlternate.qml" : "qrc:/qml/QGCInstrumentWidget.qml" property var missionController - - Loader { - width: parent.width - source: QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.rawValue ? - "qrc:/qml/QGCInstrumentWidgetAlternate.qml" : "qrc:/qml/QGCInstrumentWidget.qml" - } } diff --git a/src/FlightMap/Widgets/InstrumentSwipeView.qml b/src/FlightMap/Widgets/InstrumentSwipeView.qml deleted file mode 100644 index c5aabec4b80bd73c4bcf063ecc91c76e2a48119b..0000000000000000000000000000000000000000 --- a/src/FlightMap/Widgets/InstrumentSwipeView.qml +++ /dev/null @@ -1,101 +0,0 @@ -import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.2 - -import QGroundControl.Palette 1.0 -import QGroundControl.ScreenTools 1.0 -import QGroundControl.FlightMap 1.0 - -Item { - id: _root - clip: true - height: column.height - - property color textColor - property color backgroundColor - property var maxHeight ///< Maximum height that should be taken, smaller than this is ok - - property real _margins: ScreenTools.defaultFontPixelWidth / 2 - property real _pageWidth: _root.width - property int _currentPage: 0 - property int _maxPage: 3 - - onWidthChanged: showPage(_currentPage) - - function showPicker() { - valuesPage.showPicker() - } - - function showPage(pageIndex) { - pageRow.x = -(pageIndex * _pageWidth) - _currentPage = pageIndex - } - - function showNextPage() { - if (_currentPage == _maxPage) { - _currentPage = 0 - } else { - _currentPage++ - } - showPage(_currentPage) - } - - function currentPage() { - return _currentPage - } - - MouseArea { - anchors.fill: parent - onClicked: showNextPage() - } - - Column { - id: column - anchors.left: parent.left - anchors.right: parent.right - - Row { - id: pageRow - ValuesWidget { - id: valuesPage - width: _pageWidth - textColor: _root.textColor - maxHeight: _root.maxHeight - } - CameraWidget { - width: _pageWidth - textColor: _root.textColor - maxHeight: _root.maxHeight - } - VehicleHealthWidget { - width: _pageWidth - textColor: _root.textColor - maxHeight: _root.maxHeight - } - VibrationWidget { - width: _pageWidth - textColor: _root.textColor - backgroundColor: _root.backgroundColor - maxHeight: _root.maxHeight - } - } - - Row { - anchors.horizontalCenter: parent.horizontalCenter - spacing: _margins - - Repeater { - model: _maxPage + 1 - - Rectangle { - height: radius * 2 - width: radius * 2 - radius: ScreenTools.defaultFontPixelWidth / 3 - border.color: textColor - border.width: 1 - color: _currentPage == index ? textColor : "transparent" - } - } - } - } -} diff --git a/src/QmlControls/QGroundControl/FlightMap/qmldir b/src/QmlControls/QGroundControl/FlightMap/qmldir index bf52d1de4a402525e361c8425248c468cb2ab0cb..7e0b19c162c9bf2dc8cd93b4fa1153dc21a84860 100644 --- a/src/QmlControls/QGroundControl/FlightMap/qmldir +++ b/src/QmlControls/QGroundControl/FlightMap/qmldir @@ -8,7 +8,6 @@ QGCVideoBackground 1.0 QGCVideoBackground.qml CenterMapDropButton 1.0 CenterMapDropButton.qml CenterMapDropPanel 1.0 CenterMapDropPanel.qml CompassRing 1.0 CompassRing.qml -InstrumentSwipeView 1.0 InstrumentSwipeView.qml MapFitFunctions 1.0 MapFitFunctions.qml MapLineArrow 1.0 MapLineArrow.qml MapScale 1.0 MapScale.qml