From 5df94d89033e7bbb3f41840a4c07a628ed66b4d5 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 25 Jun 2012 12:01:46 +1000 Subject: Rename speed -> velocity in the particle system Matches the convention set in the QtQuick module, for example by ListView and Flickable. Change-Id: I8df57ed1ced8128723d790c30c00cc1b2062787d Reviewed-by: Bea Lam --- .../testapplications/elements/content/AffectorElement.qml | 2 +- .../testapplications/elements/content/DirectionElement.qml | 8 ++++---- tests/testapplications/elements/content/EmitterElement.qml | 14 +++++++------- .../elements/content/ImageParticleElement.qml | 6 +++--- .../elements/content/ParticleSystemElement.qml | 2 +- tests/testapplications/elements/content/ShapeElement.qml | 4 ++-- .../elements/content/TrailEmitterElement.qml | 8 ++++---- tests/testapplications/listview/onRemove.qml | 2 +- tests/testapplications/listview/viewTransitions.qml | 4 ++-- 9 files changed, 25 insertions(+), 25 deletions(-) (limited to 'tests/testapplications') diff --git a/tests/testapplications/elements/content/AffectorElement.qml b/tests/testapplications/elements/content/AffectorElement.qml index f5507a686f..5e4b0a7d68 100644 --- a/tests/testapplications/elements/content/AffectorElement.qml +++ b/tests/testapplications/elements/content/AffectorElement.qml @@ -91,7 +91,7 @@ Item { height: 5 emitRate: 100 lifeSpan: 10000 - speed: AngleDirection { angle: 0; magnitude: 30 } + velocity: AngleDirection { angle: 0; magnitude: 30 } } // Affectors diff --git a/tests/testapplications/elements/content/DirectionElement.qml b/tests/testapplications/elements/content/DirectionElement.qml index c6c1dbc545..42a24a28d3 100644 --- a/tests/testapplications/elements/content/DirectionElement.qml +++ b/tests/testapplications/elements/content/DirectionElement.qml @@ -77,7 +77,7 @@ Item { emitRate: 50 lifeSpan: 4000 size: 20 - speed: angledirectionelement + velocity: angledirectionelement AngleDirection { id: angledirectionelement; angle: -75; angleVariation: 5; magnitude: 150 } TargetDirection { id: targetdirectionelement; targetItem: targetbox; targetVariation: 10; magnitude: 150 } PointDirection { id: pointdirectionelement; y: -100; xVariation: 10; yVariation: 10; } @@ -103,20 +103,20 @@ Item { "Next, let's change the Emitter to target an item." } }, State { name: "ontarget"; when: statenum == 2 - PropertyChanges { target: emitter; speed: targetdirectionelement } + PropertyChanges { target: emitter; velocity: targetdirectionelement } PropertyChanges { target: targeticon; height: 50; width: 50 } PropertyChanges { target: directionelementtest testtext: "The particles should be directed at the rectangle.\n"+ "Next, let's set an arbritary point to direct the particles to." } }, State { name: "onpoint"; when: statenum == 3 - PropertyChanges { target: emitter; speed: pointdirectionelement } + PropertyChanges { target: emitter; velocity: pointdirectionelement } PropertyChanges { target: directionelementtest testtext: "The particles should be directed upwards with a small amount of spread.\n"+ "Next, let's create a fountain with CumulativeDirection and a downward PointDirection" } }, State { name: "cumulative"; when: statenum == 4 - PropertyChanges { target: emitter; emitRate: 200; speed: cumulativedirectionelement + PropertyChanges { target: emitter; emitRate: 200; velocity: cumulativedirectionelement acceleration: pointdirectionelementdownward } PropertyChanges { target: imgparticle; color: "aqua"; colorVariation: .2 } PropertyChanges { target: directionelementtest diff --git a/tests/testapplications/elements/content/EmitterElement.qml b/tests/testapplications/elements/content/EmitterElement.qml index 617a93475e..87f5b31627 100644 --- a/tests/testapplications/elements/content/EmitterElement.qml +++ b/tests/testapplications/elements/content/EmitterElement.qml @@ -59,10 +59,10 @@ Item { Emitter { id: emitterelement anchors.centerIn: parent - property int emitspeed: 10 + property int emitvelocity: 10 emitRate: 5 lifeSpan: 1000 - speed: AngleDirection { angle: 0; angleVariation: 360; magnitude: emitterelement.emitspeed } + velocity: AngleDirection { angle: 0; angleVariation: 360; magnitude: emitterelement.emitvelocity } } } @@ -77,28 +77,28 @@ Item { PropertyChanges { target: emitterelementtest testtext: "This is an Emitter element, visualized by an ImageParticle. It should be emitting particles "+ "slowly from the center of the display.\n"+ - "Next, let's change the emission speed of the particles." } + "Next, let's change the emission velocity of the particles." } }, State { name: "fast"; when: statenum == 2 - PropertyChanges { target: emitterelement; emitspeed: 50 } + PropertyChanges { target: emitterelement; emitvelocity: 50 } PropertyChanges { target: emitterelementtest testtext: "The particles emitted should be moving more quickly.\n"+ "Next, let's increase the number of particles emitted." } }, State { name: "many"; when: statenum == 3 - PropertyChanges { target: emitterelement; emitspeed: 50; emitRate: 100 } + PropertyChanges { target: emitterelement; emitvelocity: 50; emitRate: 100 } PropertyChanges { target: emitterelementtest testtext: "The particles should now be quick and numerous.\n"+ "Next, let's allow them to survive longer." } }, State { name: "enduring"; when: statenum == 4 - PropertyChanges { target: emitterelement; emitspeed: 50; emitRate: 100; lifeSpan: 3000 } + PropertyChanges { target: emitterelement; emitvelocity: 50; emitRate: 100; lifeSpan: 3000 } PropertyChanges { target: emitterelementtest testtext: "The particles should now be enduring to the edges of the display.\n"+ "Next, let's have them changing their size." } }, State { name: "sized"; when: statenum == 5 - PropertyChanges { target: emitterelement; emitspeed: 50; emitRate: 100; lifeSpan: 3000; size: 20; endSize: 5 } + PropertyChanges { target: emitterelement; emitvelocity: 50; emitRate: 100; lifeSpan: 3000; size: 20; endSize: 5 } PropertyChanges { target: emitterelementtest testtext: "The particles should now be starting large and ending small.\n"+ "Advance to restart the test." } diff --git a/tests/testapplications/elements/content/ImageParticleElement.qml b/tests/testapplications/elements/content/ImageParticleElement.qml index cf98e157c6..75daa3807b 100644 --- a/tests/testapplications/elements/content/ImageParticleElement.qml +++ b/tests/testapplications/elements/content/ImageParticleElement.qml @@ -61,7 +61,7 @@ Item { anchors.centerIn: parent emitRate: 50 lifeSpan: 3000 - speed: AngleDirection { angle: 0; angleVariation: 360; magnitude: 60 } + velocity: AngleDirection { angle: 0; angleVariation: 360; magnitude: 60 } } } @@ -85,13 +85,13 @@ Item { "Next, let's get them spinning." } }, State { name: "spinning"; when: statenum == 3 - PropertyChanges { target: imageparticle; color: "lightgreen"; rotation: 360; rotationSpeed: 100 } + PropertyChanges { target: imageparticle; color: "lightgreen"; rotation: 360; rotationVelocity: 100 } PropertyChanges { target: imageparticleelementtest testtext: "The particles should now be green and spinning.\n"+ "Next, let's get them popping in and out." } }, State { name: "scaling"; when: statenum == 4 - PropertyChanges { target: imageparticle; color: "lightgreen"; rotation: 360; rotationSpeed: 100; entryEffect: ImageParticle.Scale } + PropertyChanges { target: imageparticle; color: "lightgreen"; rotation: 360; rotationVelocity: 100; entryEffect: ImageParticle.Scale } PropertyChanges { target: imageparticleelementtest testtext: "The particles should now be scaling in and out.\n"+ "Advance to restart the test." } diff --git a/tests/testapplications/elements/content/ParticleSystemElement.qml b/tests/testapplications/elements/content/ParticleSystemElement.qml index ba3892f912..5bc8b29ccd 100644 --- a/tests/testapplications/elements/content/ParticleSystemElement.qml +++ b/tests/testapplications/elements/content/ParticleSystemElement.qml @@ -55,7 +55,7 @@ Item { id: particleemitter x: 50; y: 200 emitRate: 100 - speed: AngleDirection { angle: 0; angleVariation: 360; magnitude: 100 } + velocity: AngleDirection { angle: 0; angleVariation: 360; magnitude: 100 } Rectangle { anchors.centerIn: parent; height: 1; width: 1; color: "black" } SequentialAnimation { running: true; paused: particlesystemelement.paused; loops: Animation.Infinite diff --git a/tests/testapplications/elements/content/ShapeElement.qml b/tests/testapplications/elements/content/ShapeElement.qml index c0ccd91696..6225a3d96a 100644 --- a/tests/testapplications/elements/content/ShapeElement.qml +++ b/tests/testapplications/elements/content/ShapeElement.qml @@ -67,7 +67,7 @@ Item { anchors.fill: parent emitRate: 500 lifeSpan: 2000 - speed: TargetDirection { + velocity: TargetDirection { targetX: particlesystem.width/2 targetY: particlesystem.height/2 proportionalMagnitude: true @@ -82,7 +82,7 @@ Item { anchors.fill: parent emitRate: 200 lifeSpan: 1000 - speed: TargetDirection { + velocity: TargetDirection { targetX: particlesystem.width/2 targetY: particlesystem.height/2 proportionalMagnitude: true diff --git a/tests/testapplications/elements/content/TrailEmitterElement.qml b/tests/testapplications/elements/content/TrailEmitterElement.qml index a151237993..9d3168b727 100644 --- a/tests/testapplications/elements/content/TrailEmitterElement.qml +++ b/tests/testapplications/elements/content/TrailEmitterElement.qml @@ -87,7 +87,7 @@ Item { emitRate: 1 lifeSpan: 3000 size: 20 - speed: AngleDirection { angle: 270; angleVariation: 25; magnitude: 150 } + velocity: AngleDirection { angle: 270; angleVariation: 25; magnitude: 150 } group: "orangemissile" } Emitter { @@ -98,7 +98,7 @@ Item { emitRate: 1 lifeSpan: 3000 size: 20 - speed: AngleDirection { angle: 270; angleVariation: 25; magnitude: 150 } + velocity: AngleDirection { angle: 270; angleVariation: 25; magnitude: 150 } group: "greenmissile" } Gravity { @@ -113,8 +113,8 @@ Item { anchors.fill: parent emitRatePerParticle: 50 lifeSpan: 1000 - speedFromMovement: .2 - speed: AngleDirection { angle: 0; angleVariation: 360; magnitude: 5 } + velocityFromMovement: .2 + velocity: AngleDirection { angle: 0; angleVariation: 360; magnitude: 5 } maximumEmitted: 500 shape: basicshape } diff --git a/tests/testapplications/listview/onRemove.qml b/tests/testapplications/listview/onRemove.qml index 2c1d52a40e..87ef9f6a09 100644 --- a/tests/testapplications/listview/onRemove.qml +++ b/tests/testapplications/listview/onRemove.qml @@ -68,7 +68,7 @@ Item { system: ps anchors.fill: parent enabled: false - speed: AngleDirection { + velocity: AngleDirection { angle: 0 angleVariation: 360 magnitude: 50 diff --git a/tests/testapplications/listview/viewTransitions.qml b/tests/testapplications/listview/viewTransitions.qml index 6ed7cc1619..92a9c6ffcc 100644 --- a/tests/testapplications/listview/viewTransitions.qml +++ b/tests/testapplications/listview/viewTransitions.qml @@ -68,7 +68,7 @@ Item { system: ps anchors.fill: parent enabled: false - speed: AngleDirection { + velocity: AngleDirection { angle: 0 angleVariation: 360 magnitude: 50 @@ -81,7 +81,7 @@ Item { anchors.fill: parent enabled: item.movn emitRate: parts - speed: AngleDirection { + velocity: AngleDirection { angle: 0 angleVariation: 360 magnitude: 2 -- cgit v1.2.3