summaryrefslogtreecommitdiff
path: root/examples/declarative/velocity/velocity.qml
blob: a091c4e0a4dcd033bdd8235a622bd2fd923f8625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import Qt 4.7

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; contentWidth: lay.width
        Row {
            id: lay
            Repeater {
                model: list
                Component { Day { day: name; color: dayColor; stickies: notes } }
            }
        }
    }
}