mafw.steering_gui.views.filter_editors
Editors for different filter types in the steering GUI.
- Author:
Bulgheroni Antonio (antonio.bulgheroni@ec.europa.eu)
- Description:
Collection of widgets for editing model, field, condition, conditional, and logic filters.
Classes
|
Reusable widget containing the core condition definition controls: Field/Name selection, Operator selection, and Value input. |
|
Editor for Condition. |
|
Editor for ConditionalFilterConfig. |
|
Table model for displaying conditions in a FieldFilterConfig. |
|
Editor for FieldFilterConfig. |
|
Name editor for model-level conditions based on model fields. |
|
Name editor for field-level conditions with free text. |
|
Editor for list-based conditions. |
|
Row widget for list-based values. |
|
Editor for Logic expressions. |
|
Syntax highlighter for logic expressions. |
|
Plain text editor with QCompleter support for logic conditions. |
|
Table model for displaying model fields and their filters. |
|
Editor for ModelFilterConfig. |
|
Editor for processor-level filter configuration. |
|
Table model for displaying available processor models. |
|
Editor for BETWEEN conditions. |
|
Editor for a single value condition. |
Base class for condition value editors. |
- class mafw.steering_gui.views.filter_editors.ConditionDefinition(parent: QWidget | None = None)[source]
Bases:
QWidgetReusable widget containing the core condition definition controls: Field/Name selection, Operator selection, and Value input.
- set_condition(condition: Condition, parent: ModelFilterConfig | FieldFilterConfig | ConditionalFilterConfig, condition_name: str) None[source]
Bind the editor to the provided condition.
- class mafw.steering_gui.views.filter_editors.ConditionEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for Condition.
- set_condition(condition: Condition, parent: ModelFilterConfig | FieldFilterConfig | ConditionalFilterConfig, condition_name: str) None[source]
Bind the editor to the provided condition.
- class mafw.steering_gui.views.filter_editors.ConditionalFilterEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for ConditionalFilterConfig.
- class mafw.steering_gui.views.filter_editors.ConditionsTableModel(config: FieldFilterConfig, parent: QWidget | None = None)[source]
Bases:
QAbstractTableModelTable model for displaying conditions in a FieldFilterConfig.
- class mafw.steering_gui.views.filter_editors.FieldFilterEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for FieldFilterConfig.
- set_config(data: FieldFilterConfig | str, processor_config: ProcessorConfig, index: QModelIndex) None[source]
Update the editor with configuration data.
- class mafw.steering_gui.views.filter_editors.FieldNameWidget(parent: QWidget | None = None)[source]
Bases:
QWidgetName editor for model-level conditions based on model fields.
- set_existing_names(names: Iterable[str], current: str | None) None[source]
Filter out names already used by sibling conditions.
- class mafw.steering_gui.views.filter_editors.FreeNameWidget(model_name: str, field_name: str, parent: QWidget | None = None)[source]
Bases:
QWidgetName editor for field-level conditions with free text.
- class mafw.steering_gui.views.filter_editors.ListEditor(parent: QWidget | None = None)[source]
Bases:
ValueEditorBaseEditor for list-based conditions.
- class mafw.steering_gui.views.filter_editors.ListValueRow(field_type: type, parent: QWidget | None = None)[source]
Bases:
QWidgetRow widget for list-based values.
- class mafw.steering_gui.views.filter_editors.LogicEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for Logic expressions.
- set_config(data: ProcessorConfig | ModelFilterConfig | FieldFilterConfig, processor_config: ProcessorConfig, index: QModelIndex) None[source]
Bind the editor to the provided configuration data.
- class mafw.steering_gui.views.filter_editors.LogicSyntaxHighlighter(parent: Any = None)[source]
Bases:
QSyntaxHighlighterSyntax highlighter for logic expressions.
- class mafw.steering_gui.views.filter_editors.LogicTextEdit(parent: QWidget | None = None)[source]
Bases:
QPlainTextEditPlain text editor with QCompleter support for logic conditions.
- class mafw.steering_gui.views.filter_editors.ModelFieldsTableModel(model_info: ModelInfo, model_config: ModelFilterConfig | None, processor_config: ProcessorConfig, parent: QWidget | None = None)[source]
Bases:
QAbstractTableModelTable model for displaying model fields and their filters.
- class mafw.steering_gui.views.filter_editors.ModelFilterEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for ModelFilterConfig.
- set_config(data: ModelFilterConfig | str, processor_config: ProcessorConfig, index: QModelIndex) None[source]
Update the editor with configuration data.
- class mafw.steering_gui.views.filter_editors.ProcessorFilterEditor(parent: QWidget | None = None)[source]
Bases:
QWidgetEditor for processor-level filter configuration.
- set_config(config: ProcessorConfig) None[source]
Update the editor with processor configuration data.
- class mafw.steering_gui.views.filter_editors.ProcessorModelsTableModel(processor_config: ProcessorConfig, advertised_models: list[str], all_models: list[str], parent: QWidget | None = None)[source]
Bases:
QAbstractTableModelTable model for displaying available processor models.
- class mafw.steering_gui.views.filter_editors.RangeEditor(parent: QWidget | None = None)[source]
Bases:
ValueEditorBaseEditor for BETWEEN conditions.
- class mafw.steering_gui.views.filter_editors.SingleValueEditor(parent: QWidget | None = None)[source]
Bases:
ValueEditorBaseEditor for a single value condition.
- class mafw.steering_gui.views.filter_editors.ValueEditorBase[source]
Bases:
QWidgetBase class for condition value editors.
- mafw.steering_gui.views.filter_editors._create_value_widget(field_type: type, parent: QWidget | None = None) QWidget[source]
Create an editor widget suitable for the provided field type.
- mafw.steering_gui.views.filter_editors._get_widget_value(widget: QWidget) Any[source]
Return the current value from a value widget.
- mafw.steering_gui.views.filter_editors._operators_for_type(field_type: type) list[LogicalOp][source]
Return the allowed operators for the given field type.
- mafw.steering_gui.views.filter_editors._set_widget_value(widget: QWidget, value: Any) None[source]
Set the current value on a value widget.
- mafw.steering_gui.views.filter_editors._NO_VALUE_OPS = {LogicalOp.IS_NOT_NULL, LogicalOp.IS_NULL}
Operators that do not require a value input.
- mafw.steering_gui.views.filter_editors._OPERATOR_TOOLTIPS: dict[LogicalOp, str] = {LogicalOp.BETWEEN: 'Between the provided bounds', LogicalOp.BIT_AND: 'Bitwise AND against the provided value', LogicalOp.BIT_OR: 'Bitwise OR against the provided value', LogicalOp.EQ: 'Equal to', LogicalOp.GE: 'Greater than or equal to', LogicalOp.GLOB: 'Glob-style pattern matching', LogicalOp.GT: 'Greater than', LogicalOp.IN: 'Contained in the provided list', LogicalOp.IS_NOT_NULL: 'Value is not NULL', LogicalOp.IS_NULL: 'Value is NULL', LogicalOp.LE: 'Less than or equal to', LogicalOp.LIKE: 'SQL LIKE pattern matching', LogicalOp.LT: 'Less than', LogicalOp.NE: 'Not equal to', LogicalOp.NOT_IN: 'Not contained in the provided list', LogicalOp.REGEXP: 'Regular expression matching'}
Tooltip text for each logical operator.