summaryrefslogtreecommitdiffstats
path: root/sample/package/qml
diff options
context:
space:
mode:
Diffstat (limited to 'sample/package/qml')
-rw-r--r--sample/package/qml/images/answer.pngbin0 -> 2688 bytes
-rw-r--r--sample/package/qml/images/disable.pngbin0 -> 2714 bytes
-rw-r--r--sample/package/qml/images/heart_1079x400.pngbin0 -> 20429 bytes
-rw-r--r--sample/package/qml/images/images.qrc9
-rw-r--r--sample/package/qml/images/oval_1079x400.pngbin0 -> 18800 bytes
-rw-r--r--sample/package/qml/images/reject.pngbin0 -> 4820 bytes
-rw-r--r--sample/package/qml/msg.qml91
-rw-r--r--sample/package/qml/phone.qml118
-rw-r--r--sample/package/qml/system.qml59
-rw-r--r--sample/package/qml/vics.qml47
10 files changed, 324 insertions, 0 deletions
diff --git a/sample/package/qml/images/answer.png b/sample/package/qml/images/answer.png
new file mode 100644
index 0000000..4707a23
--- /dev/null
+++ b/sample/package/qml/images/answer.png
Binary files differ
diff --git a/sample/package/qml/images/disable.png b/sample/package/qml/images/disable.png
new file mode 100644
index 0000000..8c08c03
--- /dev/null
+++ b/sample/package/qml/images/disable.png
Binary files differ
diff --git a/sample/package/qml/images/heart_1079x400.png b/sample/package/qml/images/heart_1079x400.png
new file mode 100644
index 0000000..e1fe683
--- /dev/null
+++ b/sample/package/qml/images/heart_1079x400.png
Binary files differ
diff --git a/sample/package/qml/images/images.qrc b/sample/package/qml/images/images.qrc
new file mode 100644
index 0000000..b75641f
--- /dev/null
+++ b/sample/package/qml/images/images.qrc
@@ -0,0 +1,9 @@
+<RCC>
+ <qresource prefix="/images">
+ <file>oval_1079x400.png</file>
+ <file>heart_1079x400.png</file>
+ <file>answer.png</file>
+ <file>reject.png</file>
+ <file>disable.png</file>
+ </qresource>
+</RCC>
diff --git a/sample/package/qml/images/oval_1079x400.png b/sample/package/qml/images/oval_1079x400.png
new file mode 100644
index 0000000..fb850df
--- /dev/null
+++ b/sample/package/qml/images/oval_1079x400.png
Binary files differ
diff --git a/sample/package/qml/images/reject.png b/sample/package/qml/images/reject.png
new file mode 100644
index 0000000..d6586e1
--- /dev/null
+++ b/sample/package/qml/images/reject.png
Binary files differ
diff --git a/sample/package/qml/msg.qml b/sample/package/qml/msg.qml
new file mode 100644
index 0000000..f89ffa0
--- /dev/null
+++ b/sample/package/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");
+ }
+ }
+ }
+
+}
diff --git a/sample/package/qml/phone.qml b/sample/package/qml/phone.qml
new file mode 100644
index 0000000..1b25ed3
--- /dev/null
+++ b/sample/package/qml/phone.qml
@@ -0,0 +1,118 @@
+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: onScreenPhone
+ visible: true
+ width: 1079
+ height: 400
+ scale: screenInfo.scale_factor()
+ property string messageText: "Incoming Call"
+
+ function qmlOnScreenParameter(message) {
+ console.log(qsTr('OnScreenApp:QML:Phone >>> qmlOnScreenParameter.'), message);
+ var message_json = JSON.parse (message);
+ var text = message_json.status
+
+ if(text === "incoming call")
+ {
+ messageText = "Incoming Call";
+ answerButton.active = true;
+ answerButton.checked = false;
+ }
+ else if(text === "call answered")
+ {
+ messageText = "Call Answered";
+ answerButton.active = false;
+ answerButton.checked = true;
+ }
+ else if(text === "call rejected")
+ {
+ messageText = "Call Rejected";
+ answerButton.active = false;
+ answerButton.checked = true;
+ }
+ else {
+ messageText = text;
+ }
+ }
+
+ Image {
+ id : background_image
+ anchors.fill: parent
+ anchors.topMargin: 0
+ anchors.bottomMargin: 0
+ source: "images/heart_1079x400.png"
+ }
+
+ ToggleButton {
+ id: answerButton
+ x: 53
+ y: 147
+ width: 228
+ height: 230
+ onImage: 'images/disable.png'
+ offImage: 'images/answer.png'
+ property bool active: true
+
+ onCheckedChanged: {
+ if(!checked && !active) {
+ checked = true;
+ }
+ if(active && checked)
+ {
+ messageText = "Call Answer"
+ eventHandler.onScreenReply("call answer");
+ active = false;
+ }
+ }
+ }
+
+ ImageButton {
+ id: rejectButton
+ x: 804
+ y: 142
+ width: 228
+ height: 230
+ offImage: 'images/reject.png'
+
+ onClicked: {
+ messageText = "Call Reject"
+ eventHandler.onScreenReply("call reject");
+ }
+ }
+
+ Label {
+ x: 400
+ y: 115
+ width: 280
+ height: 100
+ color: "#000000"
+ text: messageText
+ textFormat: Text.AutoText
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 50
+ font.weight: Font.ExtraBold
+ }
+
+ Label {
+ x: 395
+ y: 112
+ width: 280
+ height: 100
+ color: "#6BFBFF"
+ text: messageText
+ textFormat: Text.AutoText
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 50
+ font.weight: Font.DemiBold
+ }
+
+}
diff --git a/sample/package/qml/system.qml b/sample/package/qml/system.qml
new file mode 100644
index 0000000..d42eeb7
--- /dev/null
+++ b/sample/package/qml/system.qml
@@ -0,0 +1,59 @@
+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: onScreenSystem
+ visible: true
+ width: 1079
+ height: 400
+ scale: screenInfo.scale_factor()
+
+ function qmlOnScreenParameter(message) {
+ console.log(qsTr('OnScreenSys:QML:System >>> qmlOnScreenMessage.'), message);
+ var message_json = JSON.parse (message);
+ var text = message_json.text
+ label.text = text;
+ }
+
+ Image {
+ id : background_image
+ anchors.fill: parent
+ anchors.topMargin: 0
+ anchors.bottomMargin: 0
+ source: "images/oval_1079x400.png"
+ }
+
+ Label {
+ id: label
+ x: 40
+ y: 72
+ width: 1000
+ height: 100
+ color: "#eeeeec"
+ text: "system alert"
+ font.pixelSize: 50
+ textFormat: Text.AutoText
+ font.wordSpacing: 0
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Button {
+ id: button
+// x: 490
+// y: 250
+ anchors.top: label.bottom
+ anchors.topMargin: 100
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("OK")
+
+ onClicked: {
+// label.text = "system reject"
+ eventHandler.onScreenReply("OK");
+ }
+ }
+
+}
diff --git a/sample/package/qml/vics.qml b/sample/package/qml/vics.qml
new file mode 100644
index 0000000..2848fbc
--- /dev/null
+++ b/sample/package/qml/vics.qml
@@ -0,0 +1,47 @@
+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: onScreenVICS
+ 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);
+ vics_info.text = message_json.info;
+ }
+
+ Label {
+ id: vics_info
+ x: 40
+ y: 72
+ width: 1000
+ height: 200
+ color: "#eeeeec"
+ text: "show vics inofo"
+ font.pixelSize: 50
+ textFormat: Text.AutoText
+ font.wordSpacing: 0
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Button {
+ id: button
+ anchors.top: vics_info.bottom
+ anchors.topMargin: 100
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("OK")
+
+ onClicked: {
+ eventHandler.onScreenReply("OK");
+ }
+ }
+
+}