pyqt_reactive.widgets.shared.tear_off_registry

TearOffRegistry - Global registry for tear-off tab drag operations.

Tracks the current drag operation and all tear-off capable widgets for cross-window drag-and-drop support.

Classes

TearOffRegistry()

Singleton registry for tear-off tab operations.

class pyqt_reactive.widgets.shared.tear_off_registry.TearOffRegistry[source]

Singleton registry for tear-off tab operations.

Tracks: - Current drag operation (tab being dragged) - All tear-off capable widgets (potential drop targets) - Floating windows (current drag sources)

This enables dragging tabs between different windows.

__init__()[source]
classmethod instance() TearOffRegistry[source]

Get singleton instance.

classmethod register_drag(drag_data: TabDragData, floating_window: FloatingTabWindow)[source]

Register a new drag operation.

classmethod clear_drag()[source]

Clear current drag operation.

classmethod get_current_drag() TabDragData | None[source]

Get current drag data.

classmethod register_target(target: TearOffTabWidget)[source]

Register a widget as a potential drop target.

classmethod unregister_target(target: TearOffTabWidget)[source]

Unregister a drop target.

classmethod check_hover(floating_window: FloatingTabWindow, global_pos: QPoint)[source]

Check if floating window is hovering over a drop target.

Called continuously during drag to update visual feedback.

classmethod get_drop_target(floating_window: FloatingTabWindow) TearOffTabWidget | None[source]

Get the current drop target (if any).

classmethod perform_drop(floating_window: FloatingTabWindow, target: TearOffTabWidget)[source]

Perform the drop operation.

This simulates a drop event on the target widget.