spacr.qt.mask_thumbnail_quality

Persistent display quality for Make Masks’ image-organizing thumbnails.

Low retains the original 64-pixel sampling. Medium and High sample the original image and mask at 256 and 1024 pixels respectively, never enlarging the source. Logical cell size remains the separate Size preference.

Functions

get_quality(→ str)

Return the persisted quality, with Low for old or invalid settings.

quality_combo([parent])

Build a live synchronized quality selector.

set_quality(→ None)

Persist and broadcast a display-only quality choice.

Module Contents

spacr.qt.mask_thumbnail_quality.get_quality() → str[source]

Return the persisted quality, with Low for old or invalid settings.

spacr.qt.mask_thumbnail_quality.quality_combo(parent=None)[source]

Build a live synchronized quality selector.

Parameters:

parent – owning widget, if any.

Returns:

a combo whose item data uses stable untranslated quality keys.

The slot is connected with a context QObject, so it disconnects automatically when that object is destroyed.

spacr.qt.mask_thumbnail_quality.set_quality(value: str) → None[source]

Persist and broadcast a display-only quality choice.

Parameters:

value – low, medium or high; an invalid value resets to low.

Nested helpers

quality_combo._Sync.update(self, value)

Synchronize the selector after another view changed quality.

Parameters:

value – the stable quality key.

spacr/qt/mask_thumbnail_quality.py:67