• R/O
  • HTTP
  • SSH
  • HTTPS

Katie: Commit

C++ toolkit derived from the Qt 4.8 framework


Commit MetaInfo

Revision3d8568d24762ba6369eef3c181b659798d929a16 (tree)
Time2022-11-25 07:38:49
AuthorIvailo Monev <xakepa10@gmai...>
CommiterIvailo Monev

Log Message

QEasingCurve review

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>

Change Summary

Incremental Difference

--- a/package/archlinux/PKGBUILD
+++ b/package/archlinux/PKGBUILD
@@ -3,7 +3,7 @@
33 # https://wiki.archlinux.org/index.php/Arch_package_guidelines
44
55 pkgname=katie-git
6-pkgver=4.12.0.r7846.69f22fa63
6+pkgver=4.12.0.r7863.41bea107b
77 pkgrel=1
88 pkgdesc='C++ toolkit derived from the Qt 4.8 framework'
99 arch=('i486' 'i686' 'pentium4' 'x86_64' 'arm')
--- a/src/core/tools/qeasingcurve.cpp
+++ b/src/core/tools/qeasingcurve.cpp
@@ -28,9 +28,6 @@
2828
2929 */
3030
31-
32-
33-
3431 /*!
3532 \class QEasingCurve
3633 \since 4.6
@@ -119,190 +116,108 @@
119116
120117 The type of easing curve.
121118
122- \value Linear \inlineimage qeasingcurve-linear.png
123- \br
124- Easing curve for a linear (t) function:
119+ \value Linear Easing curve for a linear (t) function:
125120 velocity is constant.
126- \value InQuad \inlineimage qeasingcurve-inquad.png
127- \br
128- Easing curve for a quadratic (t^2) function:
121+ \value InQuad Easing curve for a quadratic (t^2) function:
129122 accelerating from zero velocity.
130- \value OutQuad \inlineimage qeasingcurve-outquad.png
131- \br
132- Easing curve for a quadratic (t^2) function:
123+ \value OutQuad Easing curve for a quadratic (t^2) function:
133124 decelerating to zero velocity.
134- \value InOutQuad \inlineimage qeasingcurve-inoutquad.png
135- \br
136- Easing curve for a quadratic (t^2) function:
125+ \value InOutQuad Easing curve for a quadratic (t^2) function:
137126 acceleration until halfway, then deceleration.
138- \value OutInQuad \inlineimage qeasingcurve-outinquad.png
139- \br
140- Easing curve for a quadratic (t^2) function:
127+ \value OutInQuad Easing curve for a quadratic (t^2) function:
141128 deceleration until halfway, then acceleration.
142- \value InCubic \inlineimage qeasingcurve-incubic.png
143- \br
144- Easing curve for a cubic (t^3) function:
129+ \value InCubic Easing curve for a cubic (t^3) function:
145130 accelerating from zero velocity.
146- \value OutCubic \inlineimage qeasingcurve-outcubic.png
147- \br
148- Easing curve for a cubic (t^3) function:
131+ \value OutCubic Easing curve for a cubic (t^3) function:
149132 decelerating to zero velocity.
150- \value InOutCubic \inlineimage qeasingcurve-inoutcubic.png
151- \br
152- Easing curve for a cubic (t^3) function:
133+ \value InOutCubic Easing curve for a cubic (t^3) function:
153134 acceleration until halfway, then deceleration.
154- \value OutInCubic \inlineimage qeasingcurve-outincubic.png
155- \br
156- Easing curve for a cubic (t^3) function:
135+ \value OutInCubic Easing curve for a cubic (t^3) function:
157136 deceleration until halfway, then acceleration.
158- \value InQuart \inlineimage qeasingcurve-inquart.png
159- \br
160- Easing curve for a quartic (t^4) function:
137+ \value InQuart Easing curve for a quartic (t^4) function:
161138 accelerating from zero velocity.
162- \value OutQuart \inlineimage qeasingcurve-outquart.png
163- \br
164- Easing curve for a quartic (t^4) function:
139+ \value OutQuart Easing curve for a quartic (t^4) function:
165140 decelerating to zero velocity.
166- \value InOutQuart \inlineimage qeasingcurve-inoutquart.png
167- \br
168- Easing curve for a quartic (t^4) function:
141+ \value InOutQuart Easing curve for a quartic (t^4) function:
169142 acceleration until halfway, then deceleration.
170- \value OutInQuart \inlineimage qeasingcurve-outinquart.png
171- \br
172- Easing curve for a quartic (t^4) function:
143+ \value OutInQuart Easing curve for a quartic (t^4) function:
173144 deceleration until halfway, then acceleration.
174- \value InQuint \inlineimage qeasingcurve-inquint.png
175- \br
176- Easing curve for a quintic (t^5) easing
145+ \value InQuint Easing curve for a quintic (t^5) easing
177146 in: accelerating from zero velocity.
178- \value OutQuint \inlineimage qeasingcurve-outquint.png
179- \br
180- Easing curve for a quintic (t^5) function:
147+ \value OutQuint Easing curve for a quintic (t^5) function:
181148 decelerating to zero velocity.
182- \value InOutQuint \inlineimage qeasingcurve-inoutquint.png
183- \br
184- Easing curve for a quintic (t^5) function:
149+ \value InOutQuint Easing curve for a quintic (t^5) function:
185150 acceleration until halfway, then deceleration.
186- \value OutInQuint \inlineimage qeasingcurve-outinquint.png
187- \br
188- Easing curve for a quintic (t^5) function:
151+ \value OutInQuint Easing curve for a quintic (t^5) function:
189152 deceleration until halfway, then acceleration.
190- \value InSine \inlineimage qeasingcurve-insine.png
191- \br
192- Easing curve for a sinusoidal (sin(t)) function:
153+ \value InSine Easing curve for a sinusoidal (sin(t)) function:
193154 accelerating from zero velocity.
194- \value OutSine \inlineimage qeasingcurve-outsine.png
195- \br
196- Easing curve for a sinusoidal (sin(t)) function:
155+ \value OutSine Easing curve for a sinusoidal (sin(t)) function:
197156 decelerating from zero velocity.
198- \value InOutSine \inlineimage qeasingcurve-inoutsine.png
199- \br
200- Easing curve for a sinusoidal (sin(t)) function:
157+ \value InOutSine Easing curve for a sinusoidal (sin(t)) function:
201158 acceleration until halfway, then deceleration.
202- \value OutInSine \inlineimage qeasingcurve-outinsine.png
203- \br
204- Easing curve for a sinusoidal (sin(t)) function:
159+ \value OutInSine Easing curve for a sinusoidal (sin(t)) function:
205160 deceleration until halfway, then acceleration.
206- \value InExpo \inlineimage qeasingcurve-inexpo.png
207- \br
208- Easing curve for an exponential (2^t) function:
161+ \value InExpo Easing curve for an exponential (2^t) function:
209162 accelerating from zero velocity.
210- \value OutExpo \inlineimage qeasingcurve-outexpo.png
211- \br
212- Easing curve for an exponential (2^t) function:
163+ \value OutExpo Easing curve for an exponential (2^t) function:
213164 decelerating from zero velocity.
214- \value InOutExpo \inlineimage qeasingcurve-inoutexpo.png
215- \br
216- Easing curve for an exponential (2^t) function:
165+ \value InOutExpo Easing curve for an exponential (2^t) function:
217166 acceleration until halfway, then deceleration.
218- \value OutInExpo \inlineimage qeasingcurve-outinexpo.png
219- \br
220- Easing curve for an exponential (2^t) function:
167+ \value OutInExpo Easing curve for an exponential (2^t) function:
221168 deceleration until halfway, then acceleration.
222- \value InCirc \inlineimage qeasingcurve-incirc.png
223- \br
224- Easing curve for a circular (sqrt(1-t^2)) function:
169+ \value InCirc Easing curve for a circular (sqrt(1-t^2)) function:
225170 accelerating from zero velocity.
226- \value OutCirc \inlineimage qeasingcurve-outcirc.png
227- \br
228- Easing curve for a circular (sqrt(1-t^2)) function:
171+ \value OutCirc Easing curve for a circular (sqrt(1-t^2)) function:
229172 decelerating from zero velocity.
230- \value InOutCirc \inlineimage qeasingcurve-inoutcirc.png
231- \br
232- Easing curve for a circular (sqrt(1-t^2)) function:
173+ \value InOutCirc Easing curve for a circular (sqrt(1-t^2)) function:
233174 acceleration until halfway, then deceleration.
234- \value OutInCirc \inlineimage qeasingcurve-outincirc.png
235- \br
236- Easing curve for a circular (sqrt(1-t^2)) function:
175+ \value OutInCirc Easing curve for a circular (sqrt(1-t^2)) function:
237176 deceleration until halfway, then acceleration.
238- \value InElastic \inlineimage qeasingcurve-inelastic.png
239- \br
240- Easing curve for an elastic
177+ \value InElastic Easing curve for an elastic
241178 (exponentially decaying sine wave) function:
242179 accelerating from zero velocity. The peak amplitude
243180 can be set with the \e amplitude parameter, and the
244181 period of decay by the \e period parameter.
245- \value OutElastic \inlineimage qeasingcurve-outelastic.png
246- \br
247- Easing curve for an elastic
182+ \value OutElastic Easing curve for an elastic
248183 (exponentially decaying sine wave) function:
249184 decelerating from zero velocity. The peak amplitude
250185 can be set with the \e amplitude parameter, and the
251186 period of decay by the \e period parameter.
252- \value InOutElastic \inlineimage qeasingcurve-inoutelastic.png
253- \br
254- Easing curve for an elastic
187+ \value InOutElastic Easing curve for an elastic
255188 (exponentially decaying sine wave) function:
256189 acceleration until halfway, then deceleration.
257- \value OutInElastic \inlineimage qeasingcurve-outinelastic.png
258- \br
259- Easing curve for an elastic
190+ \value OutInElastic Easing curve for an elastic
260191 (exponentially decaying sine wave) function:
261192 deceleration until halfway, then acceleration.
262- \value InBack \inlineimage qeasingcurve-inback.png
263- \br
264- Easing curve for a back (overshooting
193+ \value InBack Easing curve for a back (overshooting
265194 cubic function: (s+1)*t^3 - s*t^2) easing in:
266195 accelerating from zero velocity.
267- \value OutBack \inlineimage qeasingcurve-outback.png
268- \br
269- Easing curve for a back (overshooting
196+ \value OutBack Easing curve for a back (overshooting
270197 cubic function: (s+1)*t^3 - s*t^2) easing out:
271198 decelerating to zero velocity.
272- \value InOutBack \inlineimage qeasingcurve-inoutback.png
273- \br
274- Easing curve for a back (overshooting
199+ \value InOutBack Easing curve for a back (overshooting
275200 cubic function: (s+1)*t^3 - s*t^2) easing in/out:
276201 acceleration until halfway, then deceleration.
277- \value OutInBack \inlineimage qeasingcurve-outinback.png
278- \br
279- Easing curve for a back (overshooting
202+ \value OutInBack Easing curve for a back (overshooting
280203 cubic easing: (s+1)*t^3 - s*t^2) easing out/in:
281204 deceleration until halfway, then acceleration.
282- \value InBounce \inlineimage qeasingcurve-inbounce.png
283- \br
284- Easing curve for a bounce (exponentially
205+ \value InBounce Easing curve for a bounce (exponentially
285206 decaying parabolic bounce) function: accelerating
286207 from zero velocity.
287- \value OutBounce \inlineimage qeasingcurve-outbounce.png
288- \br
289- Easing curve for a bounce (exponentially
208+ \value OutBounce Easing curve for a bounce (exponentially
290209 decaying parabolic bounce) function: decelerating
291210 from zero velocity.
292- \value InOutBounce \inlineimage qeasingcurve-inoutbounce.png
293- \br
294- Easing curve for a bounce (exponentially
211+ \value InOutBounce Easing curve for a bounce (exponentially
295212 decaying parabolic bounce) function easing in/out:
296213 acceleration until halfway, then deceleration.
297- \value OutInBounce \inlineimage qeasingcurve-outinbounce.png
298- \br
299- Easing curve for a bounce (exponentially
214+ \value OutInBounce Easing curve for a bounce (exponentially
300215 decaying parabolic bounce) function easing out/in:
301216 deceleration until halfway, then acceleration.
302- \omitvalue InCurve
303- \omitvalue OutCurve
304- \omitvalue SineCurve
305- \omitvalue CosineCurve
217+ \value InCurve
218+ \value OutCurve
219+ \value SineCurve
220+ \value CosineCurve
306221 \value Custom This is returned if the user specified a custom curve type with
307222 setCustomType(). Note that you cannot call setType() with this value,
308223 but type() can return it.
@@ -312,10 +227,7 @@
312227 /*!
313228 \typedef QEasingCurve::EasingFunction
314229
315- This is a typedef for a pointer to a function with the following
316- signature:
317-
318- \snippet doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp 0
230+ This is a typedef for a pointer to a function.
319231 */
320232
321233 #include "qeasingcurve.h"
@@ -404,8 +316,7 @@ QEasingCurve &QEasingCurve::operator=(const QEasingCurve &other)
404316 */
405317 bool QEasingCurve::operator==(const QEasingCurve &other) const
406318 {
407- bool res = d_ptr->type == other.d_ptr->type
408- && d_ptr->func == other.d_ptr->func;
319+ bool res = (d_ptr->type == other.d_ptr->type && d_ptr->func == other.d_ptr->func);
409320 if (res) {
410321 res = qFuzzyCompare(period(), other.period()) &&
411322 qFuzzyCompare(amplitude(), other.amplitude()) &&
@@ -509,7 +420,6 @@ void QEasingCurve::setType(Type type)
509420 qWarning("QEasingCurve: Invalid curve type %d", type);
510421 return;
511422 }
512-
513423 d_ptr->type = type;
514424 d_ptr->func = nullptr;
515425 }
@@ -542,7 +452,7 @@ void QEasingCurve::setCustomType(EasingFunction func)
542452 */
543453 QEasingCurve::EasingFunction QEasingCurve::customType() const
544454 {
545- return d_ptr->type == QEasingCurve::Custom ? d_ptr->func : nullptr;
455+ return (d_ptr->type == QEasingCurve::Custom ? d_ptr->func : nullptr);
546456 }
547457
548458 #define BOUND_PERIOD(per) (per < 0) ? s_defaultperiod : per
Show on old repository browser