From aee1b69e8e207081a3d8b2670980671a9fbc78b8 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Wed, 13 Feb 2019 18:10:20 +0800 Subject: Add onscreenapp Onscreenapp is a qt application for showing onscreens. Applications can show/hide onscreen by calling homescreen-service's showWindow/hideWindow verb. Applications also can customize onscreen's title,type, display contents and buttons. Some images about onscreen pattern had uploaded in JIRA SPEC-1967. Bug-AGL: SPEC-1967 Change-Id: I421193f7d089584a26db629be27414d050a74337 Signed-off-by: wang_zhiqiang --- sample/qml/msg.qml | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sample/qml/msg.qml (limited to 'sample/qml/msg.qml') diff --git a/sample/qml/msg.qml b/sample/qml/msg.qml new file mode 100644 index 0000000..f89ffa0 --- /dev/null +++ b/sample/qml/msg.qml @@ -0,0 +1,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"); + } + } + } + +} -- cgit 1.2.3-korg