summaryrefslogtreecommitdiffstats
path: root/examples/declarative/velocity/velocity.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/velocity/velocity.qml')
-rw-r--r--examples/declarative/velocity/velocity.qml194
1 files changed, 113 insertions, 81 deletions
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml
index 0215d37..ff95527 100644
--- a/examples/declarative/velocity/velocity.qml
+++ b/examples/declarative/velocity/velocity.qml
@@ -1,81 +1,113 @@
-<Rect color="lightSteelBlue" width="800" height="600">
- <ListModel id="List">
- <Day>
- <name>Sunday</name>
- <dayColor>#808080</dayColor>
- <notes>
- <Note noteText="Lunch" />
- <Note noteText="Party" />
- </notes>
- </Day>
- <Day>
- <name>Monday</name>
- <dayColor>blue</dayColor>
- <notes>
- <Note noteText="Pickup kids" />
- <Note noteText="Checkout kinetic" />
- <Note noteText="Read email" />
- </notes>
- </Day>
- <Day>
- <name>Tuesday</name>
- <dayColor>yellow</dayColor>
- <notes>
- <Note noteText="Walk dog" />
- <Note noteText="Buy newspaper" />
- </notes>
- </Day>
- <Day>
- <name>Wednesday</name>
- <dayColor>purple</dayColor>
- <notes>
- <Note noteText="Cook dinner" />
- <Note noteText="Eat dinner" />
- </notes>
- </Day>
- <Day>
- <name>Thursday</name>
- <dayColor>blue</dayColor>
- <notes>
- <Note noteText="5:30pm Meeting" />
- <Note noteText="Weed garden" />
- </notes>
- </Day>
- <Day>
- <name>Friday</name>
- <dayColor>green</dayColor>
- <notes>
- <Note noteText="Still work" />
- <Note noteText="Drink" />
- </notes>
- </Day>
- <Day>
- <name>Saturday</name>
- <dayColor>orange</dayColor>
- <notes>
- <Note noteText="Drink" />
- <Note noteText="Drink" />
- </notes>
- </Day>
- </ListModel>
-
- <Flickable id="Flick" anchors.fill="{parent}" viewportWidth="{Lay.width}">
- <HorizontalLayout id="Lay">
- <Repeater dataSource="{List}">
- <Component>
- <Day day="{name}" color="{dayColor}" stickies="{notes}"/>
- </Component>
- </Repeater>
- <!--
- <Day color="#808080" day="Sunday" />
- <Day color="blue" day="Monday"/>
- <Day color="yellow" day="Tuesday"/>
- <Day color="purple" day="Wednesday"/>
- <Day color="blue" day="Thursday"/>
- <Day color="green" day="Friday"/>
- <Day color="orange" day="Saturday"/>
- -->
- </HorizontalLayout>
- </Flickable>
-
-</Rect>
+Rect {
+ color: "lightSteelBlue"
+ width: 800
+ height: 600
+ ListModel2 {
+ id: List
+ ListElement {
+ name: "Sunday"
+ dayColor: "#808080"
+ notes: [
+ ListElement {
+ noteText: "Lunch"
+ },
+ ListElement {
+ noteText: "Party"
+ }
+ ]
+ }
+ ListElement {
+ name: "Monday"
+ dayColor: "blue"
+ notes: [
+ ListElement {
+ noteText: "Pickup kids"
+ },
+ ListElement {
+ noteText: "Checkout kinetic"
+ },
+ ListElement {
+ noteText: "Read email"
+ }
+ ]
+ }
+ ListElement {
+ name: "Tuesday"
+ dayColor: "yellow"
+ notes: [
+ ListElement {
+ noteText: "Walk dog"
+ },
+ ListElement {
+ noteText: "Buy newspaper"
+ }
+ ]
+ }
+ ListElement {
+ name: "Wednesday"
+ dayColor: "purple"
+ notes: [
+ ListElement {
+ noteText: "Cook dinner"
+ },
+ ListElement {
+ noteText: "Eat dinner"
+ }
+ ]
+ }
+ ListElement {
+ name: "Thursday"
+ dayColor: "blue"
+ notes: [
+ ListElement {
+ noteText: "5:30pm Meeting"
+ },
+ ListElement {
+ noteText: "Weed garden"
+ }
+ ]
+ }
+ ListElement {
+ name: "Friday"
+ dayColor: "green"
+ notes: [
+ ListElement {
+ noteText: "Still work"
+ },
+ ListElement {
+ noteText: "Drink"
+ }
+ ]
+ }
+ ListElement {
+ name: "Saturday"
+ dayColor: "orange"
+ notes: [
+ ListElement {
+ noteText: "Drink"
+ },
+ ListElement {
+ noteText: "Drink"
+ }
+ ]
+ }
+ }
+ Flickable {
+ id: Flick
+ anchors.fill: parent
+ viewportWidth: Lay.width
+ HorizontalLayout {
+ id: Lay
+ Repeater {
+ dataSource: List
+ Component {
+ Day {
+ day: name
+ color: dayColor
+ stickies: notes
+ }
+ }
+ }
+ }
+ }
+}