magscope.ui.video_viewer
========================

.. py:module:: magscope.ui.video_viewer


Classes
-------

.. autoapisummary::

   magscope.ui.video_viewer.VideoViewer


Module Contents
---------------

.. py:class:: VideoViewer(scale_factor=1.25)

   Bases: :py:obj:`PyQt6.QtWidgets.QGraphicsView`


   .. py:attribute:: coordinatesChanged
      :type:  PyQt6.QtCore.pyqtSignal


   .. py:attribute:: clicked
      :type:  PyQt6.QtCore.pyqtSignal


   .. py:attribute:: sceneClicked
      :type:  PyQt6.QtCore.pyqtSignal


   .. py:attribute:: _MINIMAP_MARGIN
      :value: 12



   .. py:attribute:: _MINIMAP_MIN_SIZE
      :value: 120



   .. py:attribute:: _MINIMAP_MAX_SIZE
      :value: 220



   .. py:attribute:: _MINIMAP_LABEL_SPACING
      :value: 6



   .. py:attribute:: _MINIMAP_ZOOM_HEIGHT
      :value: 26



   .. py:attribute:: _MINIMAP_BUTTON_SPACING
      :value: 6



   .. py:attribute:: _mouse_start_pos


   .. py:attribute:: _mouse_start_time
      :value: 0.0



   .. py:attribute:: _zoom
      :value: 0



   .. py:attribute:: scale_factor
      :value: 1.25



   .. py:attribute:: _empty
      :value: True



   .. py:attribute:: scene


   .. py:attribute:: _image


   .. py:attribute:: _overlay_entries
      :type:  list[tuple[PyQt6.QtCore.QRectF, PyQt6.QtCore.QPointF, str, bool, str]]
      :value: []



   .. py:attribute:: _visible_overlay_entries
      :type:  list[tuple[PyQt6.QtCore.QRectF, str, bool]] | None
      :value: None



   .. py:attribute:: _visible_label_entries
      :type:  list[tuple[PyQt6.QtCore.QPointF, PyQt6.QtGui.QStaticText, bool]] | None
      :value: None



   .. py:attribute:: _overlay_cache_pixmap


   .. py:attribute:: _overlay_cache_dirty
      :value: True



   .. py:attribute:: _overlay_cache_size


   .. py:attribute:: _overlay_cache_device_pixel_ratio
      :value: 0.0



   .. py:attribute:: _static_label_cache
      :type:  dict[str, PyQt6.QtGui.QStaticText]


   .. py:attribute:: _label_metrics


   .. py:attribute:: _label_ascent


   .. py:attribute:: _marker_x


   .. py:attribute:: _marker_y


   .. py:attribute:: _marker_size
      :value: 0



   .. py:attribute:: _minimap_label


   .. py:attribute:: _minimap_zoom_label


   .. py:attribute:: _minimap_reset_button


   .. py:attribute:: _minimap_base


   .. py:attribute:: _fit_scale
      :value: 1.0



   .. py:method:: set_bead_overlay(bead_rois: dict[int, tuple[int, int, int, int]], active_bead_id: int | None, selected_bead_id: int | None, reference_bead_id: int | None, label_overrides: dict[int, str] | None = None, state_overrides: dict[int, str] | None = None) -> None


   .. py:method:: _invalidate_overlay_view_cache() -> None


   .. py:method:: _get_static_label(label_text: str) -> PyQt6.QtGui.QStaticText


   .. py:method:: _rebuild_overlay_view_cache() -> None


   .. py:method:: _rebuild_overlay_cache_pixmap() -> None


   .. py:method:: _ensure_overlay_cache_pixmap() -> None


   .. py:method:: plot(x, y, size)


   .. py:method:: clear_crosshairs()


   .. py:method:: set_image_to_default()


   .. py:method:: has_image()


   .. py:method:: image_scene_rect() -> PyQt6.QtCore.QRectF


   .. py:method:: reset_view(scale=1)


   .. py:method:: clear_image()


   .. py:method:: set_pixmap(pixmap)


   .. py:method:: zoom_level()


   .. py:method:: zoom(step)


   .. py:method:: wheelEvent(event)


   .. py:method:: resizeEvent(event)


   .. py:method:: toggle_drag_mode()


   .. py:method:: update_coordinates(pos=None)


   .. py:method:: mouseMoveEvent(event)


   .. py:method:: leaveEvent(event)


   .. py:method:: mousePressEvent(event)


   .. py:method:: mouseReleaseEvent(event)


   .. py:method:: scrollContentsBy(dx, dy)


   .. py:method:: _refresh_minimap()


   .. py:method:: _layout_minimap()


   .. py:method:: _compute_highlight_rect(scaled_size, offset_x, offset_y)


   .. py:method:: _current_zoom_percent()


   .. py:method:: drawForeground(painter, rect)


