def METHOD_NAME(self, r: Record):
    log_level = self.log_level_slider.value()
    if r.level.value > log_level:
        return False
    # if any program is checked, display only those that are checked
    if self.programs_checkbox.checkState() != Qt.Unchecked:
        if r.emitter is None:
            return False
        if self.p_checkboxes[r.emitter].checkState() != Qt.Checked:
            return False
    return True