summaryrefslogtreecommitdiffstats
path: root/examples/declarative/velocity/velocity.qml
blob: 20821d6df6a4dd0ea7b9994d17f7b9f688ce342a (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
import Qt 4.7

Rectangle {
    width: 800; height: 480; color: "#464646"

    ListModel {
        id: list
        ListElement {
            name: "Sunday"
            notes: [ ListElement { noteText: "Lunch" }, ListElement { noteText: "Birthday Party" } ]
        }
        ListElement {
            name: "Monday"
            notes: [ ListElement { noteText: "Pickup kids from\nschool\n4.30pm" },
            ListElement { noteText: "Checkout Qt" }, ListElement { noteText: "Read email" } ]
        }
        ListElement {
            name: "Tuesday"
            notes: [ ListElement { noteText: "Walk dog" }, ListElement { noteText: "Buy newspaper" } ]
        }
        ListElement {
            name: "Wednesday"; notes: [ ListElement { noteText: "Cook dinner" } ]
        }
        ListElement {
            name: "Thursday"
            notes: [ ListElement { noteText: "Meeting\n5.30pm" }, ListElement { noteText: "Weed garden" } ]
        }
        ListElement {
            name: "Friday"
            notes: [ ListElement { noteText: "More work" }, ListElement { noteText: "Grocery shopping" } ]
        }
        ListElement {
            name: "Saturday"
            notes: [ ListElement { noteText: "Drink" }, ListElement { noteText: "Download Qt\nPlay with QML" } ]
        }
    }

    ListView {
        id: flickable
        anchors.fill: parent; focus: true
        model: list; delegate: Day { }
        highlightRangeMode: ListView.StrictlyEnforceRange
        orientation: ListView.Horizontal
        snapMode: ListView.SnapOneItem
    }
}