7#include <PhosphorAnimation/phosphoranimation_export.h>
10#include <QtCore/QObject>
11#include <QtCore/QString>
46 std::optional<Profile>
resolve(
const QString& path)
const;
94 void reloadFromOwner(
const QString& ownerTag,
const QHash<QString, Profile>& profiles);
100 void reloadAll(
const QHash<QString, Profile>& profiles);
134 static std::atomic<PhosphorProfileRegistry*> s_defaultRegistry;
136 mutable std::mutex m_mutex;
137 QHash<QString, Profile> m_profiles;
138 QHash<QString, QString> m_owners;
139 QString m_lowPrecedenceOwnerTag;
Registry mapping profile path strings to Profile values.
Definition PhosphorProfileRegistry.h:23
void reloadAll(const QHash< QString, Profile > &profiles)
Wholesale replace the entire registry. TEST-ONLY semantics.
std::optional< Profile > resolve(const QString &path) const
Resolve path to a Profile if registered.
int profileCount() const
Current path count. Thread-safe.
Profile resolveWithInheritance(const QString &path, const QString &lowPrecedenceOwnerTag) const
~PhosphorProfileRegistry() override
void registerProfile(const QString &path, const Profile &profile, const QString &ownerTag)
Register or replace at path, stamped with an owner tag.
QHash< QString, Profile > snapshot() const
Thread-safe copy of every registered (path → Profile) pair, owner tags discarded.
Profile resolveWithInheritance(const QString &path) const
Resolve path with parent-chain inheritance.
void reloadFromOwner(const QString &ownerTag, const QHash< QString, Profile > &profiles)
Replace the subset owned by ownerTag with profiles.
void clear()
Clear the registry. Fires profilesReloaded().
PhosphorProfileRegistry(const PhosphorProfileRegistry &)=delete
void profileChanged(const QString &path)
Fired when a profile is registered, replaced, or unregistered.
void registerProfile(const QString &path, const Profile &profile)
Register or replace the profile at path (direct/untagged owner).
void ownerReloaded(const QString &ownerTag)
Fired at the end of a reloadFromOwner/clearOwner batch if any changes occurred.
static PhosphorProfileRegistry * defaultRegistry()
Read the process-wide default; nullptr if none published yet.
void clearOwner(const QString &ownerTag)
Remove every entry owned by ownerTag.
void profilesReloaded()
Fired only on wholesale operations (reloadAll, clear).
void unregisterProfile(const QString &path)
Remove path. Fires profileChanged if it existed.
QString ownerOf(const QString &path) const
Current owner tag for path, or empty string.
bool hasProfile(const QString &path) const
Is path registered? Thread-safe.
PhosphorProfileRegistry(QObject *parent=nullptr)
PhosphorProfileRegistry & operator=(const PhosphorProfileRegistry &)=delete
void setLowPrecedenceOwnerTag(const QString &tag)
Configure the owner tag whose entries should be treated as the lowest-precedence layer in resolveWith...
static void setDefaultRegistry(PhosphorProfileRegistry *registry)
Publish registry as the process-wide default for QML resolution.
Configuration for a single animation event.
Definition Profile.h:33
Definition AnimatedValue.h:31