Add onscreenapp
[apps/onscreenapp.git] / sample / qml / system.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: onScreenSystem
9     visible: true
10     width: 1079
11     height: 400
12     scale: screenInfo.scale_factor()
13
14     function qmlOnScreenParameter(message) {
15         console.log(qsTr('OnScreenSys:QML:System >>> qmlOnScreenMessage.'), message);
16         var message_json = JSON.parse (message);
17         var text = message_json.text
18         label.text = text;
19     }
20
21     Image {
22         id : background_image
23         anchors.fill: parent
24         anchors.topMargin: 0
25         anchors.bottomMargin: 0
26         source: "images/oval_1079x400.png"
27     }
28
29     Label {
30         id: label
31         x: 40
32         y: 72
33         width: 1000
34         height: 100
35         color: "#eeeeec"
36         text: "system alert"
37         font.pixelSize: 50
38         textFormat: Text.AutoText
39         font.wordSpacing: 0
40         verticalAlignment: Text.AlignVCenter
41         horizontalAlignment: Text.AlignHCenter
42     }
43
44     Button {
45         id: button
46 //        x: 490
47 //        y: 250
48         anchors.top: label.bottom
49         anchors.topMargin: 100
50         anchors.horizontalCenter: parent.horizontalCenter
51         text: qsTr("OK")
52
53         onClicked: {
54 //            label.text = "system reject"
55             eventHandler.onScreenReply("OK");
56         }
57     }
58
59 }