mafw.steering_gui.views
Placeholder package for steering GUI views while the GUI is being scaffolded.
- Author:
Bulgheroni Antonio (antonio.bulgheroni@ec.europa.eu)
- Description:
UI views live here once they are implemented, keeping the controller agnostic of toolkit code.
- class mafw.steering_gui.views.DatabaseEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget that exposes database backend selection and layered configuration.
- _detect_backend_from_url(url: str | None) str[source]
Determine the backend type from the given URL.
This method analyses the provided URL to identify the corresponding backend type by matching URL prefixes or extracting the protocol. If no match is found, it defaults to the current backend or the default backend.
- Parameters:
url – The URL string to be analysed for backend detection.
- Returns:
A string representing the detected backend type.
- _normalize_config(config: dict[str, Any] | None) dict[str, Any][source]
Normalize the configuration dictionary to ensure consistent backend, URL, authentication, and parameters.
This method processes the input configuration dictionary to extract and normalize values for backend type, URL, authentication details, and backend-specific parameters, ensuring defaults are applied where necessary.
- Parameters:
config – A dictionary containing configuration details such as backend, URL, authentication, and parameters. If None, defaults are applied.
- Returns:
A dictionary with normalized configuration values including backend, URL, enabled status, authentication, parameters, and pragmas.
- _on_migration_directory_browse() None[source]
Open a directory-selection dialog and store the chosen migration directory.
The dialog starts from the currently configured directory when it is set, falling back to the current working directory otherwise. The selection is written back verbatim (absolute path) so the user can review or edit it.
- set_data(config: dict[str, Any] | None) None[source]
Populate the UI from a configuration dictionary without emitting signals.
- migration_directory_browse
Button opening a directory-selection dialog for the migration directory.
- migration_directory_edit
Editable field for the schema-migration directory (steering DB-config entry).
- class mafw.steering_gui.views.GlobalsEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor that exposes analysis metadata and global flags without touching the builder.
- _update_remove_button() None[source]
Enable removal only while at least one complete row is selected.
- current_values() tuple[str, str, bool, bool][source]
Return the current UI values without normalizing them.
- class mafw.steering_gui.views.GroupEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget used to edit group metadata and the processor list.
- set_group_item(item: PipelineItem) None[source]
Display the provided group item and its processors.
- set_model(model: SteeringTreeModel) None[source]
Attach the steering tree model to the group editor.
- class mafw.steering_gui.views.MetadataEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetProvide a quick summary of the steering file when no specific section is active.
- set_validation_level(level: ValidationLevel | None) None[source]
Update the combo to reflect the controller’s validation preference.
- class mafw.steering_gui.views.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:
QWidgetInline 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.
- class mafw.steering_gui.views.PipelineEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget exposing the processor pipeline as a flat table plus toolbox actions.
- set_model(model: SteeringTreeModel) None[source]
Attach the steering tree model and focus on the processors section.
- class mafw.steering_gui.views.ProcessorEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetPlaceholder widget representing per-processor configuration editors.
- class mafw.steering_gui.views.ProcessorParameterEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget used to edit parameters and metadata of a processor entry.
- _activate_parameter_editor_on_click(index: QModelIndex) None[source]
Show the list or path editor after one click on its value cell.
- set_processor_data(config: ProcessorConfig) None[source]
Populate the editor with processor configuration data.
- class mafw.steering_gui.views.SteeringTreeView(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget exposing the steering-file sections as a
QTreeView.- _on_selection_changed(*_: object) None[source]
Emit the section key and pipeline selection for the new tree selection.
- set_model(model: SteeringTreeModel) None[source]
Attach a steering tree model to the view.
- class mafw.steering_gui.views.StorageEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEdit named volumes and show storage validation feedback.
Added in version 2.4.
- _add_row(name: str, root: str) None[source]
Append one volume name and expose its root through the row tooltip.
- _update_selection_actions() None[source]
Enable edit and remove buttons according to the current selection.
- set_configuration(config: StorageConfiguration, *, database_enabled: bool, issues: list[str]) None[source]
Refresh volume rows, tooltips, availability, and validation feedback.
- class mafw.steering_gui.views.UIEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetWidget that exposes the configured user interface and allows switching it.
Modules
Expose the database editor UI for steering file configuration. |
|
Editors for different filter types in the steering GUI. |
|
Manager widget for filter configuration. |
|
Tree view for displaying and interacting with processor filters. |
|
Expose the globals editor fields required by the steering GUI. |
|
Group editor widget for managing processor groups. |
|
Editor showing metadata when the root node is selected. |
|
Reusable line editor with a role-aware filesystem browse button. |
|
Pipeline editor widget exposing processors and groups in execution order. |
|
Editor scaffolding for processor-specific configurations. |
|
Processor parameter editor for steering GUI pipelines. |
|
Present a hierarchical representation of the steering file sections. |
|
Editor for named storage volumes in steering files. |
|
Editor for selecting the user interface defined in a steering file. |