'exclusive: clear all states before applying this one
set_to: None => advance the state, otherwise a value from TAG_SEARCH_STATES'

def toggle(self, index, exclusive, set_to=None):

    if (not index.isValid()):
        return False
    item = self.get_node(index)
    item.toggle(set_to=set_to)
    if exclusive:
        self.reset_all_states(except_=item.tag)
    self.dataChanged.emit(index, index)
    return True
