QML value-type wrapper around PhosphorAnimation::Spring.
More...
#include <phosphor-animation/include/PhosphorAnimation/PhosphorSpring.h>
Public Member Functions | |
| PhosphorSpring ()=default | |
| PhosphorSpring (const Spring &value) | |
| Implicit-conversion ctor for core-library code. | |
| PhosphorSpring (qreal omega, qreal zeta) | |
| const Spring & | value () const |
| Read-only access to the underlying value. | |
| qreal | omega () const |
| void | setOmega (qreal v) |
| qreal | zeta () const |
| void | setZeta (qreal v) |
| QString | toString () const |
Canonical wire format from PhosphorAnimation::Spring::toString. | |
| bool | operator== (const PhosphorSpring &other) const |
| bool | operator!= (const PhosphorSpring &other) const |
Static Public Member Functions | |
| static PhosphorSpring | fromString (const QString &str) |
Parse "spring:omega,zeta" or "omega,zeta". | |
| static PhosphorSpring | snappy () |
| Responsive, slight overshoot. Good default for window snap. | |
| static PhosphorSpring | smooth () |
| Critically damped. No overshoot, firm approach. | |
| static PhosphorSpring | bouncy () |
| Visible bounce. Good for attention-grabbing feedback. | |
QML value-type wrapper around PhosphorAnimation::Spring.
Q_GADGET per Phase 4 decision O — value semantics. Usable as a property shape inside PhosphorProfile { curve: PhosphorSpring { omega: 14; zeta: 0.6 } }.
Parameter bounds (omega ∈ [0.1, 200], zeta ∈ [0.0, 10.0]) are enforced inside the C++ Spring constructor; writes through these setters clamp identically. Preset factories (snappy / smooth / bouncy) are re-exposed as Q_INVOKABLE static helpers so QML authors can reference the same named tunings C++ consumers use.
|
default |
|
inlineexplicit |
Implicit-conversion ctor for core-library code.
|
inline |
|
inlinestatic |
Visible bounce. Good for attention-grabbing feedback.
|
inlinestatic |
Parse "spring:omega,zeta" or "omega,zeta".
Invalid input yields a default-constructed Spring (omega=12, zeta=0.8).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Critically damped. No overshoot, firm approach.
|
inlinestatic |
Responsive, slight overshoot. Good default for window snap.
|
inline |
Canonical wire format from PhosphorAnimation::Spring::toString.
|
inline |
|
inline |