Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorTileEngine::PerScreenConfigResolver Class Reference

Resolves per-screen configuration overrides for autotiling. More...

#include <phosphor-tile-engine/include/PhosphorTileEngine/PerScreenConfigResolver.h>

Public Member Functions

 PerScreenConfigResolver (AutotileEngine *engine)
 
void applyPerScreenConfig (const QString &screenId, const QVariantMap &overrides)
 Apply per-screen configuration overrides.
 
void clearPerScreenConfig (const QString &screenId)
 Clear per-screen configuration overrides.
 
QVariantMap perScreenOverrides (const QString &screenId) const
 Get currently applied per-screen overrides for comparison.
 
bool hasPerScreenOverride (const QString &screenId, const QString &key) const
 Check if a screen has a per-screen override for a specific key.
 
void updatePerScreenOverride (const QString &screenId, const QString &key, const QVariant &value)
 Update a single per-screen override value in-place.
 
void removeOverridesForScreen (const QString &screenId)
 Remove all overrides for a screen (used during screen removal)
 
int effectiveInnerGap (const QString &screenId) const
 
int effectiveOuterGap (const QString &screenId) const
 
::PhosphorLayout::EdgeGaps effectiveOuterGaps (const QString &screenId) const
 
bool effectiveSmartGaps (const QString &screenId) const
 
bool effectiveRespectMinimumSize (const QString &screenId) const
 
int effectiveMaxWindows (const QString &screenId) const
 
qreal effectiveSplitRatioStep (const QString &screenId) const
 
QString effectiveAlgorithmId (const QString &screenId) const
 
PhosphorTiles::TilingAlgorithmeffectiveAlgorithm (const QString &screenId) const
 

Detailed Description

Resolves per-screen configuration overrides for autotiling.

PerScreenConfigResolver manages per-screen autotile overrides (gaps, algorithm, split ratio, master count, etc.) and resolves effective values by falling back to the global AutotileConfig when no override exists.

Uses a back-pointer to AutotileEngine for access to global config, algorithm registry, and tiling state. Declared as a friend class in AutotileEngine.

See also
AutotileEngine for the owning engine
AutotileConfig for global configuration

Constructor & Destructor Documentation

◆ PerScreenConfigResolver()

PhosphorTileEngine::PerScreenConfigResolver::PerScreenConfigResolver ( AutotileEngine engine)
explicit

Member Function Documentation

◆ applyPerScreenConfig()

void PhosphorTileEngine::PerScreenConfigResolver::applyPerScreenConfig ( const QString &  screenId,
const QVariantMap &  overrides 
)

Apply per-screen configuration overrides.

Merges per-screen autotile settings into the PhosphorTiles::TilingState for a screen. Overrides take precedence over global config for that screen.

Parameters
screenIdScreen to configure
overridesKey-value map of autotile settings

◆ clearPerScreenConfig()

void PhosphorTileEngine::PerScreenConfigResolver::clearPerScreenConfig ( const QString &  screenId)

Clear per-screen configuration overrides.

Removes all overrides for the screen and restores global defaults on its PhosphorTiles::TilingState.

Parameters
screenIdScreen to clear overrides for

◆ effectiveAlgorithm()

PhosphorTiles::TilingAlgorithm * PhosphorTileEngine::PerScreenConfigResolver::effectiveAlgorithm ( const QString &  screenId) const

◆ effectiveAlgorithmId()

QString PhosphorTileEngine::PerScreenConfigResolver::effectiveAlgorithmId ( const QString &  screenId) const

◆ effectiveInnerGap()

int PhosphorTileEngine::PerScreenConfigResolver::effectiveInnerGap ( const QString &  screenId) const

◆ effectiveMaxWindows()

int PhosphorTileEngine::PerScreenConfigResolver::effectiveMaxWindows ( const QString &  screenId) const

◆ effectiveOuterGap()

int PhosphorTileEngine::PerScreenConfigResolver::effectiveOuterGap ( const QString &  screenId) const

◆ effectiveOuterGaps()

::PhosphorLayout::EdgeGaps PhosphorTileEngine::PerScreenConfigResolver::effectiveOuterGaps ( const QString &  screenId) const

◆ effectiveRespectMinimumSize()

bool PhosphorTileEngine::PerScreenConfigResolver::effectiveRespectMinimumSize ( const QString &  screenId) const

◆ effectiveSmartGaps()

bool PhosphorTileEngine::PerScreenConfigResolver::effectiveSmartGaps ( const QString &  screenId) const

◆ effectiveSplitRatioStep()

qreal PhosphorTileEngine::PerScreenConfigResolver::effectiveSplitRatioStep ( const QString &  screenId) const

◆ hasPerScreenOverride()

bool PhosphorTileEngine::PerScreenConfigResolver::hasPerScreenOverride ( const QString &  screenId,
const QString &  key 
) const

Check if a screen has a per-screen override for a specific key.

◆ perScreenOverrides()

QVariantMap PhosphorTileEngine::PerScreenConfigResolver::perScreenOverrides ( const QString &  screenId) const

Get currently applied per-screen overrides for comparison.

◆ removeOverridesForScreen()

void PhosphorTileEngine::PerScreenConfigResolver::removeOverridesForScreen ( const QString &  screenId)

Remove all overrides for a screen (used during screen removal)

◆ updatePerScreenOverride()

void PhosphorTileEngine::PerScreenConfigResolver::updatePerScreenOverride ( const QString &  screenId,
const QString &  key,
const QVariant &  value 
)

Update a single per-screen override value in-place.

Used by shortcut handlers to persist runtime-adjusted values (e.g. split ratio, master count) back into the stored override map so they survive settings reloads and applyPerScreenConfig round-trips.


The documentation for this class was generated from the following file: