diff options
Diffstat (limited to 'tests/auto/quick/qquicksmoothedanimation/data')
7 files changed, 90 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicksmoothedanimation/data/deleteOnUpdate.qml b/tests/auto/quick/qquicksmoothedanimation/data/deleteOnUpdate.qml new file mode 100644 index 0000000000..ff8dfaa846 --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/deleteOnUpdate.qml @@ -0,0 +1,27 @@ +import QtQuick 2.0 + +Rectangle { + width: 300; height: 300; + + Rectangle { + color: "red" + width: 60; height: 60; + x: 100; y: 100; + + property real prevX: 100 + onXChanged: { + if (x - prevX > 10) { + anim.to += 5 + anim.restart(); //this can cause deletion of backend animation classes + prevX = x; + } + } + + SmoothedAnimation on x { + id: anim + objectName: "anim" + velocity: 100 + to: 150 + } + } +} diff --git a/tests/auto/quick/qquicksmoothedanimation/data/simpleanimation.qml b/tests/auto/quick/qquicksmoothedanimation/data/simpleanimation.qml new file mode 100644 index 0000000000..b2be63ec94 --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/simpleanimation.qml @@ -0,0 +1,12 @@ +import QtQuick 2.0 + +Rectangle { + width: 300; height: 300; + Rectangle { + objectName: "rect" + color: "red" + width: 60; height: 60; + x: 100; y: 100; + } + SmoothedAnimation { objectName: "anim"} +}
\ No newline at end of file diff --git a/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation1.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation1.qml new file mode 100644 index 0000000000..3631f971f0 --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation1.qml @@ -0,0 +1,3 @@ +import QtQuick 2.0 + +SmoothedAnimation {} diff --git a/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation2.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation2.qml new file mode 100644 index 0000000000..b07120234a --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation2.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +SmoothedAnimation { + to: 10; duration: 300; reversingMode: SmoothedAnimation.Immediate +} diff --git a/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation3.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation3.qml new file mode 100644 index 0000000000..8d5dc4a92b --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimation3.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +SmoothedAnimation { + to: 10; velocity: 250; reversingMode: SmoothedAnimation.Sync + maximumEasingTime: 150 +} diff --git a/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationBehavior.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationBehavior.qml new file mode 100644 index 0000000000..81d36bf015 --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationBehavior.qml @@ -0,0 +1,24 @@ +import QtQuick 2.0 + +Rectangle { + width: 400; height: 400; color: "blue" + + Rectangle { + id: rect1 + color: "red" + width: 60; height: 60; + x: 100; y: 100; + SmoothedAnimation on x { to: 200; velocity: 500 } + SmoothedAnimation on y { to: 200; velocity: 500 } + } + + Rectangle { + objectName: "theRect" + color: "green" + width: 60; height: 60; + x: rect1.x; y: rect1.y; + // id are needed for SmoothedAnimation in order to avoid deferred creation + Behavior on x { SmoothedAnimation { id: anim1; objectName: "easeX"; velocity: 400 } } + Behavior on y { SmoothedAnimation { id: anim2; objectName: "easeY"; velocity: 400 } } + } + } diff --git a/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationValueSource.qml b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationValueSource.qml new file mode 100644 index 0000000000..e136df84f6 --- /dev/null +++ b/tests/auto/quick/qquicksmoothedanimation/data/smoothedanimationValueSource.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 + +Rectangle { + width: 300; height: 300; + Rectangle { + objectName: "theRect" + color: "red" + width: 60; height: 60; + x: 100; y: 100; + SmoothedAnimation on x { objectName: "easeX"; to: 200; velocity: 500 } + SmoothedAnimation on y { objectName: "easeY"; to: 200; duration: 250; velocity: 500 } + } +} |