ILayoutSource over a ScrollingTemplateStore — the third card family beside manual zone layouts and autotile algorithms. More...
#include <phosphor-zones/include/PhosphorZones/ScrollingTemplateSource.h>
Public Member Functions | |
| ScrollingTemplateSource (ScrollingTemplateStore *store, QObject *parent=nullptr) | |
| Construct over a borrowed template store. | |
| ~ScrollingTemplateSource () override | |
| QVector< PhosphorLayout::LayoutPreview > | availableLayouts () const override |
| Enumerate every layout this source can render. | |
| PhosphorLayout::LayoutPreview | previewAt (const QString &id, int windowCount, const QSize &canvas) override |
| Produce a fully-realised preview for one layout entry. | |
Public Member Functions inherited from PhosphorLayout::ILayoutSource | |
| ~ILayoutSource () override | |
Additional Inherited Members | |
Signals inherited from PhosphorLayout::ILayoutSource | |
| void | contentsChanged () |
| Emitted whenever the set of layouts this source reports has changed (entries added, removed, or mutated — e.g. | |
Protected Member Functions inherited from PhosphorLayout::ILayoutSource | |
| ILayoutSource (QObject *parent=nullptr) | |
ILayoutSource over a ScrollingTemplateStore — the third card family beside manual zone layouts and autotile algorithms.
Null-tolerant like ZonesLayoutSource: a null store reports an empty list.
|
explicit |
Construct over a borrowed template store.
Caller owns store and must keep it alive for the source's lifetime (the ZonesLayoutSource contract); null is tolerated and reports an empty list.
|
override |
|
overridevirtual |
Enumerate every layout this source can render.
The returned previews are populated enough for the picker UI to render rows (id, displayName, aspect-ratio class, autotile flag, optional algorithm metadata). For autotile entries the zones field is populated with a default-window-count preview; consumers wanting a different count call previewAt with the entry's id.
Implements PhosphorLayout::ILayoutSource.
|
overridevirtual |
Produce a fully-realised preview for one layout entry.
id the LayoutPreview::id from availableLayouts windowCount for autotile entries, the window count to render the algorithm with. Ignored by manual sources (their zones are authored statically). Defaults to PhosphorLayout::DefaultPreviewWindowCount (4 — most picker thumbnails fit this nicely). canvas optional aspect-ratio + size hint. Sources that implement aspect-ratio filtering use this to set LayoutPreview::recommended; sources that don't ignore it. An empty QSize disables the hint.
Returns a default-constructed preview (empty id) when id is not known to this source. Caller checks result.id.isEmpty().
const ILayoutSource* cannot query previews — which matches the intent: querying a preview is an observable-effect operation on the source. Implements PhosphorLayout::ILayoutSource.