Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ILayoutSource.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 <phosphorlayoutapi_export.h>
7
9
10#include <QObject>
11#include <QSize>
12#include <QString>
13#include <QVector>
14
15namespace PhosphorLayout {
16
47class PHOSPHORLAYOUTAPI_EXPORT ILayoutSource : public QObject
48{
49 Q_OBJECT
50public:
51 ~ILayoutSource() override;
52
59 virtual QVector<LayoutPreview> availableLayouts() const = 0;
60
83 virtual LayoutPreview previewAt(const QString& id, int windowCount = DefaultPreviewWindowCount,
84 const QSize& canvas = {}) = 0;
85
86Q_SIGNALS:
94
95protected:
96 explicit ILayoutSource(QObject* parent = nullptr);
97
98 // Non-copyable inherited from QObject — sources are owned services
99 // exposed as pointers to consumers.
100};
101
102} // namespace PhosphorLayout
Abstract producer of LayoutPreview values.
Definition ILayoutSource.h:48
ILayoutSource(QObject *parent=nullptr)
virtual LayoutPreview previewAt(const QString &id, int windowCount=DefaultPreviewWindowCount, const QSize &canvas={})=0
Produce a fully-realised preview for one layout entry.
virtual QVector< LayoutPreview > availableLayouts() const =0
Enumerate every layout this source can render.
void contentsChanged()
Emitted whenever the set of layouts this source reports has changed (entries added,...
Definition AlgorithmMetadata.h:10
Renderer-ready snapshot of one layout entry (manual zone layout OR autotile algorithm result).
Definition LayoutPreview.h:44