0.9beta
[feedingit] / src / qml / common / ConfirmationMessage.qml
1 import Qt 4.7
2
3 Rectangle {
4     id: confirmationMessage
5     signal okClicked
6     signal cancelClicked
7
8     property alias text: question.text
9
10     border.color: "black";
11     border.width : 4;
12     radius: 10;
13     color: "white"
14     height: 160;
15     width: 160;
16     z: 10;
17     anchors.fill: parent
18
19     Text {
20         id: question
21         text: qsTr("Are you sure?")
22         width: parent.width; height: 80
23         horizontalAlignment: Text.AlignHCenter
24         verticalAlignment: Text.AlignVCenter
25         anchors.top: parent.top
26         //anchors.bottom: parent.bottom
27         anchors.margins: 10;
28         //anchors.verticalCenter: parent.verticalCenter
29     }
30
31     Button {
32         id: ok
33         text: qsTr("OK")
34         anchors.left: parent.left; anchors.margins: 5; y: 3; width: 80; height: 60
35         anchors.top: question.bottom
36         //anchors.bottom: parent.bottom
37         onClicked: confirmationMessage.okClicked()
38     }
39
40     Button {
41         id: cancel
42         text: qsTr("Cancel")
43         anchors.right: parent.right; anchors.margins: 5; y: 3; width: 80; height: 60
44         anchors.top: question.bottom
45         //anchors.bottom: parent.bottom
46         anchors.left: ok.right
47         onClicked: confirmationMessage.cancelClicked()
48     }
49
50 }