initial commit
[profile/ivi/hfdialer.git] / qml / AbstractDialog.qml
1 /*
2  * dialer - QML User Interface Component
3  *
4  * Copyright (c) 2011, Tom Swindell.
5  *
6  * This program is licensed under the terms and conditions of the
7  * Apache License, version 2.0.  The full text of the Apache License is at
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  */
11
12 import Qt 4.7
13
14 Item {
15     id: root
16
17     anchors.fill: parent
18
19     states: [
20         State {
21             name: 'shown'
22             PropertyChanges {target: root; opacity: 1.0}
23         },
24         State {
25             name: 'hidden'
26             PropertyChanges {target: root; opacity: 0.0}
27         }
28     ]
29
30     Behavior on opacity {PropertyAnimation {duration: 250}}
31
32     Rectangle {
33         id: blind
34         anchors.fill: parent
35         color: 'black'
36         opacity: 0.7
37     }
38
39     MouseArea {
40         anchors.fill: parent
41         onPressed: {
42             root.state = 'hidden'
43         }
44     }
45 }