diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-30 07:30:01 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-30 07:30:01 (GMT) |
commit | c2bee860f72898c6d57ff9f117256059b3952479 (patch) | |
tree | 8f190bac91f9cbd11e6e52479a3effea132a3a20 /tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml | |
parent | de306893b464ed0fa00f98488912fd6269713519 (diff) | |
parent | c4f59859a589b76419e9133110eda850223f03dd (diff) | |
download | Qt-c2bee860f72898c6d57ff9f117256059b3952479.zip Qt-c2bee860f72898c6d57ff9f117256059b3952479.tar.gz Qt-c2bee860f72898c6d57ff9f117256059b3952479.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-4.7-from-4.6
Conflicts:
mkspecs/common/symbian/symbian.conf
src/3rdparty/webkit/WebCore/WebCore.pro
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml new file mode 100644 index 0000000..0adfa02 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml @@ -0,0 +1,62 @@ +import Qt 4.6 + +Rectangle { + width: 800; height: 450 + + ListModel { + id: rssModel + ListElement { lColor: "red" } + ListElement { lColor: "green" } + ListElement { lColor: "yellow" } + ListElement { lColor: "blue" } + ListElement { lColor: "purple" } + ListElement { lColor: "gray" } + ListElement { lColor: "brown" } + ListElement { lColor: "thistle" } + } + + Component { + id: photoDelegate + Rectangle { + id: wrapper + width: 85; height: 85; color: lColor + scale: wrapper.PathView.scale + + MouseArea { anchors.fill: parent } + + transform: Rotation { + id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2 + axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle + } + } + } + + PathView { + id: photoPathView; model: rssModel; delegate: photoDelegate + y: 100; width: 800; height: 330; pathItemCount: 10; z: 1 + path: Path { + startX: -50; startY: 40; + + PathAttribute { name: "scale"; value: 0.5 } + PathAttribute { name: "angle"; value: -45 } + + PathCubic { + x: 400; y: 220 + control1X: 140; control1Y: 40 + control2X: 210; control2Y: 220 + } + + PathAttribute { name: "scale"; value: 1.2 } + PathAttribute { name: "angle"; value: 0 } + + PathCubic { + x: 850; y: 40 + control2X: 660; control2Y: 40 + control1X: 590; control1Y: 220 + } + + PathAttribute { name: "scale"; value: 0.5 } + PathAttribute { name: "angle"; value: 45 } + } + } +} |