fsleyes.profiles.lightboxviewprofile

This module provides the LightBoxViewProfile class, an interaction Profile for LightBoxPanel views.

class fsleyes.profiles.lightboxviewprofile.LightBoxViewProfile(viewPanel, overlayList, displayCtx)

Bases: fsleyes.profiles.Profile

The LightBoxViewProfile is an interaction profile for LightBoxPanel views. It defines mouse/keyboard handlers which allow the user to navigate through the LightBoxPanel display of the overlays in the OverlayList.

LightBoxViewProfile defines two modes (see the Profile class documentation):

view The user can change the DisplayContext.location via left mouse drags, and can change the LightBoxCanvasOpts.topRow via the mouse wheel.
zoom The user can change the LightBoxCanvasOpts.ncols property with the mouse wheel (effectively zooming in/out of the canvas).
__init__(viewPanel, overlayList, displayCtx)

Create a LightBoxViewProfile.

Parameters:
getEventTargets()

Returns the LightBoxCanvas contained in the LightBoxPanel, which is the target for all mouse/keyboard events.

_viewModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)

Handles mouse wheel events in view mode.

Updates the :attr:.LightBoxCanvasOpts.topRow` property, thus scrolling through the slices displayed on the canvas.

_viewModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)

Handles left mouse drags in view mode.

Updates the DisplayContext.location property to track the mouse location.

_zoomModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)

Handles mouse wheel events in zoom mode.

Zooms in/out of the canvas by updating the SceneOpts.zoom property.

__module__ = 'fsleyes.profiles.lightboxviewprofile'