Hierarchical DecorationProfile storage with walk-up inheritance. More...
#include <PhosphorSurface/DecorationProfileTree.h>
Public Member Functions | |
| DecorationProfileTree ()=default | |
| DecorationProfileTree (const DecorationProfileTree &)=default | |
| DecorationProfileTree & | operator= (const DecorationProfileTree &)=default |
| DecorationProfileTree (DecorationProfileTree &&)=default | |
| DecorationProfileTree & | operator= (DecorationProfileTree &&)=default |
| DecorationProfile | resolve (const QString &surfacePath) const |
| DecorationProfileTree | withSeedDefaults (const DecorationProfileTree &seeds) const |
Two-layer seed overlay: returns a copy of this tree with seeds injected as the LOWEST-precedence layer — the same seed model as PhosphorAnimation::PhosphorProfileRegistry::resolveWithInheritance's low-precedence owner tag, expressed as a tree-to-tree merge. | |
| DecorationProfile | directOverride (const QString &surfacePath) const |
Returns the override stored directly at surfacePath, or a default-constructed (all-unset) profile when none exists — which is indistinguishable from a real all-unset override. | |
| bool | hasOverride (const QString &surfacePath) const |
| QStringList | overriddenPaths () const |
| void | setOverride (const QString &surfacePath, const DecorationProfile &profile) |
| bool | clearOverride (const QString &surfacePath) |
| void | clearAllOverrides () |
| DecorationProfile | baseline () const |
| void | setBaseline (const DecorationProfile &profile) |
| QJsonObject | toJson () const |
| bool | operator== (const DecorationProfileTree &other) const |
| bool | operator!= (const DecorationProfileTree &other) const |
Static Public Member Functions | |
| static DecorationProfileTree | fromJson (const QJsonObject &obj) |
Hierarchical DecorationProfile storage with walk-up inheritance.
Same inheritance semantics as PhosphorAnimationShaders::ShaderProfileTree but carrying DecorationProfile payloads (a decoration shader-pack chain plus its per-pack parameters) instead of ShaderProfile. Keyed on a dot-path surface namespace (DecorationSupportedPaths) so a consumer can resolve the decoration config for any surface.
For "window.tiled", resolve() walks:
Overlay order is shallowest-first so the deepest (most specific) override wins: each engaged optional replaces the accumulator, unset fields pass through.
Value type, not internally synchronized. Same as ShaderProfileTree.
|
default |
|
default |
|
default |
|
inline |
| void PhosphorSurfaceShaders::DecorationProfileTree::clearAllOverrides | ( | ) |
| bool PhosphorSurfaceShaders::DecorationProfileTree::clearOverride | ( | const QString & | surfacePath | ) |
| DecorationProfile PhosphorSurfaceShaders::DecorationProfileTree::directOverride | ( | const QString & | surfacePath | ) | const |
Returns the override stored directly at surfacePath, or a default-constructed (all-unset) profile when none exists — which is indistinguishable from a real all-unset override.
Pair with hasOverride() before trusting a non-empty-looking result.
|
static |
| bool PhosphorSurfaceShaders::DecorationProfileTree::hasOverride | ( | const QString & | surfacePath | ) | const |
|
inline |
|
default |
|
default |
| bool PhosphorSurfaceShaders::DecorationProfileTree::operator== | ( | const DecorationProfileTree & | other | ) | const |
| QStringList PhosphorSurfaceShaders::DecorationProfileTree::overriddenPaths | ( | ) | const |
| DecorationProfile PhosphorSurfaceShaders::DecorationProfileTree::resolve | ( | const QString & | surfacePath | ) | const |
| void PhosphorSurfaceShaders::DecorationProfileTree::setBaseline | ( | const DecorationProfile & | profile | ) |
| void PhosphorSurfaceShaders::DecorationProfileTree::setOverride | ( | const QString & | surfacePath, |
| const DecorationProfile & | profile ) |
| QJsonObject PhosphorSurfaceShaders::DecorationProfileTree::toJson | ( | ) | const |
| DecorationProfileTree PhosphorSurfaceShaders::DecorationProfileTree::withSeedDefaults | ( | const DecorationProfileTree & | seeds | ) | const |
Two-layer seed overlay: returns a copy of this tree with seeds injected as the LOWEST-precedence layer — the same seed model as PhosphorAnimation::PhosphorProfileRegistry::resolveWithInheritance's low-precedence owner tag, expressed as a tree-to-tree merge.
For each seed override path (and the seed baseline), a seed field is copied in ONLY where this tree leaves room for it: