hfdialer has been made a singleton and will only start one
[profile/ivi/hfdialer.git] / qml / RequestConfirmDialog.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     property string deviceName: ""
17     property string key: ""
18     signal replyRequestConfirmation(bool reply)
19
20 Column {
21     id: container
22     width: parent.width - 15
23     anchors {centerIn: parent}
24     spacing: 10
25     Component.onCompleted: {
26         console.log("request confirm dialog height: " + container.height + " width = " + container.width + " name = " + root.deviceName + " code = " + root.key)
27     }
28
29     Text {
30         id: textlabel
31         width: parent.width
32         height: paintedHeight
33         horizontalAlignment: Text.AlignHCenter
34         text: qsTr("Pair with %1 with key %2?").arg(root.deviceName).arg(root.key)
35         wrapMode: Text.WordWrap
36         font.pixelSize: 24
37         color: "White"
38     }
39
40     Row {
41         id: buttonGroup
42         anchors.horizontalCenter: parent.horizontalCenter
43         spacing: 10
44         height: 50
45
46         Image {
47             id: acceptButton
48             source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-accept.png"
49             height: parent.height
50             width:  root.width / 2 - 20
51
52             MouseArea {
53                   anchors.fill: parent
54             onClicked: {
55                 replyRequestConfirmation(true);
56             }
57             }
58             Text {
59                  text: qsTr("Accept")
60                  anchors.centerIn:parent
61                  font.pointSize: 14
62                  color: "white"
63              }
64         }
65
66         Image {
67             id: rejectButton
68             source: "/usr/share/hfdialer/images/ivi_btn-incomingcall-decline.png"
69
70             height: parent.height
71             width:  root.width / 2 - 20
72
73             MouseArea {
74                   anchors.fill: parent
75             onClicked: {
76                 replyRequestConfirmation(false);
77             }
78             }
79
80             Text {                 
81                  text: qsTr("Reject")
82                  anchors.centerIn:parent
83                  font.pointSize: 14
84                  color: "white"
85              }
86         }
87     }
88
89 }
90 }