summaryrefslogtreecommitdiffstats
path: root/demos/declarative/phonebrowser/content/Star.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-04-30 01:31:48 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-04-30 01:31:48 (GMT)
commitdc8e57918e0ea3cd4d8f2dafc79ebf999953bf98 (patch)
tree346c6ee10469acb14e07621ad671eebab6cfef0b /demos/declarative/phonebrowser/content/Star.qml
parentffef88ee5aa653ed0d15996057a7521f179d6f3b (diff)
downloadQt-dc8e57918e0ea3cd4d8f2dafc79ebf999953bf98.zip
Qt-dc8e57918e0ea3cd4d8f2dafc79ebf999953bf98.tar.gz
Qt-dc8e57918e0ea3cd4d8f2dafc79ebf999953bf98.tar.bz2
Convert phonebrowser.
Diffstat (limited to 'demos/declarative/phonebrowser/content/Star.qml')
-rw-r--r--demos/declarative/phonebrowser/content/Star.qml68
1 files changed, 45 insertions, 23 deletions
diff --git a/demos/declarative/phonebrowser/content/Star.qml b/demos/declarative/phonebrowser/content/Star.qml
index 37d314b..ebcd78b 100644
--- a/demos/declarative/phonebrowser/content/Star.qml
+++ b/demos/declarative/phonebrowser/content/Star.qml
@@ -1,25 +1,47 @@
-<Item id="Container" width="24" height="24">
- <properties>
- <Property name="rating"/>
- <Property name="on"/>
- </properties>
+Item {
+ id: Container
+ width: 24
+ height: 24
- <signals>
- <Signal name="clicked"/>
- </signals>
+ properties: [
+ Property { name: "rating" },
+ Property { name: "on" }
+ ]
- <Image id="Image" source="pics/ghns_star.png" x="6" y="7" opacity="0.4" scale="0.5"/>
- <MouseRegion anchors.fill="{Container}" onClicked="Container.clicked.emit()"/>
-
- <states>
- <State name="on" when="{Container.on == true}">
- <SetProperties target="{Image}" opacity="1" scale="1" x="1" y="0"/>
- </State>
- </states>
- <transitions>
- <Transition>
- <NumericAnimation properties="opacity,scale,x,y" easing="easeOutBounce"/>
- </Transition>
- </transitions>
-
-</Item>
+ signals: Signal {
+ name: "clicked"
+ }
+ Image {
+ id: Image
+ source: "pics/ghns_star.png"
+ x: 6
+ y: 7
+ opacity: 0.4
+ scale: 0.5
+ }
+ MouseRegion {
+ anchors.fill: Container
+ onClicked: { Container.clicked.emit() }
+ }
+ states: [
+ State {
+ name: "on"
+ when: Container.on == true
+ SetProperties {
+ target: Image
+ opacity: 1
+ scale: 1
+ x: 1
+ y: 0
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumericAnimation {
+ properties: "opacity,scale,x,y"
+ easing: "easeOutBounce"
+ }
+ }
+ ]
+}