CustomViewerMeta#

class glue_qt.viewers.custom.custom_viewer.CustomViewerMeta(name, bases, attrs)[source]#

Bases: type

Metaclass to construct CustomViewer and subclasses

The metaclass does two things when constructing new classes:

  • it finds the class-level attributes that describe ui elements (eg checked=False). It bundles these into a ui dict attribute, later used to construct the FormElements and widgets to represent each setting

  • It creates the qt DataViewer widget class associated with this class.

  • It looks for overridden user-defined methods like plot_subset, and registers them for later use.