diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-20 04:31:09 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-20 04:31:09 (GMT) |
commit | 99f6250a4ac031b70757442715b226bc339ab699 (patch) | |
tree | ae7fd462b5255a0ed8cef079716f64749bc02e9c /tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml | |
parent | 178a4e12da0601ecc662851e5bf7f124932e1a12 (diff) | |
parent | e75088323ae15604139ddfd66b85cc3b8d43abeb (diff) | |
download | Qt-99f6250a4ac031b70757442715b226bc339ab699.zip Qt-99f6250a4ac031b70757442715b226bc339ab699.tar.gz Qt-99f6250a4ac031b70757442715b226bc339ab699.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (53 commits)
Be consistent in conversion from string (eg. color, int rounding).
Simplify code to make next change clearer.
Stop warnings.
Improve error messages when tests fail.
Stop highlight animators for highlightFollowsCurrentItem: false
Ensure valuetype enums can be assigned from JS
Improve testcase
Rename Component::errorsString() -> errorString() (and also for
Fixes for docs, example code
Make test more stable
Autotest (XFAIL) for QTBUG-10822
Add return value for resolveTypeInNamespace
Fix test
Fix test. Missed files.
Missing break
Create overview page for examples for Extending QML in C++
Search for QML import libraries also in application directory
Doc improvements
Disable mouse-based selection in TextInput/TextEdit
Rename qml executable to qmlviewer
...
Diffstat (limited to 'tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml new file mode 100644 index 0000000..dfab108 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml @@ -0,0 +1,64 @@ +import Qt 4.7 + +/* +Blue rect fills (with 10px margin) screen, then red, then green, then screen again. +*/ + +Rectangle { + id: whiteRect + width: 640; height: 480; + + Rectangle { + id: redRect + x: 400; y: 50 + width: 100; height: 100 + color: "red" + } + + Rectangle { + id: greenRect + x: 100; y: 150 + width: 200; height: 300 + color: "green" + } + + Rectangle { + id: blueRect + x: 5; y: 5 + width: parent.width-10 + height: parent.height-10 + color: "lightblue" + + //Text { text: "Click me!"; anchors.centerIn: parent } + + MouseArea { + anchors.fill: parent + onClicked: { + switch(blueRect.state) { + case "": blueRect.state = "inRed"; break; + case "inRed": blueRect.state = "inGreen"; break; + case "inGreen": blueRect.state = ""; break; + } + } + } + + states: [ + State { + name: "inRed" + ParentChange { target: blueRect; parent: redRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 } + PropertyChanges { target: redRect; z: 1 } + }, + State { + name: "inGreen" + ParentChange { target: blueRect; parent: greenRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 } + PropertyChanges { target: greenRect; z: 1 } + } + ] + + transitions: Transition { + ParentAnimation { target: blueRect; //via: whiteRect; + NumberAnimation { properties: "x, y, width, height"; duration: 500 } + } + } + } +} |