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