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.qml108
1 files changed, 108 insertions, 0 deletions
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml
new file mode 100644
index 0000000..50d69d8
--- /dev/null
+++ b/examples/declarative/velocity/velocity.qml
@@ -0,0 +1,108 @@
+import Qt 4.6
+
+Rectangle {
+ color: "lightSteelBlue"
+ width: 800; height: 600
+
+ ListModel {
+ 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: flickable
+ anchors.fill: parent; viewportWidth: lay.width
+ Row {
+ id: lay
+ Repeater {
+ model: list
+ Component { Day { day: name; color: dayColor; stickies: notes } }
+ }
+ }
+ }
+}