QGCInstrumentWidgetAlternate.qml 1.92 KB
Newer Older
1 2
/****************************************************************************
 *
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
9 10


11
import QtQuick 2.3
12

13
import QGroundControl               1.0
14 15 16 17
import QGroundControl.Controls      1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.FactSystem    1.0
import QGroundControl.FlightMap     1.0
Don Gagne's avatar
Don Gagne committed
18
import QGroundControl.Palette       1.0
19 20

Rectangle {
Don Gagne's avatar
Don Gagne committed
21
    id:             root
22
    height:         _outerRadius * 4 + _valuesWidget.height
Don Gagne's avatar
Don Gagne committed
23 24
    radius:         _outerRadius
    color:          qgcPal.window
25

26 27 28 29 30 31 32
    // These properties are expected to be in the Loader
    //  property real maxHeight
    //  property bool showValues - true: show value pages

    property real   _innerRadius:   (width - (_topBottomMargin * 2)) / 2
    property real   _outerRadius:   _innerRadius + _topBottomMargin * 2
    property real   _margins:       (width * 0.05) / 2
Don Gagne's avatar
Don Gagne committed
33

34 35 36 37 38
    // Prevent all clicks from going through to lower layers
    DeadMouseArea {
        anchors.fill: parent
    }

Don Gagne's avatar
Don Gagne committed
39
    QGCPalette { id: qgcPal }
40 41

    QGCAttitudeWidget {
42 43 44 45 46 47
        id:                         attitude
        anchors.horizontalCenter:   parent.horizontalCenter
        anchors.margins :           _margins
        anchors.top:                parent.top
        size:                       _innerRadius * 2
        vehicle:                    globals.activeVehicle
48 49 50
    }

    QGCCompassWidget {
51 52 53 54 55 56
        id:                         compass
        anchors.horizontalCenter:   parent.horizontalCenter
        anchors.margins:            _margins
        anchors.top:                attitude.bottom
        size:                       _innerRadius * 2
        vehicle:                    globals.activeVehicle
Don Gagne's avatar
Don Gagne committed
57
    }
58
}