#include "phosphorzones_export.h"#include <QFlags>#include <QHash>#include <QJsonObject>#include <QList>#include <QRectF>#include <QString>#include <QStringList>#include <QVariantList>#include <QVariantMap>#include <QVector>Go to the source code of this file.
Namespaces | |
| namespace | PhosphorZones |
| namespace | PhosphorZones::LayoutUtils |
| Zone/layout primitive utilities — pure Layout / Zone operations. | |
Enumerations | |
| enum class | PhosphorZones::ZoneField { PhosphorZones::None = 0 , PhosphorZones::Name = 1 << 0 , PhosphorZones::Appearance = 1 << 1 , PhosphorZones::Minimal = None , PhosphorZones::Full = Name | Appearance } |
| Flags controlling which zone fields to include in conversion (OCP-compliant). More... | |
Functions | |
| PHOSPHORZONES_EXPORT void | PhosphorZones::LayoutUtils::serializeAllowLists (QJsonObject &json, const QStringList &screens, const QList< int > &desktops, const QStringList &activities) |
| Serialize visibility allow-lists to JSON (only writes non-empty lists). | |
| PHOSPHORZONES_EXPORT void | PhosphorZones::LayoutUtils::deserializeAllowLists (const QJsonObject &json, QStringList &screens, QList< int > &desktops, QStringList &activities) |
| Deserialize visibility allow-lists from JSON (clears output params first). | |
| PHOSPHORZONES_EXPORT QVariantList | PhosphorZones::LayoutUtils::zonesToVariantList (Layout *layout, ZoneFields fields=ZoneField::Minimal, const QRectF &referenceGeometry=QRectF(), qreal screenScale=0.0) |
| Convert all zones in a layout to QVariantList. | |
| PHOSPHORZONES_EXPORT QVariantMap | PhosphorZones::LayoutUtils::layoutToVariantMap (Layout *layout, ZoneFields zoneFields=ZoneField::Minimal) |
| Convert a layout to a QVariantMap (metadata + zones). | |
| PHOSPHORZONES_EXPORT void | PhosphorZones::LayoutUtils::sortZonesByNumber (QVector< Zone * > &zones) |
| PHOSPHORZONES_EXPORT QHash< QString, int > | PhosphorZones::LayoutUtils::buildZonePositionMap (Layout *layout) |
| PHOSPHORZONES_EXPORT QHash< QString, int > | PhosphorZones::LayoutUtils::buildGlobalZonePositionMap (const QList< Layout * > &layouts) |
Build a global zoneId → position map merged across every layout in layouts. | |
| PHOSPHORZONES_EXPORT bool | PhosphorZones::LayoutUtils::layoutHoldsZones (const Layout *layout, const QStringList &zoneIds) |
Does layout hold EVERY zone in zoneIds? | |
| PHOSPHORZONES_EXPORT bool | PhosphorZones::LayoutUtils::contextLayoutHoldsZones (const IZoneLayoutRegistry *registry, const QString &screenId, int virtualDesktop, const QString &activity, const QStringList &zoneIds) |
layoutHoldsZones() against the layout registry resolves for the (screenId, virtualDesktop, activity) context. | |
| PHOSPHORZONES_EXPORT QStringList | PhosphorZones::LayoutUtils::sameNumberedZones (const QStringList &zoneIds, const Layout *target, const QHash< QString, int > &positions) |
The slot remembered zoneIds take in target, the layout a context runs now: the zones themselves when target holds them all (a span stays a span), else target's zone at the position the first one has in its own layout (positions, buildGlobalZonePositionMap over the registry's layouts), else empty when target has fewer zones or none. | |
| PHOSPHORZONES_EXPORT int | PhosphorZones::LayoutUtils::reissueTakenZoneIds (QJsonObject &layoutJson, const QList< Layout * > &loaded) |
| Give a layout document's zones ids no other layout holds (F552), and a zone with no id one of its own. | |