FlightDisplayViewVideo.qml 1.91 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.
 *
 ****************************************************************************/
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


import QtQuick                      2.4
import QtQuick.Controls             1.3

import QGroundControl               1.0
import QGroundControl.FlightDisplay 1.0
import QGroundControl.FlightMap     1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.Vehicle       1.0
import QGroundControl.Controllers   1.0


dogmaphobic's avatar
dogmaphobic committed
24 25
Item {
    id: root
26
    property double _ar: QGroundControl.settingsManager.videoSettings.aspectRatio.rawValue
dogmaphobic's avatar
dogmaphobic committed
27 28 29
    Rectangle {
        id:             noVideo
        anchors.fill:   parent
dogmaphobic's avatar
dogmaphobic committed
30
        color:          Qt.rgba(0,0,0,0.75)
31
        visible:        !QGroundControl.videoManager.videoRunning
dogmaphobic's avatar
dogmaphobic committed
32
        QGCLabel {
33
            text:               qsTr("WAITING FOR VIDEO")
34
            font.family:        ScreenTools.demiboldFontFamily
dogmaphobic's avatar
dogmaphobic committed
35
            color:              "white"
dogmaphobic's avatar
dogmaphobic committed
36
            font.pointSize:     _mainIsMap ? ScreenTools.smallFontPointSize : ScreenTools.largeFontPointSize
dogmaphobic's avatar
dogmaphobic committed
37 38 39
            anchors.centerIn:   parent
        }
    }
40
    Rectangle {
dogmaphobic's avatar
dogmaphobic committed
41
        anchors.fill:   parent
42
        color:          "black"
43
        visible:        QGroundControl.videoManager.videoRunning
44 45 46 47 48 49 50
        QGCVideoBackground {
            height:         parent.height
            width:          _ar != 0.0 ? height * _ar : parent.width
            anchors.centerIn: parent
            display:        QGroundControl.videoManager.videoSurface
            receiver:       QGroundControl.videoManager.videoReceiver
            visible:        QGroundControl.videoManager.videoRunning
dogmaphobic's avatar
dogmaphobic committed
51
        }
52 53
    }
}