Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorZones::IZoneLayoutRegistry Class Referenceabstract

Enumeration + mutation surface for the in-memory zone-layout catalog. More...

#include <phosphor-zones/include/PhosphorZones/IZoneLayoutRegistry.h>

Inheritance diagram for PhosphorZones::IZoneLayoutRegistry:
[legend]

Signals

void layoutAdded (Layout *layout)
 
void layoutRemoved (Layout *layout)
 
void activeLayoutChanged (Layout *layout)
 
void layoutAssigned (const QString &screenId, int virtualDesktop, Layout *layout)
 
- Signals inherited from PhosphorLayout::ILayoutSourceRegistry
void contentsChanged ()
 Emitted when the set of layouts this registry produces changes in any way that invalidates cached previews — entries added, removed, renamed, or re-parameterised.
 

Public Member Functions

 IZoneLayoutRegistry (QObject *parent=nullptr)
 
 ~IZoneLayoutRegistry () override
 
virtual QVector< Layout * > layouts () const =0
 Enumerate every known layout.
 
virtual int layoutCount () const =0
 
virtual Layoutlayout (int index) const =0
 
virtual LayoutlayoutByName (const QString &name) const =0
 
virtual LayoutlayoutById (const QUuid &id) const =0
 Resolve a layout by its stable UUID.
 
virtual void addLayout (Layout *layout)=0
 
virtual void removeLayout (Layout *layout)=0
 
virtual void removeLayoutById (const QUuid &id)=0
 
virtual LayoutduplicateLayout (Layout *source)=0
 
virtual LayoutactiveLayout () const =0
 
virtual void setActiveLayout (Layout *layout)=0
 
virtual void setActiveLayoutById (const QUuid &id)=0
 
virtual LayoutlayoutForScreen (const QString &screenId, int virtualDesktop=0, const QString &activity=QString()) const =0
 Cascade-resolve the manual layout for screenId.
 
virtual LayoutresolveLayoutForScreen (const QString &screenId) const =0
 Convenience: resolve a layout using the registry's current (desktop, activity) context.
 
virtual QString assignmentIdForScreen (const QString &screenId, int virtualDesktop=0, const QString &activity=QString()) const =0
 Raw assignment id (manual-layout UUID or "autotile:<algorithmId>") for screenId, with cascade + level-1 provider fallback.
 
virtual LayoutdefaultLayout () const =0
 Effective global default layout (snap-only fallback).
 
virtual int currentVirtualDesktop () const =0
 
virtual QString currentActivity () const =0
 
- Public Member Functions inherited from PhosphorLayout::ILayoutSourceRegistry
 ILayoutSourceRegistry (QObject *parent=nullptr)
 
 ~ILayoutSourceRegistry () override
 

Detailed Description

Enumeration + mutation surface for the in-memory zone-layout catalog.

Fixture tests can stub this contract without implementing persistence / assignments / quick-slots.

Constructor & Destructor Documentation

◆ IZoneLayoutRegistry()

PhosphorZones::IZoneLayoutRegistry::IZoneLayoutRegistry ( QObject *  parent = nullptr)
explicit

◆ ~IZoneLayoutRegistry()

PhosphorZones::IZoneLayoutRegistry::~IZoneLayoutRegistry ( )
override

Member Function Documentation

◆ activeLayout()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::activeLayout ( ) const
pure virtual

◆ activeLayoutChanged

void PhosphorZones::IZoneLayoutRegistry::activeLayoutChanged ( Layout layout)
signal

◆ addLayout()

virtual void PhosphorZones::IZoneLayoutRegistry::addLayout ( Layout layout)
pure virtual
Parameters
layoutOwnership transferred - the registry adopts layout and is responsible for its lifetime from this call on.

Implemented in PhosphorZones::LayoutRegistry.

◆ assignmentIdForScreen()

