add sample code
[apps/onscreenapp.git] / sample / app / main.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
6 ApplicationWindow {
7     id: root
8
9     ColumnLayout {
10         RowLayout {
11             Button {
12                 text: "incoming call";
13                 onClicked: {
14                     homescreenHandler.onScreenMessage("{\"app\":\"Phone\", \"message\":\"incoming call\", \"file\":\"qrc:/phone.qml\", \"mask\":\":/images/star_1079x400.png\"}");
15                 }
16             }
17
18             Button {
19                 text: "call rejected";
20                 onClicked: {
21                     homescreenHandler.onScreenMessage("{\"app\":\"Phone\", \"message\":\"call rejected\", \"file\":\"qrc:/phone.qml\", \"mask\":\":/images/star_1079x400.png\"}");
22                 }
23             }
24         }
25         RowLayout {
26             Button {
27                 text: "system error";
28                 onClicked: {
29                     homescreenHandler.onScreenMessage("{\"app\":\"System\", \"message\":\"error\", \"file\":\"qrc:/system.qml\", \"mask\":\":/images/oval_1079x400.png\"}");
30                 }
31             }
32
33             Button {
34                 text: "system rejected";
35                 onClicked: {
36                     homescreenHandler.onScreenMessage("{\"app\":\"System\", \"message\":\"rejected\", \"file\":\"qrc:/system.qml\", \"mask\":\":/images/oval_1079x400.png\"}");
37                 }
38             }
39         }
40     }
41 }