touch example: ContextMenuPage - circle path animation on anchor point.
authorTomasz Olszak <olszak.tomasz@gmail.com>
Tue, 11 Jun 2013 18:00:40 +0000 (18:00 +0000)
committerTomasz Olszak <olszak.tomasz@gmail.com>
Tue, 11 Jun 2013 18:32:54 +0000 (20:32 +0200)
Change-Id: Ic66e530aebc920f61f89ddec394178987aca25aa
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
examples/touch/content/ContextMenuPage.qml

index 06de2b7..73174a8 100644 (file)
@@ -104,15 +104,30 @@ Item {
         text: "Animate"
         onClicked: animation.running = !animation.running
     }
-    NumberAnimation {
+    PathAnimation {
         id:animation
         target: center
-        property: "x"
-        from: 0
-        to: parent.width
+        anchorPoint: Qt.point(center.width/2,center.height/2)
         loops: Animation.Infinite
         running: false
         duration: 5000
+        path: Path {
+            id: myPath
+            startX: 360; startY: 300
+
+            PathArc {
+                x: 360; y: 900
+                radiusX: 300
+                radiusY: 300
+                useLargeArc: true
+            }
+            PathArc {
+                x: 360; y: 300
+                radiusX: 300
+                radiusY: 300
+                useLargeArc: true
+            }
+        }
     }
 
 }