CWorkflowTaskWidget

class ikomia.core.pycore.CWorkflowTaskWidget

Base class for all widgets associated with a task. Each process comes with a Qt widget to manage algorithm parameters and user actions. The widget class implementation is mandatory for Ikomia STUDIO. This class offers some basic tools to rapidly build a functionnal user interface. As it is derived from Qt QWidget, one can easily customize it to fit more complex needs. Use of bindings like PyQt5 or PySide2 are recommended.

Import

from ikomia.core import CWorkflowTaskWidget

Methods

__init__(arg1)

__init__( (object)self) -> None :

emit_apply(arg1, self)

Send apply event to the system.

emit_send_process_action(self, action)

Send event to request specific action of the process task.

emit_set_graphics_category(self, category)

Send event to change the current graphic category.

emit_set_graphics_tool(self, tool)

Send event to change the current graphic tool.

on_apply(self)

Called when user presses the Apply button.

on_apply(self)

Called when user presses the Apply button.

set_apply_btn_hidden(self, is_hidden)

Make the Apply button of the widget visible or not.

set_layout(self, layout)

Set the main layout of the widget.

Details

__init__((object)arg1) None
__init__( (object)self) -> None :

Default constructor

__init__( (object)self, (object)parent) -> None :

Construct with parent window.

emit_apply((CWorkflowTaskWidget)arg1, (CWorkflowTaskParam)self) None :

Send apply event to the system. The system then launches the task execution.

emit_send_process_action((CWorkflowTaskWidget)self, (int)action) None :

Send event to request specific action of the process task. Use this mechanism to manage user interaction with the process task for example.

Parameters:

action (int) – action code (can be user defined)

emit_set_graphics_category((CWorkflowTaskWidget)self, (str)category) None :

Send event to change the current graphic category.

Parameters:

category (str) – category name

emit_set_graphics_tool((CWorkflowTaskWidget)self, (GraphicsShape)tool) None :

Send event to change the current graphic tool.

Parameters:

tool (GraphicsShape) – new current tool

on_apply((CWorkflowTaskWidget)self) None :

Called when user presses the Apply button. Should be overriden: it’s a good place to update parameters values.

on_apply( (CWorkflowTaskWidget)arg1) -> None

set_apply_btn_hidden((CWorkflowTaskWidget)self, (bool)is_hidden) None :

Make the Apply button of the widget visible or not.

Parameters:

is_hidden – True or False

set_layout((CWorkflowTaskWidget)self, (int)layout) None :

Set the main layout of the widget. Use qtconversion module to get C++ handle from Python Qt-based framework.

Parameters:

layout – compatible C++ layout handle