2 * Copyright 2012 Intel Corporation.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
11 import 'javascripts/framework.js' as Support
20 property string callDuration: "00:00:00"
21 property string callerLabelText: "Unknown Caller"
22 state : 'disconnected'
25 console.log("*** call changed in large, before if")
26 if(call && call.msisdn) {
27 console.log("*** in calllarge if >> " + call.state );
29 root.state = call.state
32 root.callerLabelText = call.name;
36 if (call.numberLen <= 10)
38 root.callerLabelText = call.msisdn[0] + call.msisdn[1] + call.msisdn[2] + '-' +
39 call.msisdn[3] + call.msisdn[4] + call.msisdn[5] + '-' +
40 call.msisdn[6] + call.msisdn[7] + call.msisdn[8] + call.msisdn[9];
43 root.callerLabelText = call.msisdn;
49 interval: 1000; repeat: true; running: true;
53 if(call.duration && call.duration > 0)
55 callDuration = Support.friendlyInterval(call.duration);
64 PropertyChanges {target: root; callDuration: "00:00:00"}
65 PropertyChanges {target: answerButton; visible: false}
66 PropertyChanges {target: hangupButton; visible: true; width: parent.width}
67 PropertyChanges {target: stateInd; text: qsTr("Active")}
72 PropertyChanges {target: answerButton; visible: false}
73 PropertyChanges {target: hangupButton; visible: true; width: parent.width}
74 PropertyChanges {target: stateInd; text: qsTr("Held")}
79 PropertyChanges {target: root; callDuration: "00:00:00"}
80 PropertyChanges {target: answerButton; visible: false}
81 PropertyChanges {target: hangupButton; visible: true; width: parent.width}
82 PropertyChanges {target: stateInd; text: qsTr("Dialing...")}
87 PropertyChanges {target: answerButton; visible: false}
88 PropertyChanges {target: hangupButton; visible: true; width: parent.width}
89 PropertyChanges {target: stateInd; text: qsTr("Alerting...")}
94 PropertyChanges {target: root; callDuration: "00:00:00"}
95 PropertyChanges {target: answerButton; visible: true}
96 PropertyChanges {target: hangupButton; visible: true; width: parent.width * 0.45}
97 PropertyChanges {target: stateInd; text: qsTr("Incoming...")}
102 PropertyChanges {target: answerButton; visible: false}
103 PropertyChanges {target: hangupButton; visible: true; width: parent.width}
104 PropertyChanges {target: stateInd; text: qsTr("Waiting...")}
109 PropertyChanges {target: callDurationInd; text: "00:00:00"}
110 PropertyChanges {target: answerButton; visible: false}
111 PropertyChanges {target: hangupButton; visible: false}
112 PropertyChanges {target: stateInd; text: qsTr("Disconnected")}
119 anchors {top: parent.top; topMargin: 20; horizontalCenter: parent.horizontalCenter}
122 text: qsTr("Disconnected")
128 anchors {top: stateInd.bottom; topMargin: 20; horizontalCenter: parent.horizontalCenter}
131 text: callerLabelText
137 source: "/usr/share/hfdialer/images/ivi_icon-time.png"
138 anchors { right: callDurationInd.left; rightMargin: 2; bottom: callerInd.top}
147 anchors {bottom: callerInd.top; right: parent.right; topMargin: 10; rightMargin: parent.width * 0.2}
156 anchors {top: callerInd.bottom; topMargin: 15; left: parent.left; leftMargin: parent.width * 0.2; right: parent.right; rightMargin: parent.width * 0.2}
158 width: parent.width * 0.75
165 width: parent.width *0.45
166 anchors {left: parent.left;}
167 source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
171 width: 40; height: width
172 anchors.centerIn: parent
174 source: "/usr/share/hfdialer/images/ivi_icon-call.png"
182 answerButton.source = "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept-active.png"
186 answerButton.source = "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
190 console.log("*** QML *** :: Answering call");
191 adapter.currentCall.answer();
200 width: parent.width * 0.45
201 anchors {right: parent.right;}
202 source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-decline.png"
206 width: 40; height: width
207 anchors.centerIn: parent
209 source: "/usr/share/hfdialer/images/ivi_icon-endcall.png"
217 hangupButton.source = "/usr/share/hfdialer/images/ivi_btn-incomingcall-decline-active.png"
221 hangupButton.source = "/usr/share/hfdialer/images/ivi_btn-incomingcall-decline.png"
225 console.log("*** QML *** :: Hanging up call");
226 root.parent.state = 'disconnected'
228 root.state = 'disconnected'
229 root.parent.parent.state = 'disconnected'
230 if (root.parent.parent.call)
231 root.parent.parent.call = null