widgets module
Special widgets
General widgets
- class lys.widgets.general.AxesSelectionDialog(dim=2)[source]
Bases:
QDialog
A dialog to select two axes.
- Parameters
dim (int) – The dimension of the data.
- class lys.widgets.general.AxisCheckLayout(dim)[source]
Bases:
QHBoxLayout
A layout that specifies axes.
- Parameters
dim (int) – The dimension of data.
- GetChecked()[source]
Return checked axes as array.
- Returns
The selected axes
- Return type
list of integers
- SetChecked(axes)[source]
Set the state of the layout.
- Parameters
axes (list of integers) – The list of axes to be checked.
- stateChanged
Emitted when the state of the layout is changed.
- class lys.widgets.general.AxisSelectionLayout(label, dim=2, init=0)[source]
Bases:
QHBoxLayout
A layout to specify an axis.
- Parameters
label (str) – The label of the layout.
dim (int) – The dimension of data.
init (int) – The axis initially selected.
- axisChanged
Emitted when the selected axis is changed.
- class lys.widgets.general.ColorSelection[source]
Bases:
QPushButton
A widget to select color.
- colorChanged
Emitted when the selected color is changed
- class lys.widgets.general.ColormapSelection(opacity=True, log=True, reverse=True, gamma=True)[source]
Bases:
QWidget
A widget to select colormap.
- Parameters
opacity (bool) – If True, the opacity setting is enabled.
log (bool) – If True, ‘log’ checkbox is enabled.
reverse (bool) – If True, ‘reverse’ checkbox is enabled.
gamma (bool) – If True, gamma value can be set.
- colorChanged
Emitted when the color map is changed
- currentColor()[source]
Get the name of the selected colormap.
- Returns
The name of the selected colormap.
- Return type
str
- currentColorMaps()[source]
Get the QtGui.QPixmap of the selected colormap.
- Returns
The selected colormap.
- Return type
QPixmap
- isLog()[source]
Check if the ‘log’ checkbox is checked.
- Returns
Whether the ‘log’ checkbox is checked.
- Return type
bool
- setColormap(cmap)[source]
Set the colormap.
- Parameters
cmap (str) – The name of matplotlib colormaps. Use matplotlib.pyplot.colormaps to view all colormap names.
- setEnabled(enable)[source]
Enable the widget.
- Parameters
enable (bool) – The boolean to specify whether enabling or disabling the widget
- class lys.widgets.general.IndiceSelectionLayout(shape=None)[source]
Bases:
QGridLayout
A layout to specify indice.
- Parameters
shape (tuple) – The shape of data.
- setEnabled(enabled)[source]
Enable the respective spin box.
- Parameters
enabled (sequence of boolean) – Whether the spin box is enabled.
- valueChanged
Emitted when the value is changed.
- class lys.widgets.general.RegionSelectWidget(parent, dim, check=False)[source]
Bases:
QGridLayout
A widget to select region of multi-dimensional data. :param parent: The parent widget. :param dim: The dimension of the data. :param check: If True, user can select the axes.
- getChecked()[source]
Get the state of the checkboxes.
- Reutrns:
list of boolean: The state of the checkboxes.
- getRegion()[source]
Get the specified region.
- Returns
The specified region.
- Return type
list of length 2 sequence
- setChecked(checked)[source]
Set the state of the checkboxes.
- Parameters
checked (list of boolean) – The state to be set.
- setRegion(axis, range)[source]
Set the region.
- Parameters
axis (int) – The axis to be changed.
range (length 2 sequency) – The range to be set.
- stateChanged
Emitted when the state of the checkbox is changed.
- class lys.widgets.general.ScientificSpinBox(*args, valueChanged=None, **kwargs)[source]
Bases:
QDoubleSpinBox
Spin box that displays values in sdientific notation, which is frequently used in lys.
- class lys.widgets.general.kernelSigmaLayout(dimension=2)[source]
Bases:
QGridLayout
A layout that specifies the kernel of gaussian convolution filter.
- Parameters
dimension (int) – The dimension of the kernel.