Dialogue Handler
app.ui.handlers.dialogue_handlerDialog management handler for UI interactions.
See Also
EditAnnotationDialog— edits annotation detailsModelChangeWarningDialog— confirms model-change consequences
Layer: Presentation. Context: Converts user actions and worker signals into application calls and UI feedback.
DialogueHandler
Bases: QObject
Creates and manages modal dialogs for user interactions.
Responsibilities
- Create and return edit detection dialog with initial values.
- Create and return model change warning dialog.
- Pass dialog instances to callers for execution and data retrieval.
Note
Factory pattern: creates dialogs without managing lifecycle. Caller is responsible for executing dialog and handling results. Centralizes dialog creation logic.
Layer: Presentation. Context: Supports user interaction and delegates application work through presentation contracts.
__init__(controller: UIController)
controller: UIController supplying the parent window and application queries needed to construct dialogs.
handle_edit_annotation_dialogue(initial_label: str, initial_bbox_xyxy: tuple[int, int, int, int]) -> EditAnnotationDialog
Create edit detection dialog with initial label and coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
initial_label
|
The label text to pre-populate.
TYPE:
|
initial_bbox_xyxy
|
Tuple
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
EditAnnotationDialog
|
A
TYPE:
|
handle_model_change_warning_dialogue(s_id: SessionId) -> ModelChangeWarningDialog
Create model change warning dialog for the session.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Session ID (for context, if needed).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ModelChangeWarningDialog
|
A
TYPE:
|