summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr/mobile')
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml34
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml14
2 files changed, 23 insertions, 25 deletions
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index 291d874..b54585b 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -5,19 +5,17 @@
Item {
id: wrapper; width: 79; height: 79
- Script {
- function photoClicked() {
- imageDetails.photoTitle = title;
- imageDetails.photoTags = tags;
- imageDetails.photoWidth = photoWidth;
- imageDetails.photoHeight = photoHeight;
- imageDetails.photoType = photoType;
- imageDetails.photoAuthor = photoAuthor;
- imageDetails.photoDate = photoDate;
- imageDetails.photoUrl = url;
- imageDetails.rating = 0;
- scaleMe.state = "Details";
- }
+ function photoClicked() {
+ imageDetails.photoTitle = title;
+ imageDetails.photoTags = tags;
+ imageDetails.photoWidth = photoWidth;
+ imageDetails.photoHeight = photoHeight;
+ imageDetails.photoType = photoType;
+ imageDetails.photoAuthor = photoAuthor;
+ imageDetails.photoDate = photoDate;
+ imageDetails.photoUrl = url;
+ imageDetails.rating = 0;
+ scaleMe.state = "Details";
}
Item {
@@ -54,14 +52,16 @@
transitions: [
Transition {
from: "Show"; to: "Details"
- ParentAction { }
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ ParentAnimation {
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ }
},
Transition {
from: "Details"; to: "Show"
SequentialAnimation {
- ParentAction { }
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ ParentAnimation {
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ }
PropertyAction { targets: wrapper; properties: "z" }
}
}
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
index 0a06771..e92ba59 100644
--- a/demos/declarative/flickr/mobile/TitleBar.qml
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -11,12 +11,10 @@ Item {
id: container
width: (parent.width * 2) - 55 ; height: parent.height
- Script {
- function accept() {
- titleBar.state = ""
- background.state = ""
- rssModel.tags = editor.text
- }
+ function accept() {
+ titleBar.state = ""
+ background.state = ""
+ rssModel.tags = editor.text
}
Text {
@@ -32,7 +30,7 @@ Item {
Button {
id: tagButton; x: titleBar.width - 50; width: 45; height: 32; text: "..."
- onClicked: if (titleBar.state == "Tags") accept(); else titleBar.state = "Tags"
+ onClicked: if (titleBar.state == "Tags") container.accept(); else titleBar.state = "Tags"
anchors.verticalCenter: parent.verticalCenter
}
@@ -57,7 +55,7 @@ Item {
Item {
id: returnKey
- Keys.onReturnPressed: accept()
+ Keys.onReturnPressed: container.accept()
Keys.onEscapePressed: titleBar.state = ""
}
}