6#include <phosphorzones_export.h>
38 static constexpr int SchemaVersion = 1;
60 static QJsonObject
mergeSettings(QJsonObject structural,
const QJsonObject& settings);
84 return m_byLayout.isEmpty();
88 QHash<QString, QJsonObject> m_byLayout;
Persists per-layout SETTINGS in a sidecar, keyed by layout UUID, separately from the structural layou...
Definition LayoutSettingsStore.h:34
static QJsonObject extractSettings(const QJsonObject &fullLayout)
Pull the settings out of a full layout JSON.
bool saveToFile(const QString &path) const
Atomically write the in-memory map to path (stamped with SchemaVersion).
QJsonObject settingsFor(const QString &layoutId) const
Settings for a layout (empty object if none stored).
bool isEmpty() const
Definition LayoutSettingsStore.h:82
bool loadFromFile(const QString &path)
Replace the in-memory map with the contents of path.
void setSettingsFor(const QString &layoutId, const QJsonObject &settings)
Store (or, when settings is empty, clear) the settings for a layout.
static QJsonObject mergeSettings(QJsonObject structural, const QJsonObject &settings)
Overlay a settings object (as produced by extractSettings) back onto a structural layout JSON,...
void removeLayout(const QString &layoutId)
Drop a layout's settings entry (e.g. when the layout is deleted).
static QJsonObject stripSettings(const QJsonObject &fullLayout)
Return the structural-only layout JSON: the full layout minus every settings key (and minus each zone...
Definition IWindowTrackingService.h:23