Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ScrollingTemplateSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "phosphorzones_export.h"
7
11
12#include <memory>
13
14namespace PhosphorZones {
15
16class ScrollingTemplateStore;
17
41 bool verticalAxis = false);
42
46class PHOSPHORZONES_EXPORT ScrollingTemplateSource : public PhosphorLayout::ILayoutSource
47{
48 Q_OBJECT
49
50public:
54 explicit ScrollingTemplateSource(ScrollingTemplateStore* store, QObject* parent = nullptr);
56
57 QVector<PhosphorLayout::LayoutPreview> availableLayouts() const override;
58 PhosphorLayout::LayoutPreview previewAt(const QString& id, int windowCount, const QSize& canvas) override;
59
60private:
61 ScrollingTemplateStore* m_store = nullptr;
62};
63
66{
67public:
70
71 QString name() const override;
72 std::unique_ptr<PhosphorLayout::ILayoutSource> create() override;
73
74private:
75 ScrollingTemplateStore* m_store = nullptr;
76};
77
81
82} // namespace PhosphorZones
Abstract factory for an ILayoutSource implementation.
Definition ILayoutSourceFactory.h:46
Abstract producer of LayoutPreview values.
Definition ILayoutSource.h:48
Factory + registrar anchor, mirroring ZonesLayoutSourceFactory.
Definition ScrollingTemplateSource.h:66
ScrollingTemplateSourceFactory(ScrollingTemplateStore *store)
std::unique_ptr< PhosphorLayout::ILayoutSource > create() override
Build a fresh source instance. Caller takes ownership.
QString name() const override
Stable identifier for diagnostics / logging.
ILayoutSource over a ScrollingTemplateStore — the third card family beside manual zone layouts and au...
Definition ScrollingTemplateSource.h:47
PhosphorLayout::LayoutPreview previewAt(const QString &id, int windowCount, const QSize &canvas) override
Produce a fully-realised preview for one layout entry.
QVector< PhosphorLayout::LayoutPreview > availableLayouts() const override
Enumerate every layout this source can render.
ScrollingTemplateSource(ScrollingTemplateStore *store, QObject *parent=nullptr)
Construct over a borrowed template store.
Load/save store for scrolling templates.
Definition ScrollingTemplateStore.h:37
A scrolling screen's first-class sizing template.
Definition ScrollingTemplate.h:128
Definition IWindowTrackingService.h:23
PHOSPHORZONES_EXPORT PhosphorLayout::LayoutPreview previewFromScrollingTemplate(const ScrollingTemplate &templ, bool verticalAxis=false)
Project a native scrolling template into the shared LayoutPreview shape: the blueprint columns (or,...
PHOSPHORZONES_EXPORT void ensureScrollingTemplateSourceProviderLinked()
Linker anchor — reference from every composition root that expects the self-registered provider (see ...
Renderer-ready snapshot of one layout entry (manual zone layout OR autotile algorithm result).
Definition LayoutPreview.h:44