def __init__(self, parent=None): # constructors of base classes super(KGraphViewWidget, self).__init__(parent) graphView = KGraphView(parent=self) graphView.nodeAdded.connect(self.__onNodeAdded) graphView.nodeRemoved.connect(self.__onNodeRemoved) graphView.beginConnectionManipulation.connect(self.__onBeginConnectionManipulation) graphView.endConnectionManipulation.connect(self.__onEndConnectionManipulationSignal) graphView.connectionAdded.connect(self.__onConnectionAdded) graphView.connectionRemoved.connect(self.__onConnectionRemoved) graphView.selectionChanged.connect(self.__onSelectionChanged) graphView.endSelectionMoved.connect(self.__onSelectionMoved) graphView.beginDeleteSelection.connect(self.__onBeginDeleteSelection) graphView.endDeleteSelection.connect(self.__onEndDeleteSelection) self.setGraphView(graphView) ######################### ## Setup hotkeys for the following actions. undoShortcut = QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Z), self) undoShortcut.activated.connect(self.undo) redoShortcut = QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Y), self) redoShortcut.activated.connect(self.redo) openContextualNodeListShortcut = QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Tab), self) openContextualNodeListShortcut.activated.connect(self.openContextualNodeList) self.newRigPreset()
def __init__(self, parent=None): # constructors of base classes super(KGraphViewWidget, self).__init__(parent) self._builder = None self._guideBuilder = None self.guideRig = None graphView = KGraphView (parent = self) self.setGraphView (graphView) self.newRigPreset ()