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.SettingsPanelThe
OverlayDisplayPanelis aSettingsPanelwhich allows the user to change the display settings of the currently selected overlay (which is defined by theDisplayContext.selectedOverlayproperty). The display settings for an overlay are contained in theDisplayandDisplayOptsinstances associated with that overlay. AnOverlayDisplayPanellooks something like the following:
An
OverlayDisplayPaneluses aWidgetListto organise the settings into two main sections:Settings which are common across all overlays - these are defined in the
Displayclass.Settings which are specific to the current
Display.overlayType- these are defined in theDisplayOptssub-classes.
The settings that are displayed on an
OverlayDisplayPanelare defined in the_DISPLAY_PROPSand_DISPLAY_WIDGETSdictionaries.-
static
supportedViews()[source]¶ Overrides
ControlMixin.supportedViews(). TheOverlayDisplayPanelis only intended to be added toOrthoPanel,LightBoxPanel, orScene3DPanelviews.
-
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
parent – The
wxparent object.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.canvasPanel – The
CanvasPanelinstance.
-
destroy()[source]¶ Must be called when this
OverlayDisplayPanelis no longer needed. Removes property listeners, and calls theSettingsPanel.destroy()method.
-
__selectedOverlayChanged(*a)¶ Called when the
OverlayListorDisplayContext.selectedOverlaychanges. Refreshes thisOverlayDisplayPanelso that the display settings for the newly selected overlay are shown.
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.overlayTypeof the current overlay changes. Refreshes theDisplayOptssettings which are shown, as a newDisplayOptsinstance will have been created for the overlay.
-
__updateWidgets(target, groupName)¶ Called by the
__selectedOverlayChanged()and__ovlTypeChanged()methods. Re-creates the controls on thisOverlayDisplayPanelfor the specified group.- Parameters
target – A
DisplayorDisplayOptsinstance, which contains the properties that controls are to be created for.groupName – Either
'display'or'opts'/'3d', corresponding toDisplayorDisplayOptsproperties.
- Returns
A list containing all of the new widgets that were created.
-
__module__= 'fsleyes.controls.overlaydisplaypanel'¶