fsleyes.controls.plotcontrolpanel

This module provides the PlotControlPanel class, which is a FSLeyes control panel base-class for use with OverlayPlotPanel views.

class fsleyes.controls.plotcontrolpanel.PlotControlPanel(parent, overlayList, displayCtx, plotPanel)[source]

Bases: fsleyes.controls.controlpanel.SettingsPanel

The PlotControlPanel is a FSLeyes control panel which allows the user to control a OverlayPlotPanel. The PlotControlPanel is intended to be sub-classed.

Sub-class implementations may:

The first two methods are called by __init__(), and the created widgets persist for the lifetime of the PlotControlPanel. The last two methods are called whenever the DisplayContext.selectedOverlay changes, and may also be called at other times.

static supportedViews()[source]

The PlotControlPanel is restricted for use with OverlayPlotPanel views. This method may be overridden by sub-classes.

static ignoreControl()[source]

The PlotControlPanel is not intended to be used directly.

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

Create a PlotControlPanel.

Parameters
  • parent – The wx parent object.

  • overlayList – The OverlayList.

  • displayCtx – The DisplayContext instance.

  • plotPanel – The PlotPanel associated with this PlotControlPanel.

destroy()[source]

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

property plotPanel

Returns the OverlayPlotPanel associated with this PlotControlPanel.

property plotCanvas

Returns the PlotCanvas associated with this PlotControlPanel.

generateCustomPlotPanelWidgets(groupName)[source]

May be overridden by sub-classes to add a group of widgets controlling OverlayPlotPanel properties. The default implementation does nothing.

Parameters

groupName – The WidgetList group name.

Returns

A list of the widgets that were created, and should be included in keyboard navigation (see FSLeyesPanel.setNavOrder()).

generatePlotPanelWidgets(groupName)[source]

Adds a collection of widgets to the given WidgetList, allowing the properties of the given PlotPanel instance to be changed.

This method may be overridden by sub-classes to change/add to the list of properties that are added by default.

Parameters

groupName – The WidgetList group name.

Returns

A list of the widgets that were created, and should be included in keyboard navigation (see FSLeyesPanel.setNavOrder()).

refreshDataSeriesWidgets()[source]

Re-creates all of the widgets controlling properties of the current DataSeries instance.

generateDataSeriesWidgets(ds, groupName)[source]

Adds a collection of widgets to the given WidgetList, allowing the properties of the given DataSeries instance to be changed. This method may be overridden by sub-classes which need to customise the list of widgets.

Parameters
  • ds – The DataSeries instance.

  • groupName – The WidgetList group name.

Returns

A list of the widgets that were created, and should be included in keyboard navigation (see FSLeyesPanel.setNavOrder()).

generateCustomDataSeriesWidgets(ds, groupName)[source]

May be overridden by sub-classes to create a group of widgets for controlling DataSeries properties. The default implementation does nothing.

Parameters
  • ds – The DataSeries instance.

  • groupName – The WidgetList group name.

Returns

A list of the widgets that were created, and should be included in keyboard navigation (see FSLeyesPanel.setNavOrder()).

__selectedOverlayNameChanged(*a)

Called when the Display.name property for the currently selected overlay changes. Updates the display name of the DataSeries settings sections if necessary.

__selectedOverlayChanged(*a)

Called when the DisplayContext.selectedOverlay or OverlayList changes.

__autoScaleChanged(*a)

Called when the PlotPanel.xAutoScale or PlotPanel.yAutoScale properties change. If widgets have been created for the PlotPanel.limits, they are enabled/disabled according to the new xAutoScale yAutoScale value.

__module__ = 'fsleyes.controls.plotcontrolpanel'