virtual QString PhosphorZones::IZoneLayoutRegistry::assignmentIdForScreen ( const QString &  screenId,
int  virtualDesktop = 0,
const QString &  activity = QString() 
) const
pure virtual

Raw assignment id (manual-layout UUID or "autotile:<algorithmId>") for screenId, with cascade + level-1 provider fallback.

Implemented in PhosphorZones::LayoutRegistry.

◆ currentActivity()

virtual QString PhosphorZones::IZoneLayoutRegistry::currentActivity ( ) const
pure virtual

◆ currentVirtualDesktop()

virtual int PhosphorZones::IZoneLayoutRegistry::currentVirtualDesktop ( ) const
pure virtual

◆ defaultLayout()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::defaultLayout ( ) const
pure virtual

Effective global default layout (snap-only fallback).

Implemented in PhosphorZones::LayoutRegistry.

◆ duplicateLayout()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::duplicateLayout ( Layout source)
pure virtual
Parameters
sourceBorrowed - caller retains ownership.
Returns
Newly allocated copy; ownership transferred to the registry (mirrors addLayout semantics). Returns nullptr if source is unknown.

Implemented in PhosphorZones::LayoutRegistry.

◆ layout()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::layout ( int  index) const
pure virtual

◆ layoutAdded

void PhosphorZones::IZoneLayoutRegistry::layoutAdded ( Layout layout)
signal

◆ layoutAssigned

void PhosphorZones::IZoneLayoutRegistry::layoutAssigned ( const QString &  screenId,
int  virtualDesktop,
Layout layout 
)
signal

◆ layoutById()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::layoutById ( const QUuid &  id) const
pure virtual

Resolve a layout by its stable UUID.

Returns nullptr when no layout with that id is known to the registry.

Implemented in PhosphorZones::LayoutRegistry.

◆ layoutByName()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::layoutByName ( const QString &  name) const
pure virtual

◆ layoutCount()

virtual int PhosphorZones::IZoneLayoutRegistry::layoutCount ( ) const
pure virtual

◆ layoutForScreen()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::layoutForScreen ( const QString &  screenId,
int  virtualDesktop = 0,
const QString &  activity = QString() 
) const
pure virtual

Cascade-resolve the manual layout for screenId.

Returns defaultLayout() when no explicit assignment matches.

Implemented in PhosphorZones::LayoutRegistry.

◆ layoutRemoved

void PhosphorZones::IZoneLayoutRegistry::layoutRemoved ( Layout layout)
signal

◆ layouts()

virtual QVector< Layout * > PhosphorZones::IZoneLayoutRegistry::layouts ( ) const
pure virtual

Enumerate every known layout.

Borrowed pointers - owned by the concrete registry (typically LayoutManager). Order is the registry's natural iteration order.

Implemented in PhosphorZones::LayoutRegistry.

◆ removeLayout()

virtual void PhosphorZones::IZoneLayoutRegistry::removeLayout ( Layout layout)
pure virtual
Parameters
layoutBorrowed - caller hands the pointer in; the registry un-registers it and schedules deletion via deleteLater (matching how the registry adopted it in addLayout). Callers must drop any other references before this call returns.

Implemented in PhosphorZones::LayoutRegistry.

◆ removeLayoutById()

virtual void PhosphorZones::IZoneLayoutRegistry::removeLayoutById ( const QUuid &  id)
pure virtual

◆ resolveLayoutForScreen()

virtual Layout * PhosphorZones::IZoneLayoutRegistry::resolveLayoutForScreen ( const QString &  screenId) const
pure virtual

Convenience: resolve a layout using the registry's current (desktop, activity) context.

Implemented in PhosphorZones::LayoutRegistry.

◆ setActiveLayout()

virtual void PhosphorZones::IZoneLayoutRegistry::setActiveLayout ( Layout layout)
pure virtual

◆ setActiveLayoutById()

virtual void PhosphorZones::IZoneLayoutRegistry::setActiveLayoutById ( const QUuid &  id)
pure virtual

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