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
16 signal replyRequestPidCode(string reply)
17 signal cancelRequest()
18 property string deviceName
19 property string replyValue: legacyPairing ? "0000" : Math.floor(Math.random()*999999)
20 property bool legacyPairing: false
23 width: parent.width - 15
24 anchors {centerIn: parent}
29 text: qsTr("Enter the following code on %1").arg(deviceName)
31 wrapMode: Text.WordWrap
32 horizontalAlignment: Text.AlignHCenter
41 anchors.horizontalCenter: parent.horizontalCenter
49 anchors.centerIn: parent
51 height: parent.height * 0.75
55 horizontalAlignment: Text.AlignHCenter
61 anchors.horizontalCenter: parent.horizontalCenter
68 source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
69 width: buttonGroup.width / 2 - 5
75 console.log(deviceName + " replying with key: " + textInputField.text)
76 replyRequestPidCode(textInputField.text);
83 anchors.centerIn:parent
84 horizontalAlignment: Text.AlignHCenter
92 source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-decline.png"
93 width: buttonGroup.width / 2 - 5
99 console.log(deviceName + " replying with key: " + textInputField.text)
107 anchors.centerIn:parent
108 horizontalAlignment: Text.AlignHCenter
118 ///we do this because this property is actually set post onCompleted:
119 onLegacyPairingChanged: {
120 console.log("legacy pair? " + legacyPairing)
122 replyRequestPidCode(textInputField.text);
123 console.log(deviceName + " replying with key: " + replyValue)