Skip to content

Annotation

app.ui.qt.dialogs.annotation

View source code

Module for annotation; implements the Qt presentation components.

See Also

Layer: Presentation. Context: Implements the qt presentation components at this architectural boundary.

EditAnnotationDialog

Bases: QDialog

Full edit dialog shown when modifying an existing detection (label + bbox coords).

PARAMETER DESCRIPTION
parent

Optional Qt parent object.

TYPE: QWidget | None DEFAULT: None

initial_label

Label initially shown in the editor.

TYPE: str DEFAULT: ''

initial_bbox_xyxy

Initial box coordinates in (x1, y1, x2, y2) order.

TYPE: BBoxXYXYTuple DEFAULT: (0, 0, 0, 0)

__init__(parent: QWidget | None = None, *, initial_label: str = '', initial_bbox_xyxy: BBoxXYXYTuple = (0, 0, 0, 0)) -> None

get_annotation_data() -> tuple[str, BBoxXYXYTuple]

Read the edited label and four bounding-box coordinates.

RETURNS DESCRIPTION
tuple[str, BBoxXYXYTuple]

Stripped label and coordinates in (x1, y1, x2, y2) order.