pySimBlocks.gui.blocks.sources.file_source

class pySimBlocks.gui.blocks.sources.file_source.FileSourceMeta[source]

Bases: BlockMeta

Describe the GUI metadata of the file-backed source block.

is_parameter_active(param_name: str, instance_params: Dict[str, Any]) bool[source]

Return whether a file-source parameter is relevant for the file type.

Parameters:
  • param_name – Parameter name to test.

  • instance_params – Current instance parameter values.

Returns:

True if the parameter should be shown.

build_param(session, form: QFormLayout, readonly: bool = False)[source]

Build the file-source parameter editor.

Parameters:
  • session – Active dialog session.

  • form – Form layout receiving the widgets.

  • readonly – Whether the dialog is read-only.

build_post_param(session, form: QFormLayout, readonly: bool = False)[source]

Build the post-parameter section with the open-file action.

Parameters:
  • session – Active dialog session.

  • form – Form layout receiving the widgets.

  • readonly – Whether the dialog is read-only.

refresh_form(session)[source]

Refresh widget visibility and the file-open button state.

Parameters:

session – Active dialog session.