Configuration for a single animation event. More...
#include <phosphor-animation/include/PhosphorAnimation/Profile.h>
Public Member Functions | |
| Profile ()=default | |
| Profile (const Profile &)=default | |
| Profile & | operator= (const Profile &)=default |
| Profile (Profile &&)=default | |
| Profile & | operator= (Profile &&)=default |
| qreal | effectiveDuration () const |
| int | effectiveMinDistance () const |
| SequenceMode | effectiveSequenceMode () const |
| int | effectiveStaggerInterval () const |
| Profile | withDefaults () const |
| Copy with every unset field filled from library defaults. | |
| QJsonObject | toJson () const |
| Serialize to JSON. Only set fields are emitted. | |
| bool | operator== (const Profile &other) const |
| bool | operator!= (const Profile &other) const |
Static Public Member Functions | |
| static Profile | fromJson (const QJsonObject &obj, const CurveRegistry ®istry) |
| Parse from JSON. | |
Public Attributes | |
| std::shared_ptr< const Curve > | curve |
| nullptr = inherit from parent / library default (outCubic bezier). | |
| std::optional< qreal > | duration |
| Animation length in ms. Spring curves derive their own settle time. | |
| std::optional< int > | minDistance |
| Skip threshold in px — animation skipped if distance < this and no size change. | |
| std::optional< SequenceMode > | sequenceMode |
| std::optional< int > | staggerInterval |
| Milliseconds between cascade starts. | |
| std::optional< QString > | presetName |
| Optional user-assigned preset name. Purely decorative for UI. | |
Static Public Attributes | |
| static constexpr qreal | DefaultDuration = 150.0 |
| static constexpr int | DefaultMinDistance = 0 |
| static constexpr SequenceMode | DefaultSequenceMode = SequenceMode::AllAtOnce |
| static constexpr int | DefaultStaggerInterval = 30 |
| static constexpr qreal | MaxDurationMs = 60.0 * 60.0 * 1000.0 |
| static constexpr int | MaxStaggerIntervalMs = 60 * 60 * 1000 |
| static constexpr auto | JsonFieldCurve = "curve" |
| static constexpr auto | JsonFieldDuration = "duration" |
| static constexpr auto | JsonFieldMinDistance = "minDistance" |
| static constexpr auto | JsonFieldSequenceMode = "sequenceMode" |
| static constexpr auto | JsonFieldStaggerInterval = "staggerInterval" |
| static constexpr auto | JsonFieldPresetName = "presetName" |
Configuration for a single animation event.
Fields are std::optional so ProfileTree inheritance can distinguish "inherit from parent" (nullopt) from "explicitly set" (engaged). Use effective*() getters or withDefaults() for runtime values with library defaults filled in.
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Parse from JSON.
Missing keys produce unset fields. Curve resolved via registry. Out-of-range values are rejected (logged, left unset).
|
inline |
|
default |
|
default |
| bool PhosphorAnimation::Profile::operator== | ( | const Profile & | other | ) | const |
| QJsonObject PhosphorAnimation::Profile::toJson | ( | ) | const |
Serialize to JSON. Only set fields are emitted.
| Profile PhosphorAnimation::Profile::withDefaults | ( | ) | const |
Copy with every unset field filled from library defaults.
Curve is left null if still unset.
nullptr = inherit from parent / library default (outCubic bezier).
|
staticconstexpr |
| std::optional<qreal> PhosphorAnimation::Profile::duration |
Animation length in ms. Spring curves derive their own settle time.
|
staticconstexpr |
| std::optional<int> PhosphorAnimation::Profile::minDistance |
Skip threshold in px — animation skipped if distance < this and no size change.
| std::optional<QString> PhosphorAnimation::Profile::presetName |
Optional user-assigned preset name. Purely decorative for UI.
| std::optional<SequenceMode> PhosphorAnimation::Profile::sequenceMode |
| std::optional<int> PhosphorAnimation::Profile::staggerInterval |
Milliseconds between cascade starts.