LayerActionRegistry

class glue.config.LayerActionRegistry[source]

Bases: glue.config.Registry

Stores 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 action
  • tooltip: the text that appears when hovering with the mouse over the action
  • callback: the function to call when the action is triggered
  • icon: an icon image to use for the layer action
  • single: whether to show this action only when selecting single layers (default: False)
  • data: if single is True whether to only show the action when selecting a dataset
  • subset_group: if single is True whether to only show the action when selecting a subset group
  • subset: if single is True whether to only show the action when selecting a subset

The callback function is called with two arguments. If single is 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, …])

Methods Documentation

__call__(label, callback=None, tooltip=None, icon=None, single=False, data=False, subset_group=False, subset=False)[source]