Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
AlgorithmMetadata.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 <QLatin1String>
7#include <QString>
8#include <QStringView>
9
10namespace PhosphorLayout {
11
21 All,
22 Last,
24 None,
25};
26
31{
32 switch (value) {
34 return QStringLiteral("all");
36 return QStringLiteral("last");
38 return QStringLiteral("firstAndLast");
40 return QStringLiteral("none");
42 break;
43 }
44 return QString();
45}
46
51{
52 if (text == QLatin1String("all")) {
54 }
55 if (text == QLatin1String("last")) {
57 }
58 if (text == QLatin1String("firstAndLast")) {
60 }
61 if (text == QLatin1String("none")) {
63 }
65}
66
118
119} // namespace PhosphorLayout
Definition AlgorithmMetadata.h:10
ZoneNumberDisplay
How zone numbers are displayed in algorithm previews.
Definition AlgorithmMetadata.h:19
@ FirstAndLast
First and last zones are numbered.
@ None
No zones are numbered.
@ RendererDecides
Empty on the wire — algorithm defers to renderer default.
@ All
Every zone shows its number.
@ Last
Only the trailing zone is numbered.
QString zoneNumberDisplayToString(ZoneNumberDisplay value)
Encode a ZoneNumberDisplay as its canonical wire string.
Definition AlgorithmMetadata.h:30
ZoneNumberDisplay zoneNumberDisplayFromString(QStringView text)
Decode a wire string back into a ZoneNumberDisplay.
Definition AlgorithmMetadata.h:50
Capability + display metadata for a single autotile algorithm.
Definition AlgorithmMetadata.h:78
bool isUserScript
True when the script lives in the user's local algorithms directory (vs system-installed).
Definition AlgorithmMetadata.h:110
bool supportsMemory
True when the algorithm carries persistent per-screen state across sessions (BSP-style trees that rem...
Definition AlgorithmMetadata.h:100
bool supportsCustomParams
True when the algorithm declares custom.
Definition AlgorithmMetadata.h:95
ZoneNumberDisplay zoneNumberDisplay
How zone numbers are displayed in previews.
Definition AlgorithmMetadata.h:116
bool supportsSplitRatio
True when the algorithm honours an explicit master/secondary split ratio.
Definition AlgorithmMetadata.h:85
bool isScripted
True when the algorithm is loaded from a JS script file rather than a built-in C++ implementation.
Definition AlgorithmMetadata.h:105
bool producesOverlappingZones
True when the algorithm can produce overlapping zones (e.g.
Definition AlgorithmMetadata.h:90
bool supportsMasterCount
True when the algorithm honours an explicit master-window count.
Definition AlgorithmMetadata.h:81