(self, view)
Update the variable labels visibility for `view`
Update the variable labels visibility for `view`
Update the variable labels visibility for view
def _update_variable_labels(self, view):
        "Update the variable labels visibility for `view`"
        model = view.model()
        if isinstance(model, TableSliceProxy):
            model = model.sourceModel()

        if self.show_attribute_labels:
            model.setRichHeaderFlags(
                RichTableModel.Labels | RichTableModel.Name)

            labelnames = set()
            domain = model.source.domain
            for a in itertools.chain(domain.metas, domain.variables):
                labelnames.update(a.attributes.keys())
            labelnames = sorted(
                [label for label in labelnames if not label.startswith("_")])
            self.set_corner_text(view, "\n".join([""] + labelnames))
        else:
            model.setRichHeaderFlags(RichTableModel.Name)
            self.set_corner_text(view, "")
def _update_variable_labels ( self , view ) : model = view . model ( ) if isinstance ( model , TableSliceProxy ) : model = model . sourceModel ( ) if self . show_attribute_labels : model . setRichHeaderFlags ( RichTableModel . Labels | RichTableModel . Name ) labelnames = set ( ) domain = model . source . domain for a in itertools . chain ( domain . metas , domain . variables ) : labelnames . update ( a . attributes . keys ( ) ) labelnames = sorted ( [ label for label in labelnames if not label . startswith ( "_" ) ] ) self . set_corner_text ( view , "\n" . join ( [ "" ] + labelnames ) ) else : model . setRichHeaderFlags ( RichTableModel . Name ) self . set_corner_text ( view , "" )