def computeBoundingRect(self):
        width = 0
        height = CurrentTheme.MODULE_LABEL_MARGIN[1]
        # for each rect: Add height, adjust min width,
        # set pos to distance to top middle corner, to be adjusted when
        # paddedRect is known
        labelRect = self.labelFontMetric.boundingRect(self.label)
        labelRect.moveTo(-labelRect.width()//2, height)
        height += labelRect.height()
        padding = labelRect.adjusted(-CurrentTheme.MODULE_LABEL_MARGIN[0], 0,
                                      CurrentTheme.MODULE_LABEL_MARGIN[2], 0)
        width = max(width, padding.width())

        if self.description:
            self.description = '(' + self.description + ')'
            descRect = self.descFontMetric.boundingRect(self.description)
            descRect.moveTo(-descRect.width()//2, height)
            height += descRect.height()
            padding = descRect.adjusted(-CurrentTheme.MODULE_LABEL_MARGIN[0], 0,
                                         CurrentTheme.MODULE_LABEL_MARGIN[2], 0)
            width = max(width, padding.width())

        if self.edit_rect.height():
            height += CurrentTheme.MODULE_EDIT_MARGIN[1] # top margin
            editRect = self.edit_rect
            editRect.moveTo(-editRect.width()//2, height)
            height += editRect.height()
            padding = editRect.adjusted(-CurrentTheme.MODULE_EDIT_MARGIN[0], 0,
                                         CurrentTheme.MODULE_EDIT_MARGIN[2], 0)
            width = max(width, padding.width())
            height += CurrentTheme.MODULE_EDIT_MARGIN[3] # bottom edit margin

        height += CurrentTheme.MODULE_LABEL_MARGIN[3] # bottom margin

        # move to final position

        self.paddedRect = QtCore.QRectF(-width/2, -height/2, width, height)
        labelRect.translate(0, -height//2)
        self.labelRect = labelRect
        if self.description:
            descRect.translate(0, -height//2)
            self.descRect = descRect
        if self.edit_rect.height():
            editRect.translate(0, -height//2)
            self.editRect = editRect
        self.abstRect = QtCore.QRectF(
            self.paddedRect.left(),
            -self.paddedRect.top()-CurrentTheme.MODULE_LABEL_MARGIN[3],
            CurrentTheme.MODULE_LABEL_MARGIN[0],
            CurrentTheme.MODULE_LABEL_MARGIN[3])
computeBoundingRect() -> None
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/pipeline_view.py/QGraphicsModuleItem.computeBoundingRect