def paint(self, painter: QPainter, option: QStyleOptionGraphicsItem,
              index: QWidget) -> None:
        """
		Paint the graphics of the action wrapper including action name, number, and ports.

		:param painter: This draws the widget.
		:type painter: QPainter
		:param option: Option for the style of graphic.
		:type option: QStyleOptionGraphicsItem
		:param index: Index for the painted graphic.
		:type index: QWidget
		:return: None
		:rtype: NoneType
		"""
        ActionGraphics.paint(self, painter, option, index)

        # Get dimensions of the action
        x, y, width, height = self.getActionRect(self._action.getInputPorts(),
                                                 self._action.getOutputPorts())

        # Draw the number tag.
        number = str(
            self._action.getParent().getActions().index(self._action) + 1)
        offset = 5
        radius = 15
        size = ActionGraphics.H_SPACE / 2 - offset * 2
        painter.setBrush(QColor(29, 110, 37))
        painter.drawRoundedRect(QRectF(x + offset, y + offset, size, size),
                                radius, radius)
        painter.setPen(ActionWrapperGraphics.TAG_TEXT_COLOR)
        painter.setBrush(ActionWrapperGraphics.TAG_TEXT_COLOR)
        painter.setFont(ActionWrapperGraphics.TAG_FONT)
        fm = QFontMetricsF(ActionWrapperGraphics.TAG_FONT)
        pixelsWide = fm.width(number)
        pixelsHigh = fm.height()
        # TODO: fix text positioning - font metrics aren't working well
        painter.drawText(x + offset + size / 2 - pixelsWide,
                         y + offset + size / 2 + pixelsHigh / 2, number)

        # Draw the name of the action
        painter.setPen(ActionWrapperGraphics.NAME_TEXT_COLOR)
        painter.setBrush(ActionWrapperGraphics.NAME_TEXT_COLOR)
        painter.setFont(ActionWrapperGraphics.NAME_FONT)
        fm = QFontMetricsF(ActionWrapperGraphics.NAME_FONT)
        br = fm.boundingRect(self._action.getName())
        # TODO: fix text positioning - font metrics aren't working well
        t = fm.elidedText(self._action.getName(), Qt.ElideRight,
                          self._width - offset * 2)
        painter.drawText(x + offset, br.height(), t)
    def paint(self, painter: QPainter, option: QStyleOptionGraphicsItem,
              index: QWidget) -> None:
        """
		Paint the graphics of the action pipeline with ports, wires, and internal graphics.

		:param painter: This draws the widget.
		:type painter: QPainter
		:param option: Option for the style of graphic.
		:type option: QStyleOptionGraphicsItem
		:param index: Index for the painted graphic.
		:type index: QWidget
		:return: None
		:rtype: NoneType
		"""

        self.getActionRect(self._action.getInputPorts(),
                           self._action.getOutputPorts())
        ActionGraphics.paint(self, painter, option, index)
        self.placeActions()