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