Configuration for autotiling behavior. More...
#include <phosphor-tile-engine/include/PhosphorTileEngine/AutotileConfig.h>
Public Types | |
| using | InsertPosition = PhosphorTiles::AutotileInsertPosition |
Public Member Functions | |
| bool | operator== (const AutotileConfig &other) const |
| bool | operator!= (const AutotileConfig &other) const |
| QJsonObject | toJson () const |
| Serialize to JSON. | |
Static Public Member Functions | |
| static QHash< QString, AlgorithmSettings > | perAlgoFromVariantMap (const QVariantMap &map) |
| Convert per-algorithm settings from QVariantMap (Settings layer) to internal hash. | |
| static QVariantMap | perAlgoToVariantMap (const QHash< QString, AlgorithmSettings > &hash) |
| Convert internal hash to QVariantMap for the Settings layer. | |
| static AutotileConfig | fromJson (const QJsonObject &json) |
| Deserialize from JSON. | |
| static AutotileConfig | defaults () |
| Get default configuration. | |
Configuration for autotiling behavior.
AutotileConfig holds all user-configurable options for automatic window tiling. This includes algorithm selection, gaps, master settings, and focus behavior.
This is a value type (not QObject) for easy copying and comparison. It can be stored per-layout or as global defaults.
PhosphorTiles::AutotileDefaults::* constants, which delegate to PhosphorTiles::AutotileDefaults for the algorithm constants. Do not hand-mirror values here — keep the delegation chain intact so library and config defaults stay in lock-step.
|
static |
Get default configuration.
|
static |
Deserialize from JSON.
| bool PhosphorTileEngine::AutotileConfig::operator!= | ( | const AutotileConfig & | other | ) | const |
| bool PhosphorTileEngine::AutotileConfig::operator== | ( | const AutotileConfig & | other | ) | const |
|
static |
Convert per-algorithm settings from QVariantMap (Settings layer) to internal hash.
|
static |
Convert internal hash to QVariantMap for the Settings layer.
| QJsonObject PhosphorTileEngine::AutotileConfig::toJson | ( | ) | const |
Serialize to JSON.
| QString PhosphorTileEngine::AutotileConfig::algorithmId = PhosphorTiles::AutotileDefaults::DefaultAlgorithmId |
ID of the tiling algorithm to use.
Common values: "master-stack", "bsp", "columns", "dwindle", "spiral", "monocle" See PhosphorTiles::AlgorithmRegistry for available algorithms.
| bool PhosphorTileEngine::AutotileConfig::focusFollowsMouse = false |
Focus follows mouse pointer.
When true, moving mouse over a window focuses it. Default: false (click to focus)
| bool PhosphorTileEngine::AutotileConfig::focusNewWindows = true |
Automatically focus newly opened windows.
Default: true
| int PhosphorTileEngine::AutotileConfig::innerGap = PhosphorTiles::AutotileDefaults::DefaultInnerGap |
Gap between tiled windows in pixels.
Range: 0 to 50 Default: 8
| InsertPosition PhosphorTileEngine::AutotileConfig::insertPosition = InsertPosition::End |
| int PhosphorTileEngine::AutotileConfig::masterCount = PhosphorTiles::AutotileDefaults::DefaultMasterCount |
Number of windows in master area.
Range: 1 to 5 Default: 1
| int PhosphorTileEngine::AutotileConfig::maxWindows = PhosphorTiles::AutotileDefaults::DefaultMaxWindows |
Maximum number of windows to tile.
Windows beyond this limit are not repositioned by the tiling algorithm. Range: 1 to 12 Default: 6
| int PhosphorTileEngine::AutotileConfig::outerGap = PhosphorTiles::AutotileDefaults::DefaultOuterGap |
Gap from screen edges in pixels (uniform)
Range: 0 to 50 Default: 8
| int PhosphorTileEngine::AutotileConfig::outerGapBottom = PhosphorTiles::AutotileDefaults::DefaultOuterGap |
| int PhosphorTileEngine::AutotileConfig::outerGapLeft = PhosphorTiles::AutotileDefaults::DefaultOuterGap |
| int PhosphorTileEngine::AutotileConfig::outerGapRight = PhosphorTiles::AutotileDefaults::DefaultOuterGap |
| int PhosphorTileEngine::AutotileConfig::outerGapTop = PhosphorTiles::AutotileDefaults::DefaultOuterGap |
Per-side outer gap values (used when usePerSideOuterGap is true)
| PhosphorTiles::AutotileOverflowBehavior PhosphorTileEngine::AutotileConfig::overflowBehavior = PhosphorTiles::AutotileOverflowBehavior::Float |
Overflow behavior when window count exceeds maxWindows.
Float (default): auto-float excess windows via OverflowManager. Unlimited: ignore the cap and tile every window — the effectiveMaxWindows path returns PhosphorTiles::AutotileDefaults::UnlimitedMaxWindowsSentinel so the std::min clamp in recalculateLayout becomes idempotent and onWindowAdded's gate is always open. A per-screen MaxWindows override (if present) still wins over Unlimited so users can clamp individual screens.
Serialization note: AutotileConfig (layout-attached) writes this field as a string token ("float" / "unlimited") in toJson/fromJson so the layout JSON survives schema rewrites. The user-facing Settings layer persists the same logical setting as an int under Tiling.Behavior/OverflowBehavior (see settings/loadsave.cpp). Both paths flow through the AutotileOverflowBehavior C++ enum, so the asymmetry is internal — but worth knowing before touching either side.
| bool PhosphorTileEngine::AutotileConfig::respectMinimumSize = true |
Respect window minimum size constraints.
When true, windows won't be resized smaller than their minimum. This may cause layout to not fill screen completely.
| QHash<QString, AlgorithmSettings> PhosphorTileEngine::AutotileConfig::savedAlgorithmSettings |
Per-algorithm saved settings (split ratio + master count).
Saved when switching away from an algorithm, restored when switching back. Key: algorithm ID (e.g. "master-stack", "centered-master", "script:deck")
| bool PhosphorTileEngine::AutotileConfig::smartGaps = true |
Hide gaps when only one window is tiled.
Single window uses full available screen space.
| qreal PhosphorTileEngine::AutotileConfig::splitRatio = PhosphorTiles::AutotileDefaults::DefaultSplitRatio |
Ratio of screen width for master area.
Range: 0.1 to 0.9 Default: 0.6 (60% master, 40% stack)
| qreal PhosphorTileEngine::AutotileConfig::splitRatioStep = PhosphorTiles::AutotileDefaults::DefaultSplitRatioStep |
| bool PhosphorTileEngine::AutotileConfig::usePerSideOuterGap = false |
Whether to use per-side outer gaps instead of uniform.