Skip to content

Model Change

app.ui.qt.dialogs.model_change

View source code

Module for model change; implements the Qt presentation components.

See Also

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

ModelChangeWarningDialog

Bases: QDialog

Warns the user that changing model clears detections, and offers to retain manual annotations.

PARAMETER DESCRIPTION
parent

Optional Qt parent object.

TYPE: QWidget | None DEFAULT: None

buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel) instance-attribute

dont_ask_cb = QCheckBox("Don't ask again") instance-attribute

keep_manual_cb = QCheckBox('Keep manual annotations') instance-attribute

warning_label = QLabel('Changing the detection model will remove all existing model detections and tracking results from this session. Do you want to proceed?') instance-attribute

__init__(parent: QWidget | None = None) -> None

get_results() -> tuple[bool, bool]

Return the manual-annotation and future-warning checkbox states.

RETURNS DESCRIPTION
tuple[bool, bool]

(keep_manual, dont_ask_again) boolean values.