diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-04-30 01:31:48 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-04-30 01:31:48 (GMT) |
commit | dc8e57918e0ea3cd4d8f2dafc79ebf999953bf98 (patch) | |
tree | 346c6ee10469acb14e07621ad671eebab6cfef0b /demos/declarative/phonebrowser/content/Star.qml | |
parent | ffef88ee5aa653ed0d15996057a7521f179d6f3b (diff) | |
download | Qt-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.qml | 68 |
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" + } + } + ] +} |