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 {
13class Layout;
14}
15
16namespace PhosphorZones {
17
42 const QSize& canvas = {}, qreal screenScale = 0.0);
43
60class PHOSPHORZONES_EXPORT ZonesLayoutSource : public PhosphorLayout::ILayoutSource
61{
62 Q_OBJECT
63public:
66 explicit ZonesLayoutSource(PhosphorZones::IZoneLayoutRegistry* registry, QObject* parent = nullptr);
68
69 QVector<PhosphorLayout::LayoutPreview> availableLayouts() const override;
70
76 const QSize& canvas = {}) override;
77
78private:
80};
81
82} // namespace PhosphorZones
Abstract producer of LayoutPreview values.
Definition ILayoutSource.h:48
Enumeration + mutation surface for the in-memory zone-layout catalog.
Definition IZoneLayoutRegistry.h:51
Represents a collection of zones that form a layout.
Definition Layout.h:42
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:24
PHOSPHORZONES_EXPORT PhosphorLayout::LayoutPreview previewFromLayout(PhosphorZones::Layout *layout, const QSize &canvas={}, qreal screenScale=0.0)
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