pyqt_reactive.animation.flash_config

Declarative configuration for flash animations.

Functions

detect_screen_refresh_rate()

Detect primary screen refresh rate.

get_flash_config()

Return singleton flash config.

Classes

FlashConfig([base_color_rgb, flash_alpha, ...])

Flash animation tuning knobs with automatic screen refresh rate detection.

pyqt_reactive.animation.flash_config.detect_screen_refresh_rate() int[source]

Detect primary screen refresh rate.

Returns:

Detected refresh rate (Hz), or 60 if detection fails.

class pyqt_reactive.animation.flash_config.FlashConfig(base_color_rgb: Tuple[int, int, int] = (255, 255, 255), flash_alpha: int = 255, fade_in_s: float = 0.2, hold_s: float = 0.05, fade_out_s: float = 0.6, frame_ms: int | None = None, use_opengl: bool = False, target_fps: int | None = None, max_fps: int | None = 60)[source]

Flash animation tuning knobs with automatic screen refresh rate detection.

base_color_rgb: Tuple[int, int, int] = (255, 255, 255)
flash_alpha: int = 255
fade_in_s: float = 0.2
hold_s: float = 0.05
fade_out_s: float = 0.6
frame_ms: int | None = None
use_opengl: bool = False
target_fps: int | None = None
max_fps: int | None = 60
__post_init__()[source]

Calculate frame_ms from target_fps or auto-detect screen refresh rate.

__init__(base_color_rgb: Tuple[int, int, int] = (255, 255, 255), flash_alpha: int = 255, fade_in_s: float = 0.2, hold_s: float = 0.05, fade_out_s: float = 0.6, frame_ms: int | None = None, use_opengl: bool = False, target_fps: int | None = None, max_fps: int | None = 60) None
pyqt_reactive.animation.flash_config.get_flash_config() FlashConfig[source]

Return singleton flash config.