Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ZonesLayoutSource.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
10
11namespace PhosphorZones {
12class IZoneLayoutRegistry;
13class Layout;
14}
15
16namespace PhosphorZones {
17
33 const QSize& canvas = {});
34
51class PHOSPHORZONES_EXPORT ZonesLayoutSource : public PhosphorLayout::ILayoutSource
52{
53 Q_OBJECT
54public:
57 explicit ZonesLayoutSource(PhosphorZones::IZoneLayoutRegistry* registry, QObject* parent = nullptr);
59
60 QVector<PhosphorLayout::LayoutPreview> availableLayouts() const override;
61
67 const QSize& canvas = {}) override;
68
69private:
71};
72
73} // namespace PhosphorZones
Abstract producer of LayoutPreview values.
Definition ILayoutSource.h:48
Enumeration + mutation surface for the in-memory zone-layout catalog.
Definition IZoneLayoutRegistry.h:43
Represents a collection of zones that form a layout.
Definition Layout.h:74
ILayoutSource adapter wrapping an IZoneLayoutRegistry.
Definition ZonesLayoutSource.h:52
QVector< PhosphorLayout::LayoutPreview > availableLayouts() const override
Enumerate every layout this source can render.
PhosphorLayout::LayoutPreview previewAt(const QString &id, int windowCount=PhosphorLayout::DefaultPreviewWindowCount, const QSize &canvas={}) override
windowCount is ignored — manual layouts have authored zones.
ZonesLayoutSource(PhosphorZones::IZoneLayoutRegistry *registry, QObject *parent=nullptr)
Construct over a borrowed layout registry.
constexpr int DefaultPreviewWindowCount
Reference window count used by ILayoutSource::previewAt when the caller doesn't specify one.
Definition LayoutPreview.h:20
Definition IWindowTrackingService.h:22
PHOSPHORZONES_EXPORT PhosphorLayout::LayoutPreview previewFromLayout(PhosphorZones::Layout *layout, const QSize &canvas={})
Convert a single Layout into a renderer-ready LayoutPreview.
Renderer-ready snapshot of one layout entry (manual zone layout OR autotile algorithm result).
Definition LayoutPreview.h:44