2 * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 import QtQuick.Window 2.2
19 import QtQuick.Layouts 1.1
20 import QtQuick.Controls 2.0
21 import AGL.Demo.Controls 1.0
30 // function qmlOnScreenMessage(text) {
31 // console.log(qsTr('OnScreenApp >>> qmlOnScreenMessage.'));
32 // if(text == "incoming call")
34 // label.text = "incoming call";
35 // answerButton.active = true;
36 // answerButton.checked = false;
38 // else if(text == "call answered")
40 // label.text = "call answered";
41 // answerButton.active = false;
42 // answerButton.checked = true;
44 // else if(text == "call rejected")
46 // label.text = "call rejected";
47 // answerButton.active = false;
48 // answerButton.checked = true;
52 function qmlOnScreenMessage(text) {
53 console.log(qsTr('OnScreenApp >>> qmlOnScreenMessage.'));
54 if (osLoader.status == Loader.Ready) {
55 if (osLoader.item && osLoader.item.qmlOnScreenMessage) {
56 osLoader.item.qmlOnScreenMessage(text);
61 function qmlLoader(url) {
62 console.log(qsTr('OnScreenApp >>> qmlLoader load ' + url));
63 osLoader.source = url;
66 function qmlSetClearBackgroud() {
67 console.log(qsTr('OnScreenApp >>> qmlSetClearBackgroud.'));
68 background_image.source = "";
69 default_label.text = "";
72 function qmlSetDefaultBackground(message) {
73 console.log(qsTr('OnScreenApp >>> qmlSetDefaultBackground.'));
74 background_image.source = "qrc:/images/HMI_Phone_Back.svg";
75 default_label.text = message;
82 anchors.bottomMargin: 0
83 // source: "qrc:/images/HMI_Phone_Back.svg"
93 text: "default message"
94 textFormat: Text.AutoText
96 verticalAlignment: Text.AlignVCenter
97 horizontalAlignment: Text.AlignHCenter
102 objectName: "loaderObject"