initial commit
[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
21 Column {
22     width: parent.width - 15
23     spacing: 10
24
25     Text {
26         id: textlabel
27         anchors.horizontalCenter: parent.horizontalCenter
28         text: qsTr("Enter passcode to use:")
29         wrapMode: Text.WordWrap
30         horizontalAlignment: Text.AlignHCenter
31         width: parent.width
32         font.pixelSize: 24
33         color: "white"
34     }
35
36     Rectangle {
37         id: textInput
38         anchors.horizontalCenter: parent.horizontalCenter
39         height: 40
40         width: parent.width
41         color: "white"
42         radius: 5
43
44         TextEdit {
45             id: textInputField           
46             anchors.centerIn: parent
47             width: parent.width
48             height: parent.height * 0.75
49             font.pixelSize: 24
50             color: "black"
51             text: replyValue
52             horizontalAlignment: Text.AlignHCenter
53         }
54     }
55
56    Image {
57         id: acceptButton
58         source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
59         anchors.horizontalCenter: parent.horizontalCenter
60         width: textInput.width
61         height: 50
62
63         MouseArea {
64               id: mouseArea
65               anchors.fill: parent
66
67         onClicked: {
68             nearbyDevicesModel.replyRequestPasskey(textInputField.text);
69             }
70         }
71     }
72
73    Text {
74         id: text
75         text: qsTr("Accept")
76         anchors.centerIn:parent
77         horizontalAlignment: Text.AlignHCenter
78         font.pixelSize: 20
79         color: "white"
80     }
81 }
82 }