Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativepathview / data / datamodel.qml
1 import QtQuick 1.0
2
3 PathView {
4     id: pathview
5     objectName: "pathview"
6     width: 240; height: 320
7     pathItemCount: testObject.pathItemCount
8
9     function checkProperties() {
10         testObject.error = false;
11         if (testObject.useModel && pathview.model != testData) {
12             console.log("model property incorrect");
13             testObject.error = true;
14         }
15     }
16
17     model: testObject.useModel ? testData : 0
18
19     delegate: Component {
20         id: myDelegate
21         Rectangle {
22             id: wrapper
23             objectName: "wrapper"
24             property bool onPath: PathView.onPath
25             width: 20; height: 20; color: name
26             Text {
27                 objectName: "myText"
28                 text: name
29             }
30         }
31     }
32
33     path: Path {
34         startX: 120; startY: 20;
35         PathLine { x: 120; y: 300 }
36     }
37 }