Rename QDeclarative symbols to QQuick and QQml
[profile/ivi/qtdeclarative.git] / tests / auto / quick / qquickvisualdatamodel / data / singleroleproperties.qml
1 import QtQuick 2.0
2 import tst_qquickvisualdatamodel 1.0
3
4 ListView {
5     width: 100
6     height: 100
7     model: VisualDataModel {
8         id: visualModel
9         objectName: "visualModel"
10
11         groups: [
12             VisualDataGroup { id: visibleItems; objectName: "visibleItems"; name: "visible"; includeByDefault: true },
13             VisualDataGroup { id: selectedItems; objectName: "selectedItems"; name: "selected" }
14         ]
15
16         model: SingleRoleModel {}
17
18         delegate: Item {
19             id: delegate
20
21             objectName: "delegate"
22             width: 100
23             height: 2
24             property variant test1: index
25             property variant test2: model.index
26             property variant test3: name
27             property variant test4: model.name
28             property variant test5: modelData
29             property variant test6: model.modelData
30
31
32             function setTest3(arg) { name = arg }
33             function setTest4(arg) { model.name = arg }
34             function setTest5(arg) { modelData = arg }
35             function setTest6(arg) { model.modelData = arg }
36         }
37
38     }
39 }