Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimation::ProfileLoader Class Reference

Scans JSON profile-definition files and registers them with PhosphorProfileRegistry. More...

#include <phosphor-animation/include/PhosphorAnimation/ProfileLoader.h>

Inheritance diagram for PhosphorAnimation::ProfileLoader:
[legend]

Classes

struct  Entry
 

Signals

void profilesChanged ()
 

Public Member Functions

 ProfileLoader (PhosphorProfileRegistry &registry, CurveRegistry &curveRegistry, const QString &ownerTag={}, QObject *parent=nullptr)
 If ownerTag is empty, a unique per-instance tag is generated.
 
 ~ProfileLoader () override
 
int loadFromDirectory (const QString &directory, LiveReload liveReload=LiveReload::Off)
 
int loadFromDirectories (const QStringList &directories, LiveReload liveReload=LiveReload::Off, PhosphorFsLoader::RegistrationOrder order=PhosphorFsLoader::RegistrationOrder::LowestPriorityFirst)
 Scan multiple directories in caller-declared priority order.
 
int loadLibraryBuiltins (LiveReload liveReload=LiveReload::Off)
 
QString ownerTag () const
 
void requestRescan ()
 
int registeredCount () const
 
QList< Entryentries () const
 
bool hasPath (const QString &path) const
 O(1) membership check — prefer over entries() on hot paths.
 

Detailed Description

Scans JSON profile-definition files and registers them with PhosphorProfileRegistry.

Symmetric with CurveLoader. User curves must already be registered (CurveLoader first). Profiles loaded here are preset templates — settings UIs deep-copy into active profiles.

Constructor & Destructor Documentation

◆ ProfileLoader()

PhosphorAnimation::ProfileLoader::ProfileLoader ( PhosphorProfileRegistry registry,
CurveRegistry curveRegistry,
const QString &  ownerTag = {},
QObject *  parent = nullptr 
)
explicit

If ownerTag is empty, a unique per-instance tag is generated.

◆ ~ProfileLoader()

PhosphorAnimation::ProfileLoader::~ProfileLoader ( )
override

Member Function Documentation

◆ entries()

QList< Entry > PhosphorAnimation::ProfileLoader::entries ( ) const

◆ hasPath()

bool PhosphorAnimation::ProfileLoader::hasPath ( const QString &  path) const

O(1) membership check — prefer over entries() on hot paths.

◆ loadFromDirectories()

int PhosphorAnimation::ProfileLoader::loadFromDirectories ( const QStringList &  directories,
LiveReload  liveReload = LiveReload::Off,
PhosphorFsLoader::RegistrationOrder  order = PhosphorFsLoader::RegistrationOrder::LowestPriorityFirst 
)

Scan multiple directories in caller-declared priority order.

◆ loadFromDirectory()

int PhosphorAnimation::ProfileLoader::loadFromDirectory ( const QString &  directory,
LiveReload  liveReload = LiveReload::Off 
)

◆ loadLibraryBuiltins()

int PhosphorAnimation::ProfileLoader::loadLibraryBuiltins ( LiveReload  liveReload = LiveReload::Off)

◆ ownerTag()

QString PhosphorAnimation::ProfileLoader::ownerTag ( ) const

◆ profilesChanged

void PhosphorAnimation::ProfileLoader::profilesChanged ( )
signal

◆ registeredCount()

int PhosphorAnimation::ProfileLoader::registeredCount ( ) const

◆ requestRescan()

void PhosphorAnimation::ProfileLoader::requestRescan ( )

The documentation for this class was generated from the following file: