Add node to graph with Ctrl+V if valid node content is in the clipboard

Attempt to paste the clipboard's content in the graph when Ctrl+V is
pressed. If the clipboard contains a valid node description, add the
corresponding node to the graph.
Otherwise, do nothing.
This commit is contained in:
Candice Bentéjac 2022-08-18 16:51:05 +02:00
parent 751bad96c6
commit ddda62a652
5 changed files with 80 additions and 0 deletions

View file

@ -15,6 +15,10 @@ class ClipboardHelper(QObject):
def setText(self, value):
self._clipboard.setText(value)
@Slot(result=str)
def getText(self):
return self._clipboard.text()
@Slot()
def clear(self):
self._clipboard.clear()