#NEWLINE# def addExistingConnection( self , fromDagNode , toDagNode ) : #NEWLINE# #INDENT# '\n        Adds a new draw edge for given from and to dag nodes.\n        ' #NEWLINE# fromDrawNode = self . drawNode ( fromDagNode ) #NEWLINE# toDrawNode = self . drawNode ( toDagNode ) #NEWLINE# if ( not fromDrawNode ) : #NEWLINE# #INDENT# raise RuntimeError ( ( 'Attempting to connect node %s which is not yet registered to QGraphicsScene.' % self . name ) ) #NEWLINE# #UNINDENT# if ( not toDrawNode ) : #NEWLINE# #INDENT# raise RuntimeError ( ( 'Attempting to connect node %s which is not yet registered to QGraphicsScene.' % toDagNode . name ) ) #NEWLINE# #UNINDENT# newDrawEdge = DrawEdge ( fromDrawNode , toDrawNode ) #NEWLINE# self . addItem ( newDrawEdge ) #NEWLINE# return newDrawEdge