aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexei Cazacov <alexei.cazacov@qt.io>2025-02-11 13:04:44 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-03-01 01:07:00 +0000
commit2abffd2bb09d385bad5a0cc75e67a1f7db676cb5 (patch)
tree0ce9ba1c340f7a35dd0bd7c685e8ab0737958450
parent23a01d864d640ca182256699eac219597d5f5d54 (diff)
Docs: correct the documentation for ParticleAffector and its derivatives
This commit fixes the issue when the ParticleAffector derivatives were marked as Affector derivatives which was wrong and led to confusion. Fixes: QTBUG-130764 Change-Id: Id4fb83db32d8b674b705fa1065a6bb1c3f44ad3b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a28b3303b241e23f5bdcbd103868ac9e25394297) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2386777070a779eb216e93df87d93d602be0e704)
-rw-r--r--src/particles/qquickage.cpp2
-rw-r--r--src/particles/qquickcustomaffector.cpp14
-rw-r--r--src/particles/qquickfriction.cpp2
-rw-r--r--src/particles/qquickgravity.cpp2
-rw-r--r--src/particles/qquickgroupgoal.cpp2
-rw-r--r--src/particles/qquickparticleaffector.cpp30
-rw-r--r--src/particles/qquickpointattractor.cpp2
-rw-r--r--src/particles/qquickspritegoal.cpp2
-rw-r--r--src/particles/qquickturbulence.cpp2
-rw-r--r--src/particles/qquickwander.cpp2
10 files changed, 36 insertions, 24 deletions
diff --git a/src/particles/qquickage.cpp b/src/particles/qquickage.cpp
index 5b1a4544f7..0d3ced9308 100644
--- a/src/particles/qquickage.cpp
+++ b/src/particles/qquickage.cpp
@@ -8,7 +8,7 @@ QT_BEGIN_NAMESPACE
\qmltype Age
\nativetype QQuickAgeAffector
\inqmlmodule QtQuick.Particles
- \inherits Affector
+ \inherits ParticleAffector
\brief For altering particle ages.
\ingroup qtquick-particles
diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp
index 2ba7b4c536..2240dbfcef 100644
--- a/src/particles/qquickcustomaffector.cpp
+++ b/src/particles/qquickcustomaffector.cpp
@@ -10,7 +10,19 @@
QT_BEGIN_NAMESPACE
-//TODO: Move docs (and inheritence) to real base when docs can propagate. Currently this pretends to be the base class!
+/*!
+ \qmltype Affector
+ \nativetype QQuickCustomAffector
+ \inqmlmodule QtQuick.Particles
+ \brief Applies alterations to the attributes of logical particles at any
+ point in their lifetime.
+ \inherits ParticleAffector
+ \ingroup qtquick-particles
+
+ Custom Affector manipulates the properties of the particles directly in
+ JavaScript.
+*/
+
/*!
\qmlsignal QtQuick.Particles::Affector::affectParticles(Array particles, real dt)
diff --git a/src/particles/qquickfriction.cpp b/src/particles/qquickfriction.cpp
index b3150871d6..ffbd77ad36 100644
--- a/src/particles/qquickfriction.cpp
+++ b/src/particles/qquickfriction.cpp
@@ -10,7 +10,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickFrictionAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief For applying friction proportional to the particle's current velocity.
*/
diff --git a/src/particles/qquickgravity.cpp b/src/particles/qquickgravity.cpp
index 3f21bcdbc4..2248b7f772 100644
--- a/src/particles/qquickgravity.cpp
+++ b/src/particles/qquickgravity.cpp
@@ -11,7 +11,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickGravityAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief For applying acceleration in an angle.
This element will accelerate all affected particles to a vector of
diff --git a/src/particles/qquickgroupgoal.cpp b/src/particles/qquickgroupgoal.cpp
index 4e07ac67f7..786b4aaa11 100644
--- a/src/particles/qquickgroupgoal.cpp
+++ b/src/particles/qquickgroupgoal.cpp
@@ -14,7 +14,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickGroupGoalAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief For changing the state of a group of a particle.
*/
diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp
index 88737b3ec7..051ea1c9f5 100644
--- a/src/particles/qquickparticleaffector.cpp
+++ b/src/particles/qquickparticleaffector.cpp
@@ -9,14 +9,14 @@
QT_BEGIN_NAMESPACE
/*!
- \qmltype Affector
+ \qmltype ParticleAffector
//! \nativetype QQuickParticleAffector
\inqmlmodule QtQuick.Particles
\brief Applies alterations to the attributes of logical particles at any
point in their lifetime.
\ingroup qtquick-particles
- The base Affector does not alter any attributes, but can be used to emit a signal
+ The base ParticleAffector does not alter any attributes, but can be used to emit a signal
when a particle meets certain conditions.
If an affector has a defined size, then it will only affect particles within its size and
@@ -35,33 +35,33 @@ possible on some hardware, but on less capable hardware you should expect small
simulation as simulates with worse granularity.
*/
/*!
- \qmlproperty ParticleSystem QtQuick.Particles::Affector::system
+ \qmlproperty ParticleSystem QtQuick.Particles::ParticleAffector::system
This is the system which will be affected by the element.
- If the Affector is a direct child of a ParticleSystem, it will automatically be associated with
+ If the ParticleAffector is a direct child of a ParticleSystem, it will automatically be associated with
it.
*/
/*!
- \qmlproperty list<string> QtQuick.Particles::Affector::groups
+ \qmlproperty list<string> QtQuick.Particles::ParticleAffector::groups
Which logical particle groups will be affected.
If empty, it will affect all particles.
*/
/*!
- \qmlproperty list<string> QtQuick.Particles::Affector::whenCollidingWith
- If any logical particle groups are specified here, then the affector
+ \qmlproperty list<string> QtQuick.Particles::ParticleAffector::whenCollidingWith
+ If any logical particle groups are specified here, then the particle affector
will only be triggered if the particle being examined intersects with
a particle of one of these groups.
This is different from the groups property. The groups property selects which
particles might be examined, and if they meet other criteria (including being
- within the bounds of the Affector, modified by shape) then they will be tested
+ within the bounds of the ParticleAffector, modified by shape) then they will be tested
again to see if they intersect with a particles from one of the particle groups
in whenCollidingWith.
By default, no groups are specified.
*/
/*!
- \qmlproperty bool QtQuick.Particles::Affector::enabled
+ \qmlproperty bool QtQuick.Particles::ParticleAffector::enabled
If enabled is set to false, this affector will not affect any particles.
Usually this is used to conditionally turn an affector on or off.
@@ -69,7 +69,7 @@ simulation as simulates with worse granularity.
Default value is true.
*/
/*!
- \qmlproperty bool QtQuick.Particles::Affector::once
+ \qmlproperty bool QtQuick.Particles::ParticleAffector::once
If once is set to true, this affector will only affect each particle
once in their lifetimes. If the affector normally simulates a continuous
effect over time, then it will simulate the effect of one second of time
@@ -78,19 +78,19 @@ simulation as simulates with worse granularity.
Default value is false.
*/
/*!
- \qmlproperty Shape QtQuick.Particles::Affector::shape
+ \qmlproperty Shape QtQuick.Particles::ParticleAffector::shape
If a size has been defined, the shape property can be used to affect a
non-rectangular area.
*/
/*!
- \qmlsignal QtQuick.Particles::Affector::affected(real x, real y)
+ \qmlsignal QtQuick.Particles::ParticleAffector::affected(real x, real y)
This signal is emitted when a particle is selected to be affected. It will not be emitted
- if a particle is considered by the Affector but not actually altered in any way.
+ if a particle is considered by the ParticleAffector but not actually altered in any way.
- In the special case where an Affector has no possible effect (e.g. Affector {}), this signal
+ In the special case where an ParticleAffector has no possible effect (e.g. ParticleAffector {}), this signal
will be emitted for all particles being considered if you connect to it. This allows you to
- execute arbitrary code in response to particles (use the Affector::onAffectParticles
+ execute arbitrary code in response to particles (use the ParticleAffector::onAffectParticles
signal handler if you want to execute code which affects the particles
themselves). As this executes JavaScript code per particle, it is not recommended to use this
signal with a high-volume particle system.
diff --git a/src/particles/qquickpointattractor.cpp b/src/particles/qquickpointattractor.cpp
index 5a8ee8ef92..91c9d25295 100644
--- a/src/particles/qquickpointattractor.cpp
+++ b/src/particles/qquickpointattractor.cpp
@@ -10,7 +10,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickAttractorAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief Attracts particles towards a specific point.
Like other affectors, Attractor has the standard properties x, y, width,
diff --git a/src/particles/qquickspritegoal.cpp b/src/particles/qquickspritegoal.cpp
index 06b3070157..481445fe22 100644
--- a/src/particles/qquickspritegoal.cpp
+++ b/src/particles/qquickspritegoal.cpp
@@ -14,7 +14,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickSpriteGoalAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-images-sprites
- \inherits Affector
+ \inherits ParticleAffector
\brief For changing the state of a sprite particle.
*/
diff --git a/src/particles/qquickturbulence.cpp b/src/particles/qquickturbulence.cpp
index 4771824f2a..d14acc8b43 100644
--- a/src/particles/qquickturbulence.cpp
+++ b/src/particles/qquickturbulence.cpp
@@ -16,7 +16,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickTurbulenceAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief Provides fluid-like forces from a noise image.
The Turbulence Element scales the noise source over the area it affects,
diff --git a/src/particles/qquickwander.cpp b/src/particles/qquickwander.cpp
index 4593f1911f..cd15de2a0b 100644
--- a/src/particles/qquickwander.cpp
+++ b/src/particles/qquickwander.cpp
@@ -10,7 +10,7 @@ QT_BEGIN_NAMESPACE
\nativetype QQuickWanderAffector
\inqmlmodule QtQuick.Particles
\ingroup qtquick-particles
- \inherits Affector
+ \inherits ParticleAffector
\brief For applying random particle trajectory.
*/