summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-05-08 00:48:13 (GMT)
committerIan Walters <ian.walters@nokia.com>2009-05-08 00:48:13 (GMT)
commitf7556aaf0f9e9418be4c4791fe5270202853d073 (patch)
tree34e46643de93fb97db8eeb3753a0e701b9faf335 /demos
parentbbf6d8ecaa896881f111be731a0718a124b6d21b (diff)
parent3223c155b5fe6439a123350de5c25337b7d3af13 (diff)
downloadQt-f7556aaf0f9e9418be4c4791fe5270202853d073.zip
Qt-f7556aaf0f9e9418be4c4791fe5270202853d073.tar.gz
Qt-f7556aaf0f9e9418be4c4791fe5270202853d073.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/content/ImageDetails.qml5
-rw-r--r--demos/declarative/flickr/content/Slider.qml1
-rw-r--r--demos/declarative/flickr/flickr.qml3
-rw-r--r--demos/declarative/flickr/flickr2.qml46
4 files changed, 32 insertions, 23 deletions
diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml
index 6c354f6..8677efc 100644
--- a/demos/declarative/flickr/content/ImageDetails.qml
+++ b/demos/declarative/flickr/content/ImageDetails.qml
@@ -3,6 +3,7 @@ Flipable {
property var frontContainer: ContainerFront
property var flickableArea: Flickable
+ property var slider: Slider
property string photoTitle: ""
property string photoDescription: ""
property string photoTags: ""
@@ -42,7 +43,7 @@ Flipable {
LikeOMeter { x: 40; y: 250; rating: Container.rating }
- Flickable { id: Flickable; x: 220; width: 480; height: 230; y: 120; clip: true
+ Flickable { id: Flickable; x: 220; width: 480; height: 210; y: 130; clip: true
viewportWidth: 480; viewportHeight: DescriptionText.height
WebView { id: DescriptionText; width: parent.width
@@ -96,7 +97,7 @@ Flipable {
anchors.centeredIn: parent; color: "white"; font.bold: true
}
- Slider { id: Slider; x: 25; y: 374; imageWidth: Container.photoWidth; imageHeight: Container.photoHeight }
+ Slider { id: Slider; x: 25; y: 374; visible: BigImage.status == 0; imageWidth: Container.photoWidth; imageHeight: Container.photoHeight }
}
states: [
diff --git a/demos/declarative/flickr/content/Slider.qml b/demos/declarative/flickr/content/Slider.qml
index ba9d842..c6a3e5e 100644
--- a/demos/declarative/flickr/content/Slider.qml
+++ b/demos/declarative/flickr/content/Slider.qml
@@ -3,6 +3,7 @@ Item {
property var value: Handle.x / Slider.xMax
property int xMax: Slider.width - Handle.width - 2
+ property var handle: Handle
property int imageWidth
property int imageHeight
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 85af8e3..dc150cb 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -58,6 +58,7 @@ Item {
ImageDetails.photoDate = photoDate;
ImageDetails.photoUrl = url;
ImageDetails.rating = 0;
+ ImageDetails.slider.handle.x = ImageDetails.slider.xMax;
Wrapper.state = "Details";
}
}
@@ -121,7 +122,7 @@ Item {
Image { source: "content/pics/background.png"; opaque: true }
GridView {
- id: PhotoGridView; model: FeedModel; delegate: PhotoDelegate
+ id: PhotoGridView; model: FeedModel; delegate: PhotoDelegate; cacheBuffer: 100
cellWidth: 105; cellHeight: 105; x:32; y: 80; width: 800; height: 330; z: 1
}
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 }
}
}