QML value-type wrapper around PhosphorAnimation::Easing.
More...
#include <phosphor-animation/include/PhosphorAnimation/PhosphorEasing.h>
QML value-type wrapper around PhosphorAnimation::Easing.
Q_GADGET per Phase 4 decision O — value semantics (stack-allocated, copy-constructible, snapshot at bind time). Used as a property shape inside PhosphorProfile { curve: PhosphorEasing { type: ... } } and as a structured literal for PhosphorMotionAnimation.profile.
Every parameter is mirrored to a Q_PROPERTY delegating to the underlying Easing value. The enum is re-exported as Type so QML can reference PhosphorEasing.CubicBezier etc. without knowing the underlying nested enum.
Serialization
fromString / toString round-trip through the C++ Easing wire format — no QML-specific form. A config that has a curve string can be reconstituted with PhosphorEasing.fromString(str) in QML.
◆ Type
| Enumerator |
|---|
| CubicBezier | |
| ElasticIn | |
| ElasticOut | |
| ElasticInOut | |
| BounceIn | |
| BounceOut | |
| BounceInOut | |
◆ PhosphorEasing() [1/2]
| PhosphorAnimation::PhosphorEasing::PhosphorEasing |
( |
| ) |
|
|
default |
◆ PhosphorEasing() [2/2]
| PhosphorAnimation::PhosphorEasing::PhosphorEasing |
( |
const Easing & |
value | ) |
|
|
inlineexplicit |
Implicit-conversion ctor so core-library code can hand a bare Easing value into the QML boundary without a wrapping call.
◆ amplitude()
| qreal PhosphorAnimation::PhosphorEasing::amplitude |
( |
| ) |
const |
|
inline |
◆ bounces()
| int PhosphorAnimation::PhosphorEasing::bounces |
( |
| ) |
const |
|
inline |
◆ fromString()
| static PhosphorEasing PhosphorAnimation::PhosphorEasing::fromString |
( |
const QString & |
str | ) |
|
|
inlinestatic |
Parse the same wire format.
Invalid input yields a default- constructed (OutCubic bezier) PhosphorEasing, matching the core library's fault-tolerant parse contract.
◆ operator!=()
| bool PhosphorAnimation::PhosphorEasing::operator!= |
( |
const PhosphorEasing & |
other | ) |
const |
|
inline |
◆ operator==()
| bool PhosphorAnimation::PhosphorEasing::operator== |
( |
const PhosphorEasing & |
other | ) |
const |
|
inline |
◆ period()
| qreal PhosphorAnimation::PhosphorEasing::period |
( |
| ) |
const |
|
inline |
◆ setAmplitude()
| void PhosphorAnimation::PhosphorEasing::setAmplitude |
( |
qreal |
v | ) |
|
|
inline |
◆ setBounces()
| void PhosphorAnimation::PhosphorEasing::setBounces |
( |
int |
v | ) |
|
|
inline |
◆ setPeriod()
| void PhosphorAnimation::PhosphorEasing::setPeriod |
( |
qreal |
v | ) |
|
|
inline |
◆ setType()
| void PhosphorAnimation::PhosphorEasing::setType |
( |
Type |
t | ) |
|
|
inline |
◆ setX1()
| void PhosphorAnimation::PhosphorEasing::setX1 |
( |
qreal |
v | ) |
|
|
inline |
◆ setX2()
| void PhosphorAnimation::PhosphorEasing::setX2 |
( |
qreal |
v | ) |
|
|
inline |
◆ setY1()
| void PhosphorAnimation::PhosphorEasing::setY1 |
( |
qreal |
v | ) |
|
|
inline |
◆ setY2()
| void PhosphorAnimation::PhosphorEasing::setY2 |
( |
qreal |
v | ) |
|
|
inline |
◆ toString()
| QString PhosphorAnimation::PhosphorEasing::toString |
( |
| ) |
const |
|
inline |
◆ type()
| Type PhosphorAnimation::PhosphorEasing::type |
( |
| ) |
const |
|
inline |
◆ value()
| const Easing & PhosphorAnimation::PhosphorEasing::value |
( |
| ) |
const |
|
inline |
Read-only access to the underlying value.
The non-const overload was deliberately removed: a mutable handle from QML let scripts bypass the setter clamps below by writing directly into the underlying Easing fields. Core-library mutators construct a fresh Easing and assign through the implicit-conversion ctor.
◆ x1()
| qreal PhosphorAnimation::PhosphorEasing::x1 |
( |
| ) |
const |
|
inline |
◆ x2()
| qreal PhosphorAnimation::PhosphorEasing::x2 |
( |
| ) |
const |
|
inline |
◆ y1()
| qreal PhosphorAnimation::PhosphorEasing::y1 |
( |
| ) |
const |
|
inline |
◆ y2()
| qreal PhosphorAnimation::PhosphorEasing::y2 |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: