1
/** This file is part of Qt Media Hub**
3
Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).*
6
Contact: Nokia Corporation qmh-development@qt-project.org
8
You may use this file under the terms of the BSD license
11
Redistribution and use in source and binary forms, with or
12
without modification, are permitted provided that the following
14
* Redistributions of source code must retain the above copyright
15
notice, this list of conditions and the following disclaimer.
17
* Redistributions in binary form must reproduce the above copyright
18
notice, this list of conditions and the following disclaimer in the
19
documentation and/or other materials provided with the distribution.
21
* Neither the name of Nokia Corporation and its Subsidiary(-ies)
22
nor the names of its contributors may be used to endorse or promote
23
products derived from this software without specific prior
26
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
29
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
30
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
31
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **/
44
property alias title : titleBarText.text
45
default property alias content : content.children
52
width: 600 // arbitrary default
53
height: confluence.height
57
x = confluence.width - width
72
source: themeResourcePath + "/media/DialogBack.png"
73
border { top: 5; left: 5; bottom: 5; right: 5; }
79
anchors.top: panel.top
80
anchors.right: panel.right
81
anchors.left: panel.left
82
anchors.topMargin: panel.border.top + 40
83
anchors.rightMargin: 20
85
text: "Default dialog title"
88
horizontalAlignment: Text.AlignRight
94
anchors.top: titleBarText.bottom
95
anchors.bottom: panel.bottom
96
anchors.left: panel.left;
97
anchors.right: panel.right
98
anchors.topMargin: panel.border.top + 20
99
anchors.leftMargin : panel.border.left
100
anchors.bottomMargin : panel.border.bottom + 15
101
anchors.rightMargin : panel.border.right
111
source: themeResourcePath + "/media/" + (closeButtonMouseArea.pressed ? "DialogCloseButton-focus.png" : "DialogCloseButton.png")
112
anchors.top: panel.top
113
anchors.left: panel.left
114
anchors.leftMargin: panel.border.left + 15
115
anchors.topMargin: panel.border.top + 5
117
id: closeButtonMouseArea
118
anchors.fill: parent;
120
onClicked: root.close();
126
event.accepted = true