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: PyQt5.QtWidgets.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, QPainter, QStyleOptionViewItem, QRect)
paint(self, QPainter, QStyleOptionViewItem, QModelIndex)
sizeHint(self, QStyleOptionViewItem, QModelIndex) QSize
class hyperspyui.plugins.cmappicker.CMapPickerPlugin(main_window)

Bases: hyperspyui.plugins.plugin.Plugin

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

Bases: hyperspyui.widgets.extendedqwidgets.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)