Rename QDeclarative symbols to QQuick and QQml
[profile/ivi/qtdeclarative.git] / tests / auto / quick / qquickvisualdatamodel / data / packageView.qml
1 import QtQuick 2.0
2
3 Item {
4     width: 240
5     height: 320
6
7     Component {
8         id: myDelegate
9
10         Package {
11             Rectangle {
12                 id: leftWrapper
13                 objectName: "wrapper"
14                 Package.name: "left"
15                 height: 20
16                 width: 120
17                 Text {
18                     text: index
19                 }
20                 color: ListView.isCurrentItem ? "lightsteelblue" : "white"
21             }
22             Rectangle {
23                 id: rightWrapper
24                 objectName: "wrapper"
25                 Package.name: "right"
26                 height: 20
27                 width: 120
28                 Text {
29                     text: index
30                 }
31                 color: ListView.isCurrentItem ? "lightsteelblue" : "white"
32             }
33         }
34
35     }
36
37     VisualDataModel {
38         id: visualModel
39
40         delegate: myDelegate
41         model: testModel
42     }
43
44     ListView {
45         id: leftList
46         objectName: "leftList"
47         anchors {
48             left: parent.left; top: parent.top;
49             right: parent.horizontalCenter; bottom: parent.bottom
50         }
51         model: visualModel.parts.left
52     }
53
54     ListView {
55         id: rightList
56         objectName: "rightList"
57         anchors {
58             left: parent.horizontalCenter; top: parent.top;
59             right: parent.right; bottom: parent.bottom
60         }
61         model: visualModel.parts.right
62     }
63 }