'Update the widget with the new source/sink node signal descriptions.'

def __updateState(self):

    widget = QGraphicsWidget()
    widget.setLayout(QGraphicsGridLayout())
    widget.layout().setHorizontalSpacing(50)
    left_node = EditLinksNode(self, direction=Qt.LeftToRight, node=self.source)
    left_node.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
    right_node = EditLinksNode(self, direction=Qt.RightToLeft, node=self.sink)
    right_node.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
    left_node.setMinimumWidth(150)
    right_node.setMinimumWidth(150)
    widget.layout().addItem(left_node, 0, 0)
    widget.layout().addItem(right_node, 0, 1)
    title_template = '<center><b>{0}<b></center>'
    left_title = GraphicsTextWidget(self)
    left_title.setHtml(title_template.format(escape(self.source.title)))
    left_title.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
    right_title = GraphicsTextWidget(self)
    right_title.setHtml(title_template.format(escape(self.sink.title)))
    right_title.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
    widget.layout().addItem(left_title, 1, 0, alignment=(Qt.AlignHCenter | Qt.AlignTop))
    widget.layout().addItem(right_title, 1, 1, alignment=(Qt.AlignHCenter | Qt.AlignTop))
    widget.setParentItem(self)
    max_w = max(left_node.sizeHint(Qt.PreferredSize).width(), right_node.sizeHint(Qt.PreferredSize).width())
    left_node.setMinimumWidth(max_w)
    right_node.setMinimumWidth(max_w)
    left_title.setMinimumWidth(max_w)
    right_title.setMinimumWidth(max_w)
    self.layout().addItem(widget)
    self.layout().activate()
    self.sourceNodeWidget = left_node
    self.sinkNodeWidget = right_node
    self.sourceNodeTitle = left_title
    self.sinkNodeTitle = right_title
