1import QtQuick 2.0
2Rectangle {
3    color: "black"
4    ListView {
5        anchors.fill: parent
6        anchors.margins: 8
7
8        model: kamdmodel
9
10        delegate: Item {
11            height: 100-32
12            width: 500
13
14            Text {
15                text: model.index
16                color: '#ffffff'
17
18                width: 24
19
20                anchors {
21                    left: parent.left
22                    top: parent.top
23                    bottom: parent.bottom
24                }
25            }
26
27            Rectangle {
28                id: titleRect
29                height: 32
30
31                color: '#202020'
32                anchors {
33                    left: parent.left
34                    leftMargin: 24
35                    right: parent.right
36                    top: parent.top
37                }
38
39                Text {
40                    text: model.title
41                    anchors {
42                        fill: parent
43                        margins: 6
44                    }
45                    color: 'white'
46                }
47
48                Text {
49                    text: "Score: " + model.score
50                    anchors {
51                        fill: parent
52                        margins: 6
53                    }
54                    color: 'white'
55                    horizontalAlignment: Text.AlignRight
56                }
57            }
58
59            Rectangle {
60                anchors {
61                    left: parent.left
62                    leftMargin: 24
63                    right: parent.right
64                    top: titleRect.bottom
65                }
66
67                color: '#303030'
68                height: 32
69
70                Text {
71                    anchors {
72                        fill: parent
73                        margins: 6
74                    }
75                    color: 'white'
76                    text: model.modified + "\t" + model.created + "\t" + model.resource
77                }
78
79            }
80        }
81
82        add: Transition {
83            NumberAnimation { properties: "x,y"; from: 100; duration: 1000 }
84        }
85        addDisplaced: Transition {
86            NumberAnimation { properties: "x,y"; duration: 1000 }
87        }
88        displaced: Transition {
89            NumberAnimation { properties: "x,y"; duration: 1000 }
90        }
91        move: Transition {
92            NumberAnimation { properties: "x,y"; duration: 1000 }
93        }
94        moveDisplaced: Transition {
95            NumberAnimation { properties: "x,y"; duration: 1000 }
96        }
97        // populate: Transition {
98        //     NumberAnimation { properties: "x,y"; duration: 1000 }
99        // }
100        removeDisplaced: Transition {
101            NumberAnimation { properties: "x,y"; duration: 1000 }
102        }
103        remove: Transition {
104            ParallelAnimation {
105                NumberAnimation { property: "opacity"; to: 0; duration: 1000 }
106                NumberAnimation { properties: "x,y"; to: 100; duration: 1000 }
107            }
108        }
109    }
110}
111