From 27015a7662a8a1b2852f2d43d948c51ac4e90070 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 27 Jul 2009 12:39:07 +0200 Subject: fixes in examples and demos Fixed all examples and demos to work after the changes to Flipable and Rotation3D. --- demos/declarative/flickr/content/ImageDetails.qml | 7 ++++++- demos/declarative/flickr/flickr.qml | 2 +- demos/declarative/flickr/flickr2.qml | 2 +- examples/declarative/minehunt/minehunt.qml | 15 ++++++++------- examples/declarative/snow/snow.qml | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml index 9ff560a..5e3460a 100644 --- a/demos/declarative/flickr/content/ImageDetails.qml +++ b/demos/declarative/flickr/content/ImageDetails.qml @@ -15,10 +15,15 @@ Flipable { property string photoUrl property int rating: 2 property var prevScale: 1.0 + property int rotation: 0 signal closed - axis: Axis { startX: Container.width / 2; endX: Container.width / 2; endY: 1 } + transform: Rotation3D { + originX: Container.width / 2; + axis.y: 1; + angle: Container.rotation; + } front: Item { id: ContainerFront; anchors.fill: Container diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index f498462..72513a0 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -34,7 +34,7 @@ Item { scale: Wrapper.PathView.scale; z: Wrapper.PathView.z transform: [ - Rotation3D { id: Rotation; axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: Wrapper.PathView.angle } + Rotation3D { id: Rotation; originX: 30; axis.x: 30; axis.y: 60; angle: Wrapper.PathView.angle } ] Connection { diff --git a/demos/declarative/flickr/flickr2.qml b/demos/declarative/flickr/flickr2.qml index 06b425c..36cf87e 100644 --- a/demos/declarative/flickr/flickr2.qml +++ b/demos/declarative/flickr/flickr2.qml @@ -37,7 +37,7 @@ Item { transform: [ Rotation3D { - id: Rotation; axis.startX: 30; axis.endX: 30; axis.endY: 60 + id: Rotation; originX: 30; axis.x: 30; axis.y: 60 angle: Wrapper.angle } ] diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/declarative/minehunt/minehunt.qml index 6220d96..df5c077 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/minehunt.qml @@ -15,11 +15,12 @@ Item { id: flipable width: 40 height: 40 - axis: Axis { - startX: 20 - startY: 20 - endX: 20 - endY: 0 + property int angle: 0; + transform: Rotation3D { + originX: 20 + originY: 20 + axis.x: 1 + angle: flipable.angle; } front: Image { source: "pics/front.png" @@ -67,7 +68,7 @@ Item { State { name: "back" when: modelData.flipped - SetProperties { target: flipable; rotation: 180 } + SetProperties { target: flipable; angle: 180 } } ] transitions: [ @@ -90,7 +91,7 @@ Item { } NumberAnimation { easing: "easeInOutQuad" - properties: "rotation" + properties: "angle" } RunScriptAction{ script: if(modelData.hasMine && modelData.flipped) diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml index aaed619..aa5185f 100644 --- a/examples/declarative/snow/snow.qml +++ b/examples/declarative/snow/snow.qml @@ -42,7 +42,7 @@ Rect { } transform: Rotation3D { - axis { startX: 0; startY: 0; endX: 0; endY: 1 } + axis.y: 1 angle: MyLayout.deform * 100 } } -- cgit v0.12