From 232cd4a115f5dc4d7270d53b95cb0b03c68fbbfe Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Sun, 25 Oct 2015 23:52:47 -0400 Subject: [PATCH] Missing file in last push --- src/FlightMap/Widgets/QGCInstrumentWidget.qml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/FlightMap/Widgets/QGCInstrumentWidget.qml diff --git a/src/FlightMap/Widgets/QGCInstrumentWidget.qml b/src/FlightMap/Widgets/QGCInstrumentWidget.qml new file mode 100644 index 000000000..cb1c15689 --- /dev/null +++ b/src/FlightMap/Widgets/QGCInstrumentWidget.qml @@ -0,0 +1,72 @@ +/*===================================================================== + +QGroundControl Open Source Ground Control Station + +(c) 2009, 2015 QGROUNDCONTROL PROJECT + +This file is part of the QGROUNDCONTROL project + + QGROUNDCONTROL is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + QGROUNDCONTROL is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with QGROUNDCONTROL. If not, see . + +======================================================================*/ + +/** + * @file + * @brief QGC Compass Widget + * @author Gus Grubba + */ + +import QtQuick 2.4 + +import QGroundControl.Controls 1.0 +import QGroundControl.ScreenTools 1.0 + +Item { + id: root + height: size + + property alias heading: compass.heading + property alias active: attitude.active + property alias rollAngle: attitude.rollAngle + property alias pitchAngle: attitude.pitchAngle + property real size: ScreenTools.defaultFontPixelSize * (10) + + Rectangle { + id: instrumentPannel + anchors.left: parent.left + anchors.bottom: parent.bottom + height: root.size + width: instruments.width + 8 + radius: root.size / 2 + color: Qt.rgba(0,0,0,0.5) + + Row { + id: instruments + height: parent.height + spacing: 4 + anchors.horizontalCenter: parent.horizontalCenter + QGCAttitudeWidget { + id: attitude + size: parent.height * 0.9 + anchors.verticalCenter: parent.verticalCenter + } + QGCCompassWidget { + id: compass + size: parent.height * 0.9 + anchors.verticalCenter: parent.verticalCenter + } + } + + } +} -- 2.22.0