def METHOD_NAME(self, row, column, role):
    if column.name == "marked":
        if role == Qt.BackgroundRole and row.isref:
            return QBrush(self.prefs.result_table_ref_background_color)
        if role == Qt.CheckStateRole and row.markable:
            return Qt.Checked if row.marked else Qt.Unchecked
        return None
    if role == Qt.DisplayRole:
        data = row.data_delta if self.model.delta_values else row.data
        return data[column.name]
    elif role == Qt.ForegroundRole:
        if row.isref:
            return QBrush(self.prefs.result_table_ref_foreground_color)
        elif row.is_cell_delta(column.name):
            return QBrush(self.prefs.result_table_delta_foreground_color)
    elif role == Qt.BackgroundRole:
        if row.isref:
            return QBrush(self.prefs.result_table_ref_background_color)
    elif role == Qt.FontRole:
        font = QFont(self.view.font())
        if self.prefs.reference_bold_font:
            font.setBold(row.isref)
        return font
    elif role == Qt.EditRole and column.name == "name":
        return row.data[column.name]
    return None