

@classmethod
def _build_widget_subclass(cls):
    '\n        Build the DataViewer subclass for this viewer\n        '
    props = (CustomWidgetBase._property_set + list(cls.ui.keys()))
    widget_dict = {
        'LABEL': cls.name,
        'ui': cls.ui,
        'coordinator_cls': cls,
        '_property_set': props,
    }
    widget_dict.update(**dict(((k, FormDescriptor(k)) for k in props.ui)))
    widget_cls = type(('%sWidget' % cls.__name__), (CustomWidgetBase,), widget_dict)
    cls._widget_cls = widget_cls
    qt_client.add(widget_cls)
    for c in [widget_cls, cls]:
        w = getattr(getmodule(ViewerState), c.__name__, None)
        if (w is not None):
            raise RuntimeError(('Duplicate custom viewer detected %s' % c))
        setattr(getmodule(ViewerState), c.__name__, c)

dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py CustomViewer._build_widget_subclass/VarMisuse@83/129 `cls`->`props`