fsleyes.controls.plotlistpanel

This module provides the PlotListPanel a FSLeyes control panel which allows the user to add/remove DataSeries from an OverlayPlotPanel.

class fsleyes.controls.plotlistpanel.PlotListPanel(parent, overlayList, displayCtx, frame, plotPanel)[source]

Bases: fsleyes.controls.controlpanel.ControlPanel

The PlotListPanel is a FSLeyes control panel for use with OverlayPlotPanel views. It allows the user to add and remove DataSeries instances from the PlotPanel.dataSeries list.

For every DataSeries instance in the PlotPanel.dataSeries list of the OverlayPlotPanel, the PlotListPanel creates a DataSeriesWidget, which allows the user to change the display settings of the DataSeries instance. A EditableListBox is used to display the labels for each DataSeries instance, and the associated DataSeriesWidget controls.

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

Create a PlotListPanel.

Parameters
destroy()[source]

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

__dataSeriesChanged(*a)

Called when the PlotPanel.dataSeries list of the OverlayPlotPanel changes. Updates the list of TimeSeriesWidget controls.

__onListAdd(ev)

Called when the user pushes the add button on the EditableListBox. Adds the DataSeries associated with the currently selected overlay to the PlotPanel.dataSeries list of the OverlayPlotPanel.

__onListEdit(ev)

Called when the user edits a label on the EditableListBox. Updates the DataSeries.label property of the corresponding DataSeries instance.

__onListSelect(ev)

Called when the user selects an item in the EditableListBox. Sets the DisplayContext.selectedOverlay to the overlay associated with the corresponding DataSeries instance.

__onListRemove(ev)

Called when the user removes an item from the EditableListBox. Removes the corresponding DataSeries instance from the PlotPanel.dataSeries list of the OverlayPlotPanel.

__module__ = 'fsleyes.controls.plotlistpanel'
class fsleyes.controls.plotlistpanel.DataSeriesWidget(parent, dataSeries)[source]

Bases: __main__.docbuilder.run.<locals>.MockClass

The DataSeriesWidget class is a panel which contains controls that modify the properties of a DataSeries instance. A DataSeriesWidget is created by the PlotListPanel for every DataSeries in the PlotPanel.dataSeries list.

__init__(parent, dataSeries)[source]

Create a DataSeriesWidget.

Parameters
  • parent – The wx parent object.

  • dataSeries – The DataSeries instance.

__module__ = 'fsleyes.controls.plotlistpanel'