LayerActionRegistry#
- class glue_qt.config.LayerActionRegistry[source]#
Bases:
RegistryStores custom menu actions available when the user select one or more datasets, subset group, or subset in the data collection view.
This members property is a list of named tuples with the following attributes:
label: the user-facing name of the actiontooltip: the text that appears when hovering with the mouse over the actioncallback: the function to call when the action is triggeredicon: an icon image to use for the layer actionsingle: whether to show this action only when selecting single layers (default: False)data: ifsingleis True whether to only show the action when selecting a datasetsubset_group: ifsingleis True whether to only show the action when selecting a subset groupsubset: ifsingleis True whether to only show the action when selecting a subset
The callback function is called with two arguments. If
singleis True, the first argument is the selected layer, otherwise it is the list of selected layers. The second argument is the ~glue.core.data_collection.DataCollection object.Methods Summary
__call__(label[, callback, tooltip, icon, ...])This is provided so that registry instances can be used as decorators.
Methods Documentation