spacr.qt.widgets.setup_dialog

Present optional application preferences on the first spaCR launch.

Questions are grouped by purpose and initialized with functional defaults, so the dialog can be dismissed without additional configuration. The blurred background is decorative; all controls remain available when the platform cannot render it.

Classes

SetupDialog

Collect optional first-run preferences.

Functions

open_setup_if_needed(→ Optional[SetupDialog])

Open the first-run setup dialog when required.

Module Contents

class spacr.qt.widgets.setup_dialog.SetupDialog(parent: PySide6.QtWidgets.QWidget | None = None)[source]

Bases: PySide6.QtWidgets.QDialog

Collect optional first-run preferences.

Build the first-run setup dialog.

Parameters:

parent – parent widget, or None; also where the backdrop behind the card is taken from.

accept() → None[source]

Apply displayed preferences and record setup completion.

Each preference is applied independently. Rejected values are logged without discarding other valid selections.

answers() → Dict[str, Any][source]

Return the current value of every displayed preference control.

reject() → None[source]

Dismiss the dialog while retaining defaults and mark setup complete.

resizeEvent(event)[source]

Re-lay the dialog for the new size.

Parameters:

event – the Qt resize event.

spacr.qt.widgets.setup_dialog.open_setup_if_needed(parent=None) → SetupDialog | None[source]

Open the first-run setup dialog when required.

Parameters:

parent (QWidget, optional) – Parent application window.

Returns:

SetupDialog or None – Executed dialog, or None when setup has already been completed for the current version.