# Path: Qt.py



from Qt import QtCore, QtWidgets, Qt

    This class is the graphics of a :class:`~ts2.scenery.abstract.TrackItem` on the scene. Each instance
    belongs to a trackItem which is defined in the constructor and which
    is responsible for all actions related to this graphical item."""
    def __init__(self, trackItem, itemId=0):
        """
        :param trackItem: The object to draw for
        :type trackItem: :class:`~ts2.scenery.abstract.TrackItem`
        :param itemId: Id of this item
        :type int:
        """
        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()

# Path: Qt.py



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


    This class is the graphics of a :class:`~ts2.scenery.abstract.TrackItem` on the scene. Each instance
    belongs to a trackItem which is defined in the constructor and which
    is responsible for all actions related to this graphical item."""
    def __init__(self, trackItem, itemId=0):
        """
        :param trackItem: The object to draw for
        :type trackItem: :class:`~ts2.scenery.abstract.TrackItem`
        :param itemId: Id of this item
        :type int:
        """
        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)