mafw.steering_gui.views.path_editor

Reusable line editor with a role-aware filesystem browse button.

Classes

PathEditor([parent, role, on_selected, ...])

Inline path editor whose browse action depends on a PathRole.

class mafw.steering_gui.views.path_editor.PathEditor(parent: QWidget | None = None, role: PathRole = PathRole.INPUT_FILE, on_selected: Callable[[str], None] | None = None, on_browse_started: Callable[[], None] | None = None, on_browse_cancelled: Callable[[], None] | None = None)[source]

Bases: QWidget

Inline path editor whose browse action depends on a PathRole.

Build the editor for the given role.

Parameters:
  • parent – Optional parent widget.

  • role – The browse behaviour to use; defaults to input-file selection.

  • on_selected – Optional callback for values chosen in a browse dialog.

_browse() → None[source]

Open the file dialog matching the configured path role.

_finish_editing() → None[source]

Avoid committing a blank row while Browse temporarily owns focus.

eventFilter(watched: Any, event: QEvent) → bool[source]

Notify a containing table when the inline path field receives focus.

set_value(value: Any) → None[source]

Update the displayed path string.

value() → str[source]

Return the currently selected path string.