pySimBlocks.gui.blocks.sources.function_source

class pySimBlocks.gui.blocks.sources.function_source.FunctionSourceMeta[source]

Bases: BlockMeta

Describe the GUI metadata of the user-defined function source block.

resolve_port_group(port_meta: PortMeta, direction: Literal['input', 'output'], instance: BlockInstance) list[PortInstance][source]

Resolve output ports from the configured output key list.

Parameters:
  • port_meta – Declared port metadata.

  • direction – Direction of the port group.

  • instance – Block instance whose ports are being built.

Returns:

Concrete ports for the requested port group.

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

Build the function-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.