[ui] expose add/removeEdge as Slots

This commit is contained in:
Yann Lanthony 2017-10-13 12:21:22 +02:00
parent 7ddf86e6bc
commit d34d6f27ec

View file

@ -19,6 +19,14 @@ class Reconstruction(QObject):
def removeNode(self, node):
self._undoStack.tryAndPush(commands.RemoveNodeCommand(self._graph, node))
@Slot(graph.Attribute, graph.Attribute)
def addEdge(self, src, dst):
self._undoStack.tryAndPush(commands.AddEdgeCommand(self._graph, src, dst))
@Slot(graph.Edge)
def removeEdge(self, edge):
self._undoStack.tryAndPush(commands.RemoveEdgeCommand(self._graph, edge))
@Slot(graph.Attribute, "QVariant")
def setAttribute(self, attribute, value):
self._undoStack.tryAndPush(commands.SetAttributeCommand(self._graph, attribute, value))