summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideo/qmlvideo/CameraDummy.qml
blob: c9d14e595cafaacd515a5c47e7fb70064f80739b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Controls

// Item which is loaded by CameraItem if Qt Multimedia is not available
Rectangle {
    id: root
    color: "grey"
    height: width

    signal fatalError
    signal sizeChanged
    signal framePainted

    Label {
        anchors.fill: parent
        anchors.margins: 10
        horizontalAlignment: Text.AlignHCenter
        text: qsTr("Failed to create Camera item\n\nCheck that Qt Multimedia is installed")
        verticalAlignment: Text.AlignVCenter
        wrapMode: Text.Wrap
    }

    onWidthChanged: height = width
    onHeightChanged: root.sizeChanged()

    function start() { }
    function stop() { }
}