Skip to content

widget

widget

Classes:

  • ManagerWidget

    Main window for the task publisher management interface, displaying various task-related tabs.

ManagerWidget

ManagerWidget(manager: Manager)

              flowchart LR
              publisher.widget.ManagerWidget[ManagerWidget]

              

              click publisher.widget.ManagerWidget href "" "publisher.widget.ManagerWidget"
            

Main window for the task publisher management interface, displaying various task-related tabs.

This widget initializes as the main application window and dynamically generates pages based on the types of processes registered within a Manager instance.

Parameters:

  • manager

    (Manager) –

    An instance of the Manager class, containing the registered processes.

Methods:

  • create_pages

    Dynamically create pages in the main window for each type of process in the Manager.

  • publish

    Trigger the publishing process by calling the manager's publish method.

  • set_tab_page_status

    Update the color of the status button in the button bar based on the process status.

create_pages

create_pages(processes: Dict[Type[Process], List[Process]]) -> None

Dynamically create pages in the main window for each type of process in the Manager.

This method iterates over the provided dictionary of processes and creates a specific page for each recognized process type (Collect, Check, Extract, Push). It also creates a button in the button bar to switch to each page.

Parameters:

  • processes
    (Dict[Type[Process], List[Process]]) –

    A dictionary where each key is a process type (such as Collect, Check, etc.) and the corresponding value is a list of process instances of that type.

publish

publish(*args, **kwargs) -> None

Trigger the publishing process by calling the manager's publish method.

This method runs in a separate thread to prevent blocking the UI. After publishing, it updates the status of each page based on the results.

set_tab_page_status

set_tab_page_status(page: ProcessorPage, status: StatusProcess) -> None

Update the color of the status button in the button bar based on the process status.

Parameters:

  • page
    (ProcessorPage) –

    The page whose status button color will be updated.

  • status
    (StatusProcess) –

    The current status of the process, which determines the button color.