tomwer.gui.utils.flow.FlowCanvas#

class tomwer.gui.utils.flow.FlowCanvas(parent, direction, show_lock_state=True)#

Widget to describe a flow of process - pipeline

Parameters:

direction (str | FlowDirection) – direction can be vertical or horizontal

addProcess(process, icon=None, draggable=True)#

Add a process to the flow with the name ‘process’ and an optional icon

Parameters:

process_name – any object. Should implement the __str__ interface to define the name if no icon is given

Return type:

int

Returns:

process id in the process flow

clear()#
clearActiveProcess()#

Set all process to unactive

Return type:

None

getFlow()#

Return the list of process following the treatment flow

Return type:

list

getProcessFocused()#
Return type:

int | None

Returns:

id of the process focus or None if no process focus

hasProcessFocus()#
Return type:

bool

Returns:

True if the canvas has a process active / focus …

removeProcess(process_id)#
Parameters:

process_id (int) – id of the process to remove from the flow

Return type:

None

setProcesses(processes, icons, draggability)#
Parameters:
  • processes (Iterable) – processes of the flow

  • icons (Iterable) – icons associated to the flow

  • draggability (Iterable) – is the process draggable or not

Return type:

None

Returns:

sigWidgetActivated#

Signal emitted when the contained widget become the active process.

sigWidgetDeactivated#

Signal emitted when the contained widget is deactivated (not the active process anymore)