mad_gui.plugins.BaseExporter#

class mad_gui.plugins.BaseExporter(parent=None)[source]#

Export the plotted data and/or annotations.

Methods

name()

Return a name, which is used to represent this Exporter in a dropdown in the GUI.

process_data(global_data)

This method must be implemented by your plugin.

__init__(parent=None)[source]#

Set a parent, in case this would be necessary at any later stage.

Parameters:
parent

This could for example be the main window of the GUI, in case the plugin wants to access something there. However, this is unlikely to be necessary since plugins receive either the single mad_gui.models.GlobalData or its attribute PlotData, which should be sufficient to do everything.

abstract classmethod name() str[source]#

Return a name, which is used to represent this Exporter in a dropdown in the GUI.

abstract process_data(global_data)[source]#

This method must be implemented by your plugin.

Parameters:
global_data

The GUI's mad_gui.models.global_data.GlobalData object, which is kept in mad_gui.windows.main.MainWindow

Returns:
Nothing

Everything you want to to/save must be done inside your plugin.