CmapCatalogComboBox#
Searchable QComboBox
variant that contains the
entire cmap colormap catalog
requires cmap
This widget uses the cmap library to provide colormaps. You can install it with:
# use the `cmap` extra to include colormap support
pip install superqt[cmap]
You can limit the colormaps shown by setting the categories
or
interpolation
keyword arguments.
from qtpy.QtWidgets import QApplication
from superqt.cmap import CmapCatalogComboBox
app = QApplication([])
catalog_combo = CmapCatalogComboBox(interpolation="linear")
catalog_combo.setCurrentText("viridis")
catalog_combo.show()
app.exec()
Qt Class#
Signals#
currentColormapChanged
#
Methods#
A combo box for selecting a colormap from the entire cmap catalog.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parent |
QWidget
|
The parent widget. |
None
|
prefer_short_names |
bool
|
If True (default), short names (without the namespace prefix) will be preferred over fully qualified names. In cases where the same short name is used in multiple namespaces, they will all be referred to by their fully qualified (namespaced) name. |
True
|
categories |
Container[Category]
|
If provided, only return names from the given categories. |
()
|
interpolation |
Interpolation
|
If provided, only return names that have the given interpolation method. |
None
|
currentColormap() -> Colormap | None
#
Returns the currently selected Colormap or None if not yet selected.