summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-04-30 06:23:46 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-04-30 06:23:46 (GMT)
commit8cd3c8f83b72a988a2d6a99924dda97504c9c24e (patch)
tree2e759666c4decf847ddf1d186d2cc3b267b424a8 /examples
parent4cdf487e2f00f8d3bb3fff9ce33c02812cb4fe7c (diff)
downloadQt-8cd3c8f83b72a988a2d6a99924dda97504c9c24e.zip
Qt-8cd3c8f83b72a988a2d6a99924dda97504c9c24e.tar.gz
Qt-8cd3c8f83b72a988a2d6a99924dda97504c9c24e.tar.bz2
port syntax
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/listview/content/MediaButton.qml61
1 files changed, 40 insertions, 21 deletions
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml
index 6c672ea..bb2510a 100644
--- a/examples/declarative/listview/content/MediaButton.qml
+++ b/examples/declarative/listview/content/MediaButton.qml
@@ -1,21 +1,40 @@
-<Item id="Container">
- <signals>
- <Signal name="clicked"/>
- </signals>
-
- <properties>
- <Property name="text"/>
- </properties>
-
- <Image id="Image" source="pics/button.png"/>
- <Image id="Pressed" source="pics/button-pressed.png" opacity="0"/>
- <MouseRegion id="MouseRegion" anchors.fill="{Image}" onClicked="Container.clicked.emit();"/>
- <Text font.bold="true" color="white" anchors.centeredIn="{Image}" text="{Container.text}"/>
- <width>{Image.width}</width>
-
- <states>
- <State name="Pressed" when="{MouseRegion.pressed == true}">
- <SetProperties target="{Pressed}" opacity="1"/>
- </State>
- </states>
-</Item>
+Item {
+ id: Container
+ signals: Signal {
+ name: "clicked"
+ }
+ properties: Property {
+ name: "text"
+ }
+ Image {
+ id: Image
+ source: "pics/button.png"
+ }
+ Image {
+ id: Pressed
+ source: "pics/button-pressed.png"
+ opacity: 0
+ }
+ MouseRegion {
+ id: MouseRegion
+ anchors.fill: Image
+ onClicked: { Container.clicked.emit(); }
+ }
+ Text {
+ font.bold: true
+ color: "white"
+ anchors.centeredIn: Image
+ text: Container.text
+ }
+ width: Image.width
+ states: [
+ State {
+ name: "Pressed"
+ when: MouseRegion.pressed == true
+ SetProperties {
+ target: Pressed
+ opacity: 1
+ }
+ }
+ ]
+}