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 aSettingsPanel
which allows the user to change the display settings of the currently selected overlay (which is defined by theDisplayContext.selectedOverlay
property). The display settings for an overlay are contained in theDisplay
andDisplayOpts
instances associated with that overlay. AnOverlayDisplayPanel
looks something like the following:An
OverlayDisplayPanel
uses aWidgetList
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 theDisplayOpts
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()
. TheOverlayDisplayPanel
is only intended to be added toOrthoPanel
,LightBoxPanel
, orScene3DPanel
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
parent – The
wx
parent object.overlayList – The
OverlayList
instance.displayCtx – The
DisplayContext
instance.canvasPanel – The
CanvasPanel
instance.
- destroy()[source]¶
Must be called when this
OverlayDisplayPanel
is no longer needed. Removes property listeners, and calls theSettingsPanel.destroy()
method.
- __selectedOverlayChanged(*a)¶
Called when the
OverlayList
orDisplayContext.selectedOverlay
changes. Refreshes thisOverlayDisplayPanel
so 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.overlayType
of the current overlay changes. Refreshes theDisplayOpts
settings which are shown, as a newDisplayOpts
instance will have been created for the overlay.
- __updateWidgets(target, groupName)¶
Called by the
__selectedOverlayChanged()
and__ovlTypeChanged()
methods. Re-creates the controls on thisOverlayDisplayPanel
for the specified group.- Parameters
target – A
Display
orDisplayOpts
instance, which contains the properties that controls are to be created for.groupName – Either
'display'
or'opts'
/'3d'
, corresponding toDisplay
orDisplayOpts
properties.
- Returns
A list containing all of the new widgets that were created.
- __annotations__ = {}¶
- __module__ = 'fsleyes.controls.overlaydisplaypanel'¶