summaryrefslogtreecommitdiffstats
path: root/sample/qml/msg.qml
blob: f89ffa0bafffb18b2b9911e68de2ebc6c318cbf5 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0

Item {
    id: onScreenMsg
    visible: true
    width: 1079
    height: 400
    scale: screenInfo.scale_factor()

    function qmlOnScreenParameter(message) {
        console.log(qsTr('OnScreenVICS:QML:System >>> qmlOnScreenMessage.'), message);
        var message_json = JSON.parse (message);
        data1.text = message_json.data1;
        data2.text = message_json.data2;
        data3.text = message_json.data3;
    }

    RowLayout {
        id: line1
        x: 40
        y: 72
        width: 1000
        height: 200
        spacing: 20
        Label {
            id: data1
            color: "#eeeeec"
            text: "show data1"
            font.pixelSize: 20
            textFormat: Text.AutoText
            font.wordSpacing: 0
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

        Label {
            id: data2
            color: "#eeeeec"
            text: "show data2"
            font.pixelSize: 20
            textFormat: Text.AutoText
            font.wordSpacing: 0
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

        Label {
            id: data3
            color: "#eeeeec"
            text: "show data3"
            font.pixelSize: 20
            textFormat: Text.AutoText
            font.wordSpacing: 0
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

    }

    RowLayout {
        anchors.top: line1.bottom
        anchors.topMargin: 60
        anchors.horizontalCenter: parent.horizontalCenter
        Button {
            id: button1
            text: qsTr("Button1")
            onClicked: {
                eventHandler.onScreenReply("Button1");
            }
        }
        Button {
            id: button2
            text: qsTr("Button2")
            onClicked: {
                eventHandler.onScreenReply("Button2");
            }
        }
        Button {
            id: button3
            text: qsTr("Button3")
            onClicked: {
                eventHandler.onScreenReply("Button3");
            }
        }
    }

}