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


11 12
import QtQuick                  2.3
import QtQuick.Controls         1.2
13
import QtQuick.Controls.Styles  1.4
14
import QtQuick.Dialogs          1.2
dogmaphobic's avatar
dogmaphobic committed
15

16 17 18 19 20 21 22
import QGroundControl                       1.0
import QGroundControl.Controls              1.0
import QGroundControl.FactSystem            1.0
import QGroundControl.FactControls          1.0
import QGroundControl.Palette               1.0
import QGroundControl.Controllers           1.0
import QGroundControl.ScreenTools           1.0
dogmaphobic's avatar
dogmaphobic committed
23 24 25 26 27

QGCView {
    id:         qgcView
    viewPanel:  panel

28
    property var _activeVehicle:  QGroundControl.multiVehicleManager.activeVehicle
dogmaphobic's avatar
dogmaphobic committed
29 30 31 32 33 34 35 36 37

    QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }

    QGCViewPanel {
        id:             panel
        anchors.fill:   parent

        QGCLabel {
            id:             titleLabel
38
            text:           qsTr("PX4Flow Camera")
39
            font.family:    ScreenTools.demiboldFontFamily
dogmaphobic's avatar
dogmaphobic committed
40 41 42 43 44 45 46 47 48 49 50 51
        }

        Image {
            source:     _activeVehicle ? "image://QGCImages/" + _activeVehicle.id + "/" + _activeVehicle.flowImageIndex : ""
            width:      parent.width * 0.5
            height:     width * 0.75
            cache:      false
            anchors.centerIn: parent
            fillMode: Image.PreserveAspectFit
        }
    }
}