def __init__(self, node, name, value): QUndoCommand.__init__(self) self.setText('set {} ({})'.format(name, node.name())) self.node = node self.name = name self.old_val = node.get_property(name) self.new_val = value
def __init__(self, dictionary, key, value): QUndoCommand.__init__(self) self._dictionary = dictionary self._key = key self._old_value = dictionary[key] self._new_value = value self.setText(" modify command")
def __init__(self, dictionary: 'UndoableDict', key: Union[str, list], value: Any): QUndoCommand.__init__(self) self._dictionary = dictionary self._key = key self._new_value = value self._old_value = dictionary.getItem(key)
def __init__(self, dictionary, key, value): QUndoCommand.__init__(self) print(dictionary) self._dictionary = dictionary print(self._dictionary) self._key = key self._value = value
def __init__(self, myList: 'URList', key: Union[int, slice], value: Any): QUndoCommand.__init__(self) self._list = myList self._key = key try: self._old_value = self._list[key] except IndexError: self._old_value = None self._new_value = value
def __init__(self, graph, node): QUndoCommand.__init__(self) self.setText('deleted node') self.graph = graph self.node = node self.inputs = [] self.outputs = [] if hasattr(self.node, 'inputs'): input_ports = self.node.inputs().values() self.inputs = [(p, p.connected_ports()) for p in input_ports] if hasattr(self.node, 'outputs'): output_ports = self.node.outputs().values() self.outputs = [(p, p.connected_ports()) for p in output_ports]
def __init__(self, dictionary, key, value): QUndoCommand.__init__(self) self._dictionary = dictionary self._key = key self._old_value = None thisKey = key if isinstance(thisKey, list): thisKey = thisKey[0] if thisKey in dictionary: self._old_value = dictionary[key] self._new_value = value
def __init__(self, graph, node, pos=None): QUndoCommand.__init__(self) self.setText('added node') self.graph = graph self.node = node self.pos = pos
def __init__(self, node, pos, prev_pos): QUndoCommand.__init__(self) self.node = node self.pos = pos self.prev_pos = prev_pos
def __init__(self, src_port, trg_port): QUndoCommand.__init__(self) self.source = src_port self.target = trg_port
def mergeWith(self, other: QtW.QUndoCommand) -> bool: if other.id() != self.id(): return False self.newCopyright = other.newCopyright return True
def mergeWith(self, other: QtW.QUndoCommand) -> bool: if other.id() != self.id(): return False self.newLicense = other.newLicense return True
def __init__(self, myList: 'URList', key: Union[int, slice]): QUndoCommand.__init__(self) self._key = key self._list = myList