hyperspyui.plugins.cmappicker module

Created on Wed Jan 20 22:32:58 2016

@author: Vidar Tonaas Fauske

class hyperspyui.plugins.cmappicker.CMapDelegate(width, height, cmap_shift, *args, **kwargs)

Bases: QItemDelegate

Delegate responsible for drawing a the entries in the colormap combobox.

In addition to drawing a preview of the colormap, it also allows for parent elements to be added (group headings). The colormaps will be prepended by a set amount to prevent overlapping with the text.

static _create_pixmap(line, height)
drawFocus(self, painter: QPainter | None, option: QStyleOptionViewItem, rect: QRect)
paint(self, painter: QPainter | None, option: QStyleOptionViewItem, index: QModelIndex)
sizeHint(self, option: QStyleOptionViewItem, index: QModelIndex) QSize
class hyperspyui.plugins.cmappicker.CMapPickerPlugin(main_window)

Bases: Plugin

change_cmap(cmap, mpl_axes=None)
name = 'Color map picker'
class hyperspyui.plugins.cmappicker.CMapPickerWidget(main_window, parent, figure=None)

Bases: FigureWidget


Called when a connected update triggers. If the window is valid, it sets up the traitsui dialog capture, and calls cb_make_dialog. If the window is invalid, it clears the widget.

static make_parent_item(text)