Layer Video
app.ui.qt.widgets.preview.layer_videoModule for layer video; implements the Qt presentation components.
See Also
PreviewContainer— embeds the video view with annotation overlaysPlaybackHandler— supplies playback updates
Layer: Presentation. Context: Implements the qt presentation components at this architectural boundary.
VideoDisplayWidget
Bases: QWidget
Provide the video display widget presentation component.
| PARAMETER | DESCRIPTION |
|---|---|
parent
|
Optional Qt parent object.
TYPE:
|
pixmap_rect_changed = Signal(QRect, QSize)
class-attribute
instance-attribute
__init__(parent: QWidget | None = None) -> None
get_pixmap_rect() -> QRect
Return the image rectangle currently used for drawing.
| RETURNS | DESCRIPTION |
|---|---|
QRect
|
Current image rectangle in widget coordinates. |
paintEvent(event: QPaintEvent) -> None
Paint the current video frame or status message.
| PARAMETER | DESCRIPTION |
|---|---|
event
|
Qt event being handled. (QPaintEvent).
TYPE:
|
reset_viewport() -> None
Restore 1× zoom and zero pan, then recompute and redraw the image.
resizeEvent(event: QResizeEvent) -> None
Update the viewport after the widget is resized.
| PARAMETER | DESCRIPTION |
|---|---|
event
|
Qt event being handled. (QResizeEvent).
TYPE:
|
set_image(image: QImage) -> None
Display an image, recompute its fitted rectangle, and redraw.
| PARAMETER | DESCRIPTION |
|---|---|
image
|
Image to display.
TYPE:
|
set_message(message: str) -> None
Clear the image and display a centered placeholder message.
| PARAMETER | DESCRIPTION |
|---|---|
message
|
Text to show when no image is available.
TYPE:
|
set_pan(dx: float, dy: float) -> None
Set the display offset in widget coordinates and redraw.
| PARAMETER | DESCRIPTION |
|---|---|
dx
|
Horizontal offset in pixels.
TYPE:
|
dy
|
Vertical offset in pixels.
TYPE:
|
set_zoom(factor: float) -> None
Set the display zoom, clamped to the range 1×–10×, and redraw.
| PARAMETER | DESCRIPTION |
|---|---|
factor
|
Requested zoom multiplier.
TYPE:
|