Add onscreenapp
[apps/onscreenapp.git] / sample / qml / vics.qml
1 import QtQuick 2.6
2 import QtQuick.Window 2.2
3 import QtQuick.Layouts 1.1
4 import QtQuick.Controls 2.0
5 import AGL.Demo.Controls 1.0
6
7 Item {
8     id: onScreenVICS
9     visible: true
10     width: 1079
11     height: 400
12     scale: screenInfo.scale_factor()
13
14     function qmlOnScreenParameter(message) {
15         console.log(qsTr('OnScreenVICS:QML:System >>> qmlOnScreenMessage.'), message);
16         var message_json = JSON.parse (message);
17         vics_info.text = message_json.info;
18     }
19
20     Label {
21         id: vics_info
22         x: 40
23         y: 72
24         width: 1000
25         height: 200
26         color: "#eeeeec"
27         text: "show vics inofo"
28         font.pixelSize: 50
29         textFormat: Text.AutoText
30         font.wordSpacing: 0
31         verticalAlignment: Text.AlignVCenter
32         horizontalAlignment: Text.AlignHCenter
33     }
34
35     Button {
36         id: button
37         anchors.top: vics_info.bottom
38         anchors.topMargin: 100
39         anchors.horizontalCenter: parent.horizontalCenter
40         text: qsTr("OK")
41
42         onClicked: {
43             eventHandler.onScreenReply("OK");
44         }
45     }
46
47 }