Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / tests / manual / accessibility / hittest.qml
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the QtDeclarative module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
16 **
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
20 **
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
28 **
29 ** Other Usage
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42
43 import QtQuick 2.0
44 Rectangle {
45     id: page
46     width: 640
47     height: 480
48     color: "white"
49     Rectangle {
50         id: header
51         color: "#c0c0c0"
52         height: usage.height + chkClip.height
53         anchors.left: parent.left
54         anchors.right: parent.right
55         Text {
56             id: usage
57             text: "Use an a11y inspect tool to see if all visible rectangles can be found with hit testing."
58         }
59         Rectangle {
60             id: chkClip
61             property bool checked: true
62
63             color: (checked ? "#f0f0f0" : "#c0c0c0")
64             height: label.height
65             width: label.width
66             anchors.left: parent.left
67             anchors.bottom: parent.bottom
68
69             MouseArea {
70                 anchors.fill: parent
71                 onClicked: chkClip.checked = !chkClip.checked
72             }
73             Text {
74                 id: label
75                 text: "Click here to toggle clipping"
76             }
77         }
78     }
79     Rectangle {
80         clip: chkClip.checked
81         z: 2
82         id: rect1
83         width: 100
84         height: 100
85         color: "#ffc0c0"
86         anchors.top: header.bottom
87         Rectangle {
88             id: rect2
89             width: 100
90             height: 100
91             x: 50
92             y: 50
93             color: "#ffa0a0"
94             Rectangle {
95                 id: rect31
96                 width: 100
97                 height: 100
98                 x: 80
99                 y: 80
100                 color: "#ff8080"
101             }
102             Rectangle {
103                 id: rect32
104                 x: 100
105                 y: 70
106                 z: 3
107                 width: 100
108                 height: 100
109                 color: "#e06060"
110             }
111             Rectangle {
112                 id: rect33
113                 width: 100
114                 height: 100
115                 x: 150
116                 y: 60
117                 color: "#c04040"
118             }
119         }
120     }
121
122     Rectangle {
123         x: 0
124         y: 50
125         id: recta1
126         width: 100
127         height: 100
128         color: "#c0c0ff"
129         Rectangle {
130             id: recta2
131             width: 100
132             height: 100
133             x: 50
134             y: 50
135             color: "#a0a0ff"
136             Rectangle {
137                 id: recta31
138                 width: 100
139                 height: 100
140                 x: 80
141                 y: 80
142                 color: "#8080ff"
143             }
144             Rectangle {
145                 id: recta32
146                 x: 100
147                 y: 70
148                 z: 100
149                 width: 100
150                 height: 100
151                 color: "#6060e0"
152             }
153             Rectangle {
154                 id: recta33
155                 width: 100
156                 height: 100
157                 x: 150
158                 y: 60
159                 color: "#4040c0"
160             }
161         }
162     }
163
164 }