summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr')
-rw-r--r--demos/declarative/flickr/common/Slider.qml2
-rw-r--r--demos/declarative/flickr/flickr.qml4
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml8
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml14
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml15
-rw-r--r--demos/declarative/flickr/mobile/images/quit.pngbin0 -> 2369 bytes
6 files changed, 29 insertions, 14 deletions
diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml
index 4da370e..76f6303 100644
--- a/demos/declarative/flickr/common/Slider.qml
+++ b/demos/declarative/flickr/common/Slider.qml
@@ -29,7 +29,7 @@ Item {
MouseArea {
anchors.fill: parent; drag.target: parent
- drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: slider.xMax+2
+ drag.axis: Drag.XAxis; drag.minimumX: 2; drag.maximumX: slider.xMax+2
onPositionChanged: { value = (maximum - minimum) * (handle.x-2) / slider.xMax + minimum; }
}
}
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 8b73beb..29763d4 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -38,7 +38,7 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
}
}
@@ -76,7 +76,7 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
}
}
}
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index 5ab7b87..df608bc 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -21,7 +21,7 @@
Item {
anchors.centerIn: parent
scale: 0.0
- Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} }
+ Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
id: scaleMe
Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
@@ -38,7 +38,7 @@
states: [
State {
- name: "Show"; when: thumb.status == 1
+ name: "Show"; when: thumb.status == Image.Ready
PropertyChanges { target: scaleMe; scale: 1 }
},
State {
@@ -53,14 +53,14 @@
Transition {
from: "Show"; to: "Details"
ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
}
},
Transition {
from: "Details"; to: "Show"
SequentialAnimation {
ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
}
PropertyAction { targets: wrapper; properties: "z" }
}
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index 58b0b83..caf1571 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -54,7 +54,11 @@ Flipable {
Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
- Common.Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 }
+ Common.Progress {
+ anchors.centerIn: parent; width: 200; height: 18
+ progress: bigImage.progress; visible: bigImage.status != Image.Ready
+ }
+
Flickable {
id: flickable; anchors.fill: parent; clip: true
contentWidth: imageContainer.width; contentHeight: imageContainer.height
@@ -69,7 +73,7 @@ Flipable {
anchors.centerIn: parent; smooth: !flickable.moving
onStatusChanged : {
// Default scale shows the entire image.
- if (status == 1 && width != 0) {
+ if (status == Image.Ready && width != 0) {
slider.minimum = Math.min(flickable.width / width, flickable.height / height);
prevScale = Math.min(slider.minimum, 1);
slider.value = prevScale;
@@ -81,12 +85,12 @@ Flipable {
Text {
text: "Image Unavailable"
- visible: bigImage.status == 'Error'
+ visible: bigImage.status == Image.Error
anchors.centerIn: parent; color: "white"; font.bold: true
}
Common.Slider {
- id: slider; visible: { bigImage.status == 1 && maximum > minimum }
+ id: slider; visible: { bigImage.status == Image.Ready && maximum > minimum }
anchors {
bottom: parent.bottom; bottomMargin: 65
left: parent.left; leftMargin: 25
@@ -114,7 +118,7 @@ Flipable {
transitions: Transition {
SequentialAnimation {
PropertyAction { target: bigImage; property: "smooth"; value: false }
- NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 500 }
+ NumberAnimation { easing.type: Easing.InOutQuad; properties: "angle"; duration: 500 }
PropertyAction { target: bigImage; property: "smooth"; value: !flickable.moving }
}
}
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
index 71d9385..025b897 100644
--- a/demos/declarative/flickr/mobile/TitleBar.qml
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -18,10 +18,21 @@ Item {
rssModel.tags = editor.text
}
+ Image {
+ id: quitButton
+ anchors.left: parent.left//; anchors.leftMargin: 0
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/quit.png"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
+
Text {
id: categoryText
anchors {
- left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ left: quitButton.right; right: tagButton.left; leftMargin: 10; rightMargin: 10
verticalCenter: parent.verticalCenter
}
elide: Text.ElideLeft
@@ -70,6 +81,6 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad }
}
}
diff --git a/demos/declarative/flickr/mobile/images/quit.png b/demos/declarative/flickr/mobile/images/quit.png
new file mode 100644
index 0000000..5bda1b6
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/quit.png
Binary files differ