aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-04 01:00:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-10-04 11:29:16 +0200
commit9c7121df1579d38c7f4136da6146d7acae8fedcc (patch)
tree0917e293d83b4c1ce635cf65185e6ad98fe66519 /src/particles
parentf529d38103a6c1c5c7b76ad92e0e5641719e369e (diff)
parentc211b93bb87308601fe1c808634eb648d1949c40 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
Diffstat (limited to 'src/particles')
-rw-r--r--src/particles/qquickimageparticle.cpp20
-rw-r--r--src/particles/qquickitemparticle.cpp20
-rw-r--r--src/particles/qquickparticleaffector.cpp2
-rw-r--r--src/particles/qquickparticleemitter.cpp15
4 files changed, 33 insertions, 24 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 649fbb30c2..bd3865f42f 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -179,7 +179,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_tabled.frag.qsb"));
}
- bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
+ bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@@ -216,7 +216,7 @@ public:
return true;
}
- void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
+ void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@@ -331,7 +331,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_deformed.frag.qsb"));
}
- bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
+ bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@@ -357,7 +357,7 @@ public:
return true;
}
- void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
+ void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@@ -487,7 +487,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_sprite.frag.qsb"));
}
- bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
+ bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@@ -524,7 +524,7 @@ public:
return true;
}
- void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
+ void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@@ -651,7 +651,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_colored.frag.qsb"));
}
- bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
+ bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@@ -677,7 +677,7 @@ public:
return true;
}
- void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
+ void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@@ -799,7 +799,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_simple.frag.qsb"));
}
- bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
+ bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@@ -825,7 +825,7 @@ public:
return true;
}
- void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
+ void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp
index e68ea54707..fc28864746 100644
--- a/src/particles/qquickitemparticle.cpp
+++ b/src/particles/qquickitemparticle.cpp
@@ -59,32 +59,38 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::freeze(Item item)
- Suspends the flow of time for the logical particle which item represents, allowing you to control its movement.
+ Suspends the flow of time for the logical particle which \a item represents,
+ allowing you to control its movement.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::unfreeze(Item item)
- Restarts the flow of time for the logical particle which item represents, allowing it to be moved by the particle system again.
+ Restarts the flow of time for the logical particle which \a item represents,
+ allowing it to be moved by the particle system again.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::take(Item item, bool prioritize)
- Asks the ItemParticle to take over control of item positioning temporarily.
+ Asks the ItemParticle to take over control of \a item positioning temporarily.
It will follow the movement of a logical particle when one is available.
- By default items form a queue when waiting for a logical particle, but if prioritize is true then it will go immediately to the
- head of the queue.
+ By default items form a queue when waiting for a logical particle, but if
+ \a prioritize is \c true, then it will go immediately to the head of the
+ queue.
ItemParticle does not take ownership of the item, and will relinquish
control when the logical particle expires. Commonly at this point you will
want to put it back in the queue, you can do this with the below line in
the delegate definition:
+
\code
ItemParticle.onDetached: itemParticleInstance.take(delegateRootItem);
\endcode
+
or delete it, such as with the below line in the delegate definition:
+
\code
ItemParticle.onDetached: delegateRootItem.destroy();
\endcode
@@ -93,7 +99,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::give(Item item)
- Orders the ItemParticle to give you control of the item. It will cease controlling it and the item will lose its association to the logical particle.
+ Orders the ItemParticle to give you control of the \a item. It will cease
+ controlling it and the item will lose its association to the logical
+ particle.
*/
/*!
diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp
index 3d6035c577..ffbd5674f0 100644
--- a/src/particles/qquickparticleaffector.cpp
+++ b/src/particles/qquickparticleaffector.cpp
@@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE
themselves). As this executes JavaScript code per particle, it is not recommended to use this
signal with a high-volume particle system.
- x,y is the particle's current position.
+ (\a {x}, \a {y}) is the particle's current position.
The corresponding handler is \c onAffected.
*/
diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp
index 4e36ad149a..c0d9fa941d 100644
--- a/src/particles/qquickparticleemitter.cpp
+++ b/src/particles/qquickparticleemitter.cpp
@@ -191,10 +191,10 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Particles::Emitter::emitParticles(Array particles)
- This signal is emitted when particles are emitted. particles is a JavaScript
+ This signal is emitted when particles are emitted. \a particles is a JavaScript
array of Particle objects. You can modify particle attributes directly within the handler.
- Note that JavaScript is slower to execute, so it is not recommended to use this in
+ \note JavaScript is slower to execute, so it is not recommended to use this in
high-volume particle systems.
The corresponding handler is \c onEmitParticles.
@@ -202,19 +202,20 @@ QT_BEGIN_NAMESPACE
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count)
- Emits count particles from this emitter immediately.
+ Emits a number of particles, specified by \a count, from this emitter immediately.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count, int x, int y)
- Emits count particles from this emitter immediately. The particles are emitted
- as if the Emitter was positioned at x,y but all other properties are the same.
+ Emits a number of particles, specified by \a count, from this emitter immediately.
+ The particles are emitted as if the Emitter was positioned at (\a {x}, \a {y}) but
+ all other properties are the same.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::pulse(int duration)
- If the emitter is not enabled, enables it for duration milliseconds and then switches
- it back off.
+ If the emitter is not enabled, enables it for a specified \a duration
+ (in milliseconds) and then switches it back off.
*/
QQuickParticleEmitter::QQuickParticleEmitter(QQuickItem *parent) :