summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-05-07 07:24:12 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-05-07 07:24:12 (GMT)
commit3f9534dc96eaa2154efe759215466cdbd247664c (patch)
treec49fdcdb875299d476b1115f2422003d447b991e /demos
parent84dc4e1c5c48d38b4a59fab22e49162de091beff (diff)
downloadQt-3f9534dc96eaa2154efe759215466cdbd247664c.zip
Qt-3f9534dc96eaa2154efe759215466cdbd247664c.tar.gz
Qt-3f9534dc96eaa2154efe759215466cdbd247664c.tar.bz2
Get view to view transitions working properly... for PathView.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/flickr2.qml46
1 files changed, 26 insertions, 20 deletions
diff --git a/demos/declarative/flickr/flickr2.qml b/demos/declarative/flickr/flickr2.qml
index 4875fa4..3b1208c 100644
--- a/demos/declarative/flickr/flickr2.qml
+++ b/demos/declarative/flickr/flickr2.qml
@@ -143,29 +143,31 @@ Item {
]
transitions: [
Transition {
- fromState: "*"
- toState: "*"
+ fromState: "left"
+ toState: "right"
SequentialAnimation {
SetPropertyAction {
target: Wrapper
property: "moveToParent"
- value: Bounce
}
ParallelAnimation {
NumericAnimation {
target: Wrapper
- properties: "x"
+ properties: "x,y"
to: 0
- duration: 250
- }
- NumericAnimation {
- target: Wrapper
- properties: "y"
- to: 0
- easing: "easeInQuad"
- duration: 250
+ easing: "easeOutQuad"
+ duration: 350
}
}
+ }
+ },
+ Transition {
+ fromState: "right"
+ toState: "left"
+ SequentialAnimation {
+ PauseAnimation {
+ duration: Math.floor(index/7)*100
+ }
SetPropertyAction {
target: Wrapper
property: "moveToParent"
@@ -173,13 +175,7 @@ Item {
ParallelAnimation {
NumericAnimation {
target: Wrapper
- properties: "x"
- to: 0
- duration: 250
- }
- NumericAnimation {
- target: Wrapper
- properties: "y"
+ properties: "x,y"
to: 0
easing: "easeOutQuad"
duration: 250
@@ -203,14 +199,20 @@ Item {
GridView {
id: PhotoGridView; model: MyVisualModel.parts.leftBox
cellWidth: 105; cellHeight: 105; x:32; y: 80; width: 800; height: 330; z: 1
+ cacheBuffer: 100
}
PathView {
id: PhotoPathView; model: MyVisualModel.parts.rightBox
y: 80; width: 800; height: 330; z: 1
+ pathItemCount: 10; snapPosition: 0.001
path: Path {
- startX: -50; startY: 40;
+ startX: -150; startY: 40;
+ PathPercent { value: 0 }
+ PathLine { x: -50; y: 40 }
+
+ PathPercent { value: 0.001 }
PathAttribute { name: "scale"; value: 1 }
PathAttribute { name: "angle"; value: -45 }
@@ -232,6 +234,10 @@ Item {
PathAttribute { name: "scale"; value: 1 }
PathAttribute { name: "angle"; value: -45 }
+
+ PathPercent { value: 0.999 }
+ PathLine { x: 950; y: 40 }
+ PathPercent { value: 1.0 }
}
}