Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeanchors / data / anchorsqgraphicswidget.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     color: "white"
5     width: 240
6     height: 320
7     Rectangle { id: masterRect; objectName: "masterRect"; x: 26; width: 96; height: 20; color: "red" }
8     QGraphicsWidget {
9         id: rect1; objectName: "rect1"
10         y: 20; width: 10; height: 10
11         anchors.left: masterRect.left
12     }
13     QGraphicsWidget {
14         id: rect2; objectName: "rect2"
15         y: 20; width: 10; height: 10
16         anchors.left: masterRect.right
17     }
18     QGraphicsWidget {
19         id: rect3; objectName: "rect3"
20         y: 20; width: 10; height: 10
21         anchors.left: masterRect.horizontalCenter
22     }
23     QGraphicsWidget {
24         id: rect4; objectName: "rect4"
25         y: 30; width: 10; height: 10
26         anchors.right: masterRect.left
27     }
28     QGraphicsWidget {
29         id: rect5; objectName: "rect5"
30         y: 30; width: 10; height: 10
31         anchors.right: masterRect.right
32     }
33     QGraphicsWidget {
34         id: rect6; objectName: "rect6"
35         y: 30; width: 10; height: 10
36         anchors.right: masterRect.horizontalCenter
37     }
38     QGraphicsWidget {
39         id: rect7; objectName: "rect7"
40         y: 50; width: 10; height: 10
41         anchors.left: parent.left
42     }
43     QGraphicsWidget {
44         id: rect8; objectName: "rect8"
45         y: 50; width: 10; height: 10
46         anchors.left: parent.right
47     }
48     QGraphicsWidget {
49         id: rect9; objectName: "rect9"
50         y: 50; width: 10; height: 10
51         anchors.left: parent.horizontalCenter
52     }
53     QGraphicsWidget {
54         id: rect10; objectName: "rect10"
55         y: 60; width: 10; height: 10
56         anchors.right: parent.left
57     }
58     QGraphicsWidget {
59         id: rect11; objectName: "rect11"
60         y: 60; width: 10; height: 10
61         anchors.right: parent.right
62     }
63     QGraphicsWidget {
64         id: rect12; objectName: "rect12"
65         y: 60; width: 10; height: 10
66         anchors.right: parent.horizontalCenter
67     }
68     QGraphicsWidget {
69         id: rect13; objectName: "rect13"
70         x: 200; width: 10; height: 10
71         anchors.top: masterRect.bottom
72     }
73     QGraphicsWidget {
74         id: rect14; objectName: "rect14"
75         width: 10; height: 10;
76         anchors.verticalCenter: parent.verticalCenter
77     }
78     QGraphicsWidget {
79         id: rect15; objectName: "rect15"
80         y: 200; height: 10
81         anchors.left: masterRect.left
82         anchors.right: masterRect.right
83     }
84     QGraphicsWidget {
85         id: rect16; objectName: "rect16"
86         y: 220; height: 10
87         anchors.left: masterRect.left
88         anchors.horizontalCenter: masterRect.right
89     }
90     QGraphicsWidget {
91         id: rect17; objectName: "rect17"
92         y: 240; height: 10
93         anchors.right: masterRect.right
94         anchors.horizontalCenter: masterRect.left
95     }
96     QGraphicsWidget {
97         id: rect18; objectName: "rect18"
98         x: 180; width: 10
99         anchors.top: masterRect.bottom
100         anchors.bottom: rect12.top
101     }
102     QGraphicsWidget {
103         id: rect19; objectName: "rect19"
104         y: 70; width: 10; height: 10
105         anchors.horizontalCenter: parent.horizontalCenter
106     }
107     QGraphicsWidget {
108         id: rect20; objectName: "rect20"
109         y: 70; width: 10; height: 10
110         anchors.horizontalCenter: parent.right
111     }
112     QGraphicsWidget {
113         id: rect21; objectName: "rect21"
114         y: 70; width: 10; height: 10
115         anchors.horizontalCenter: parent.left
116     }
117     QGraphicsWidget {
118         id: rect22; objectName: "rect22"
119         width: 10; height: 10
120         anchors.centerIn: masterRect
121     }
122     QGraphicsWidget {
123         id: rect23; objectName: "rect23"
124         anchors.left: masterRect.left
125         anchors.leftMargin: 5
126         anchors.right: masterRect.right
127         anchors.rightMargin: 5
128         anchors.top: masterRect.top
129         anchors.topMargin: 5
130         anchors.bottom: masterRect.bottom
131         anchors.bottomMargin: 5
132     }
133     QGraphicsWidget {
134         id: rect24; objectName: "rect24"
135         width: 10; height: 10
136         anchors.horizontalCenter: masterRect.left
137         anchors.horizontalCenterOffset: width/2
138     }
139     QGraphicsWidget {
140         id: rect25; objectName: "rect25"
141         width: 10; height: 10
142         anchors.verticalCenter: rect12.top
143         anchors.verticalCenterOffset: height/2
144     }
145     Rectangle {
146         id: rect26; objectName: "rect26"
147         width: 10; height: 10
148         anchors.baseline: masterRect.top
149         anchors.baselineOffset: height/2
150     }
151     Text {
152         id: text1; objectName: "text1"
153         y: 200;
154         text: "Hello"
155     }
156     Text {
157         id: text2; objectName: "text2"
158         anchors.baseline: text1.baseline
159         anchors.left: text1.right
160         text: "World"
161     }
162 }