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, plotPanel)[source]
Bases:
fsleyes.controls.controlpanel.ControlPanel
The
PlotListPanel
is a FSLeyes control panel for use withOverlayPlotPanel
views. It allows the user to add and removeDataSeries
instances from thePlotPanel.dataSeries
list.For every
DataSeries
instance in thePlotPanel.dataSeries
list of theOverlayPlotPanel
, thePlotListPanel
creates aDataSeriesWidget
, which allows the user to change the display settings of theDataSeries
instance. AEditableListBox
is used to display the labels for eachDataSeries
instance, and the associatedDataSeriesWidget
controls.- static supportedViews()[source]
The
PlotListPanel
is restricted for use withOverlayPlotPanel
views. This method may be overridden by sub-classes.
- static defaultLayout()[source]
Returns a dictionary containing layout settings to be passed to
ViewPanel.togglePanel
.
- __init__(parent, overlayList, displayCtx, plotPanel)[source]
Create a
PlotListPanel
.- Parameters
parent – The
wx
parent object.overlayList – The
OverlayList
.displayCtx – The
DisplayContext
instance.plotPanel – The
OverlayPlotPanel
associated with thisPlotListPanel
.
- destroy()[source]
Must be called when this
PlotListPanel
is no longer needed. Removes some property listeners, and calls theControlPanel.destroy()
method.
- property dsList
Return a reference to the
EditableListBox
widget that contains the list ofDataSeries
.
- dataSeriesChanged(*a)[source]
Called when the
PlotPanel.dataSeries
list of theOverlayPlotPanel
changes. Updates the list ofTimeSeriesWidget
controls.
- onListAdd(ev)[source]
Called when the user pushes the add button on the
EditableListBox
. Adds theDataSeries
associated with the currently selected overlay to thePlotPanel.dataSeries
list of theOverlayPlotPanel
.
- onListEdit(ev)[source]
Called when the user edits a label on the
EditableListBox
. Updates theDataSeries.label
property of the correspondingDataSeries
instance.
- onListSelect(ev)[source]
Called when the user selects an item in the
EditableListBox
. Sets theDisplayContext.selectedOverlay
to the overlay associated with the correspondingDataSeries
instance.
- onListRemove(ev)[source]
Called when the user removes an item from the
EditableListBox
. Removes the correspondingDataSeries
instance from thePlotPanel.dataSeries
list of theOverlayPlotPanel
.
- __annotations__ = {}
- __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 aDataSeries
instance. ADataSeriesWidget
is created by thePlotListPanel
for everyDataSeries
in thePlotPanel.dataSeries
list.- __init__(parent, dataSeries)[source]
Create a
DataSeriesWidget
.- Parameters
parent – The
wx
parent object.dataSeries – The
DataSeries
instance.
- __annotations__ = {}
- __module__ = 'fsleyes.controls.plotlistpanel'