hfdialer has been made a singleton and will only start one
[profile/ivi/hfdialer.git] / qml / RequestpasskeyDialog.qml
1 /*
2  * Copyright 2012 Intel Corporation.
3  *
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
7  */
8
9 import Qt 4.7
10
11 Rectangle {
12     id: root
13     anchors.fill: parent
14     color: "#51504F"
15
16
17     signal replyRequestPasskey(int reply)
18     property string deviceName
19
20     Component.onCompleted: {
21         numPad.pidRequest = true
22         numPad.pidEdit = textInputField
23     }
24
25 Column {
26     width: parent.width - 15
27     spacing: 10
28
29     Text {
30         id: textlabel
31         anchors.horizontalCenter: parent.horizontalCenter
32         text: qsTr("Enter passcode to use:")
33         wrapMode: Text.WordWrap
34         horizontalAlignment: Text.AlignHCenter
35         width: parent.width
36         font.pixelSize: 24
37         color: "white"
38     }
39
40     Rectangle {
41         id: textInput
42         anchors.horizontalCenter: parent.horizontalCenter
43         height: 40
44         width: parent.width
45         color: "white"
46         radius: 5
47
48         TextInput {
49             id: textInputField           
50             anchors.centerIn: parent
51             width: parent.width
52             height: parent.height * 0.75
53             font.pixelSize: 24
54             color: "black"
55             text: replyValue
56             horizontalAlignment: Text.AlignHCenter
57             activeFocusOnPress: false
58         }
59     }
60
61    Image {
62         id: acceptButton
63         source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
64         anchors.horizontalCenter: parent.horizontalCenter
65         width: textInput.width
66         height: 50
67
68         MouseArea {
69               id: mouseArea
70               anchors.fill: parent
71
72         onClicked: {
73             numPad.pidRequest = false
74             nearbyDevicesModel.replyRequestPasskey(textInputField.text);
75             }
76         }
77     }
78
79    Text {
80         id: text
81         text: qsTr("Accept")
82         anchors.centerIn:parent
83         horizontalAlignment: Text.AlignHCenter
84         font.pixelSize: 20
85         color: "white"
86     }
87 }
88 }