fsleyes.controls.overlaydisplaypanel

This module provides the OverlayDisplayPanel class, a FSLeyes control panel which allows the user to change overlay display settings.

class fsleyes.controls.overlaydisplaypanel.OverlayDisplayPanel(parent, overlayList, displayCtx, canvasPanel)[source]

Bases: fsleyes.controls.controlpanel.SettingsPanel

The OverlayDisplayPanel is a SettingsPanel which allows the user to change the display settings of the currently selected overlay (which is defined by the DisplayContext.selectedOverlay property). The display settings for an overlay are contained in the Display and DisplayOpts instances associated with that overlay. An OverlayDisplayPanel looks something like the following:

_images/overlaydisplaypanel.png

An OverlayDisplayPanel uses a WidgetList to organise the settings into two main sections:

  • Settings which are common across all overlays - these are defined in the Display class.

  • Settings which are specific to the current Display.overlayType - these are defined in the DisplayOpts sub-classes.

The settings that are displayed on an OverlayDisplayPanel are defined in the _DISPLAY_PROPS and _DISPLAY_WIDGETS dictionaries.

static supportedViews()[source]

Overrides ControlMixin.supportedViews(). The OverlayDisplayPanel is only intended to be added to OrthoPanel, LightBoxPanel, or Scene3DPanel views.

static defaultLayout()[source]

Returns a dictionary containing layout settings to be passed to ViewPanel.togglePanel.

__init__(parent, overlayList, displayCtx, canvasPanel)[source]

Create an OverlayDisplayPanel.

Parameters
destroy()[source]

Must be called when this OverlayDisplayPanel is no longer needed. Removes property listeners, and calls the SettingsPanel.destroy() method.

__selectedOverlayChanged(*a)

Called when the OverlayList or DisplayContext.selectedOverlay changes. Refreshes this OverlayDisplayPanel so that the display settings for the newly selected overlay are shown.

setNavOrder()[source]

Set the keyboard (tab, shift+tab) navigation order to the given list of controls, assumed to be children of this _FSLeyesPanel.

__ovlTypeChanged(*a)

Called when the Display.overlayType of the current overlay changes. Refreshes the DisplayOpts settings which are shown, as a new DisplayOpts instance will have been created for the overlay.

updateWidgets(target, groupName)[source]

Re-generates the widgets for the given target/group.

__updateWidgets(target, groupName)

Called by the __selectedOverlayChanged() and __ovlTypeChanged() methods. Re-creates the controls on this OverlayDisplayPanel for the specified group.

Parameters
  • target – A Display or DisplayOpts instance, which contains the properties that controls are to be created for.

  • groupName – Either 'display' or 'opts'/'3d', corresponding to Display or DisplayOpts properties.

Returns

A list containing all of the new widgets that were created.

__annotations__ = {}
__module__ = 'fsleyes.controls.overlaydisplaypanel'