silx.gui.plot.actions.io
¶
silx.gui.plot.actions.io
provides a set of QAction relative of inputs
and outputs for a PlotWidget
.
The following QAction are available:
-
selectOutputGroup
(h5filename)[source]¶ Open a dialog to prompt the user to select a group in which to output data.
Parameters: h5filename (str) – name of an existing HDF5 file Return type: str Returns: Name of output group, or None if the dialog was cancelled
-
class
SaveAction
(plot, parent=None)[source]¶ QAction for saving Plot content.
It opens a Save as… dialog.
Parameters: - plot –
PlotWidget
instance on which to operate. - parent – See
QAction
.
-
setFileFilter
(dataKind, nameFilter, func, index=None)[source]¶ Set a name filter to add/replace a file format support
Parameters: - dataKind (str) – The kind of data for which the provided filter is valid. One of: ‘all’, ‘curve’, ‘curves’, ‘image’, ‘scatter’
- nameFilter (str) – The name filter in the QFileDialog.
See
QFileDialog.setNameFilters()
. - func (callable) – The function to call to perform saving. Expected signature is: bool func(PlotWidget plot, str filename, str nameFilter)
- index (integer) – Index of the filter in the final list (or None)
-
getFileFilters
(dataKind)[source]¶ Returns the nameFilter and associated function for a kind of data.
Parameters: dataKind (str) – The kind of data for which the provided filter is valid. On of: ‘all’, ‘curve’, ‘curves’, ‘image’, ‘scatter’ Returns: {nameFilter: function} associations. Return type: collections.OrderedDict
- plot –
-
class
PrintAction
(plot, parent=None)[source]¶ QAction for printing the plot.
It opens a Print dialog.
Current implementation print a bitmap of the plot area and not vector graphics, so printing quality is not great.
Parameters: - plot –
PlotWidget
instance on which to operate. - parent – See
QAction
.
- plot –
-
class
CopyAction
(plot, parent=None)[source]¶ QAction to copy
PlotWidget
content to clipboard.Parameters: - plot –
PlotWidget
instance on which to operate - parent – See
QAction
- plot –