Initial import from qtquick2.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qsgpathview / data / pathview2.qml
1 import QtQuick 2.0
2
3 PathView {
4     id: photoPathView
5     y: 100; width: 800; height: 330; pathItemCount: 10; z: 1
6
7     path: Path {
8         startX: -50; startY: 40;
9
10         PathAttribute { name: "scale"; value: 0.5 }
11         PathAttribute { name: "angle"; value: -45 }
12
13         PathCubic {
14             x: 400; y: 220
15             control1X: 140; control1Y: 40
16             control2X: 210; control2Y: 220
17         }
18
19         PathAttribute { name: "scale"; value: 1.2  }
20         PathAttribute { name: "angle"; value: 0 }
21
22         PathCubic {
23             x: 850; y: 40
24             control2X: 660; control2Y: 40
25             control1X: 590; control1Y: 220
26         }
27
28         PathAttribute { name: "scale"; value: 0.5 }
29         PathAttribute { name: "angle"; value: 45 }
30     }
31
32     model: ListModel {
33         id: rssModel
34         ListElement { lColor: "red" }
35         ListElement { lColor: "green" }
36         ListElement { lColor: "yellow" }
37         ListElement { lColor: "blue" }
38         ListElement { lColor: "purple" }
39         ListElement { lColor: "gray" }
40         ListElement { lColor: "brown" }
41         ListElement { lColor: "thistle" }
42     }
43
44     delegate: Component {
45         id: photoDelegate
46         Rectangle {
47             id: wrapper
48             width: 85; height: 85; color: lColor
49             scale: wrapper.PathView.scale
50
51             transform: Rotation {
52                 id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
53                 axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
54             }
55         }
56     }
57 }