# Path: Qt.py



from Qt import QtCore, QtWidgets, Qt
        super().__init__()
        self.trackItem = trackItem
        self.itemId = itemId
        self.setZValue(0)
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)

    def boundingRect(self):
        """
        :return: The bounding rectangle of this ``TrackGraphicsItem``.
                 See ``QGraphicsItem::boundingRect()`` for more info.
                 Actually calls the graphicsBoundingRect() function of the owning trackItem
        :rtype: ``QRectF``
        """
        return self.trackItem.graphicsBoundingRect(self.itemId)

    def shape(self):
        """Returns the shape of this item as a QPainterPath in local
        coordinates."""
        shape = super().shape()
        return self.trackItem.graphicsShape(shape, self.itemId)

    def paint(self, painter, option, widget=None):
        """Painting function for the SignalGraphicsItem.
        This function calls the graphicsPaint function of the owning TrackItem
        to paint its painter."""
        self.trackItem.graphicsPaint(painter, option, self.itemId, widget)
        # pen = QtGui.QPen(Qt.red)
        # painter.setPen(pen)
        # painter.drawPath(self.shape())


# Path: Qt.py



# Path: ts2/scenery/helper.py
from Qt import QtCore, QtWidgets, Qt

        super().__init__()
        self.trackItem = trackItem
        self.itemId = itemId
        self.setZValue(0)
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)

    def boundingRect(self):
        """
        :return: The bounding rectangle of this ``TrackGraphicsItem``.
                 See ``QGraphicsItem::boundingRect()`` for more info.
                 Actually calls the graphicsBoundingRect() function of the owning trackItem
        :rtype: ``QRectF``
        """
        return self.trackItem.graphicsBoundingRect(self.itemId)

    def shape(self):
        """Returns the shape of this item as a QPainterPath in local
        coordinates."""
        shape = super().shape()
        return self.trackItem.graphicsShape(shape, self.itemId)

    def paint(self, painter, option, widget=None):
        """Painting function for the SignalGraphicsItem.
        This function calls the graphicsPaint function of the owning TrackItem
        to paint its painter."""
        self.trackItem.graphicsPaint(painter, option, self.itemId, widget)
        # pen = QtGui.QPen(Qt.red)
        # painter.setPen(pen)
        # painter.drawPath(self.shape())


    def mousePressEvent(self, event):