(self, section, orientation, role)
Reimplemented from `QAbstractTableModel.headerData`.
Reimplemented from `QAbstractTableModel.headerData`.
Reimplemented from QAbstractTableModel . headerData .
def headerData(self, section, orientation, role):
        """Reimplemented from `QAbstractTableModel.headerData`."""
        if orientation == Qt.Vertical:
            if role == Qt.DisplayRole:
                return int(self.mapToSourceRows(section) + 1)
            return None

        coldesc = self.columns[section]
        if role == Qt.DisplayRole:
            if isinstance(coldesc, TableModel.Basket):
                return "{...}"
            else:
                return coldesc.var.name
        elif role == Qt.ToolTipRole:
            return self._tooltip(coldesc)
        elif role == TableModel.VariableRole \
                and isinstance(coldesc, TableModel.Column):
            return coldesc.var
        elif role == TableModel.VariableStatsRole:
            return self._stats_for_column(section)
        elif role == TableModel.DomainRole:
            return coldesc.role
        else:
            return None
def headerData ( self , section , orientation , role ) : if orientation == Qt . Vertical : if role == Qt . DisplayRole : return int ( self . mapToSourceRows ( section ) + 1 ) return None coldesc = self . columns [ section ] if role == Qt . DisplayRole : if isinstance ( coldesc , TableModel . Basket ) : return "{...}" else : return coldesc . var . name elif role == Qt . ToolTipRole : return self . _tooltip ( coldesc ) elif role == TableModel . VariableRole and isinstance ( coldesc , TableModel . Column ) : return coldesc . var elif role == TableModel . VariableStatsRole : return self . _stats_for_column ( section ) elif role == TableModel . DomainRole : return coldesc . role else : return None