bec_widgets.widgets.plots.toolbar_components.mouse_interactions#

Classes#

MouseInteractionConnection

Connection class for mouse interaction toolbar bundle.

Functions#

mouse_interaction_bundle(...)

Creates a mouse interaction toolbar bundle.

Module Contents#

class MouseInteractionConnection(components: bec_widgets.utils.toolbars.toolbar.ToolbarComponents, target_widget=None)#

Bases: bec_widgets.utils.toolbars.connections.BundleConnection

Connection class for mouse interaction toolbar bundle.

autorange_plot()#

Enable autorange on the plot widget.

connect()#

Connects the bundle to the target widget or application. This method should be implemented by subclasses to define how the bundle interacts with the target.

Subclasses should call connect_property_sync(target_widget) if property sync is needed.

disconnect()#

Disconnects the bundle from the target widget or application. This method should be implemented by subclasses to define how to clean up connections.

Subclasses should call disconnect_property_sync(target_widget) if property sync was connected.

enable_mouse_pan_mode(checked: bool)#

Enable the pan mode on the plot widget.

enable_mouse_rectangle_mode(checked: bool)#

Enable the rectangle zoom mode on the plot widget.

get_viewbox_mode()#

Returns the current interaction mode of a PyQtGraph ViewBox and sets the corresponding action.

bundle_name = 'mouse_interaction'#
components#
mouse_mode = None#
target_widget = None#
mouse_interaction_bundle(components: bec_widgets.utils.toolbars.toolbar.ToolbarComponents) bec_widgets.utils.toolbars.bundles.ToolbarBundle#

Creates a mouse interaction toolbar bundle.

Parameters:

components (ToolbarComponents) – The components to be added to the bundle.

Returns:

The mouse interaction toolbar bundle.

Return type:

ToolbarBundle