fsleyes.profiles.lightboxviewprofile¶
This module provides the LightBoxViewProfile class, an interaction
Profile for LightBoxPanel views.
-
class
fsleyes.profiles.lightboxviewprofile.LightBoxViewProfile(viewPanel, overlayList, displayCtx)[source]¶ Bases:
fsleyes.profiles.ProfileThe
LightBoxViewProfileis an interaction profile forLightBoxPanelviews. It defines mouse/keyboard handlers which allow the user to navigate through theLightBoxPaneldisplay of the overlays in theOverlayList.LightBoxViewProfiledefines two modes (see theProfileclass documentation):viewThe user can change the
DisplayContext.locationvia left mouse drags, and can change theLightBoxCanvasOpts.topRowvia the mouse wheel.zoomThe user can change the
LightBoxCanvasOpts.ncolsproperty with the mouse wheel (effectively zooming in/out of the canvas).-
__init__(viewPanel, overlayList, displayCtx)[source]¶ Create a
LightBoxViewProfile.- Parameters
viewPanel – A
LightBoxPanelinstance.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.
-
getEventTargets()[source]¶ Returns the
LightBoxCanvascontained in theLightBoxPanel, which is the target for all mouse/keyboard events.
-
_viewModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)[source]¶ Handles mouse wheel events in
viewmode.Updates the :attr:.LightBoxCanvasOpts.topRow` property, thus scrolling through the slices displayed on the canvas.
-
_viewModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]¶ Handles left mouse drags in
viewmode.Updates the
DisplayContext.locationproperty to track the mouse location.
-
_zoomModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)[source]¶ Handles mouse wheel events in
zoommode.Zooms in/out of the canvas by updating the
SceneOpts.zoomproperty.
-
__module__= 'fsleyes.profiles.lightboxviewprofile'¶
-