diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-02-26 06:34:28 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-03-02 03:15:24 (GMT) |
commit | 05f9a6aa5d6e4f20eb4dacff3acea9d186867ab1 (patch) | |
tree | 4e67aee95c06cec5da195657132ba90f60f1c64a /tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml | |
parent | e71f8823d22c99a4da7de4f49463a05427186c0f (diff) | |
download | Qt-05f9a6aa5d6e4f20eb4dacff3acea9d186867ab1.zip Qt-05f9a6aa5d6e4f20eb4dacff3acea9d186867ab1.tar.gz Qt-05f9a6aa5d6e4f20eb4dacff3acea9d186867ab1.tar.bz2 |
Add NOTIFY signals to list, grid and path views
Reviewed-by: akennedy
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml new file mode 100644 index 0000000..db70b7b --- /dev/null +++ b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml @@ -0,0 +1,115 @@ +import Qt 4.6 + +Rectangle { + width: 350; height: 220; color: "white" + Component { + id: myDelegate + Item { + id: wrapper + width: 180; height: 40; + opacity: PathView.opacity + Column { + x: 5; y: 5 + Text { text: '<b>Name:</b> ' + name } + Text { text: '<b>Number:</b> ' + number } + } + } + } + + PathView { + snapPosition: 0.1 + dragMargin: 5.0 + id: pathView + objectName: "pathView" + anchors.fill: parent + model: listModel + delegate: myDelegate + focus: true + path: Path { + id: myPath + objectName: "path" + startX: 220; startY: 200 + PathAttribute { name: "opacity"; value: 1.0; objectName: "pathAttribute"; } + PathQuad { x: 220; y: 25; controlX: 260; controlY: 75 } + PathAttribute { name: "opacity"; value: 0.3 } + PathQuad { x: 220; y: 200; controlX: -20; controlY: 75 } + } + Timer { + interval: 2000; running: true; repeat: true + onTriggered: { + if (pathView.path == alternatePath) + pathView.path = myPath; + else + pathView.path = alternatePath; + } + } + } + + data:[ + ListModel { + id: listModel + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + ListElement { + name: "Bill Smith" + number: "555 3264" + } + ListElement { + name: "John Brown" + number: "555 8426" + } + ListElement { + name: "Sam Wise" + number: "555 0473" + } + }, + ListModel { + objectName: "alternateModel" + ListElement { + name: "Jack" + number: "555 8426" + } + ListElement { + name: "Mary" + number: "555 3264" + } + }, + Path { + id: alternatePath + objectName: "alternatePath" + startX: 100; startY: 40 + PathAttribute { name: "opacity"; value: 0.0 } + PathLine { x: 100; y: 160 } + PathAttribute { name: "opacity"; value: 0.2 } + PathLine { x: 300; y: 160 } + PathAttribute { name: "opacity"; value: 0.0 } + PathLine { x: 300; y: 40 } + PathAttribute { name: "opacity"; value: 0.2 } + PathLine { x: 100; y: 40 } + } + ] +} + + |