# Path: Qt.py

# 
# Path: ts2/utils.py
# class Context:
# class FormatException(Exception):
# class MissingDependencyException(Exception):
# class DurationProba(QtCore.QObject):
#     GAME = 10
#     EDITORS = [20, 21, 22, 23, 24, 25]
#     EDITOR_GENERAL = 20
#     EDITOR_SCENERY = 21
#     EDITOR_ROUTES = 22
#     EDITOR_TRAINTYPES = 23
#     EDITOR_SERVICES = 24
#     EDITOR_TRAINS = 25
#     def __init__(self, arg):
#     def __init__(self, arg):
# def cumsum(lis):
#     def __init__(self, data):
#     def __str__(self):
#     def list(self):
#     def isNull(self):
#     def yieldValue(self):
# def to_json(data):
# def from_json(json_str):
# 
# Path: ts2/scenery/helper.py
# class TrackGraphicsItem(QtWidgets.QGraphicsItem):
# class TrackPropertiesModel(QtCore.QAbstractTableModel):
# class TIProperty:
#     def __init__(self, trackItem, itemId=0):
#     def boundingRect(self):
#     def shape(self):
#     def paint(self, painter, option, widget=None):
#     def mousePressEvent(self, event):
#     def mouseMoveEvent(self, event):
#     def dragEnterEvent(self, event):
#     def dragLeaveEvent(self, event):
#     def dropEvent(self, event):
#     def __init__(self, trackItems):
#     def rowCount(self, parent=None, *args):
#     def columnCount(self, parent=None, *args):
#     def data(self, index, role=Qt.DisplayRole):
#     def setData(self, index, value, role=Qt.EditRole):
#     def headerData(self, section, orientation, role=Qt.DisplayRole):
#     def flags(self, index):
#     def __init__(self, name, display, readOnly=False, propType="str",
#                  enumNames=None, enumValues=None):


from Qt import QtCore, QtGui, QtWidgets, Qt
from ts2 import utils
from ts2.scenery import helper
        else:
            return QtCore.QRectF(0, 0, x2 - x1, y2 - y1)

    def graphicsMouseMoveEvent(self, event, itemId=0):
        """This function is called by the owned
        :class:`~ts2.scenery.helper.TrackGraphicsItem` to handle
        its :meth:`~ts2.scenery.helper.TrackGraphicsItem.mouseMoveEvent`.
        Reimplemented in the ResizableItem class to begin a drag operation on
        corners."""
        if event.buttons() == Qt.LeftButton and \
           self.simulation.context == utils.Context.EDITOR_SCENERY:
            if QtCore.QLineF(
                    event.scenePos(),
                    event.buttonDownScenePos(Qt.LeftButton)).length() < 3.0:
                return
            drag = QtGui.QDrag(event.widget())
            mime = QtCore.QMimeData()
            pos = event.buttonDownScenePos(Qt.LeftButton) - self.origin
            if QtCore.QRectF(-5, -5, 9, 9).contains(pos):
                movedEnd = "start"
            elif QtCore.QRectF(self.end.x() - self.origin.x() - 5,
                               self.end.y() - self.origin.y() - 5,
                               9, 9).contains(pos):
                movedEnd = "end"
                pos -= self.end - self.origin
            # elif self._gi[itemId].shape().contains(pos):
            else:
                movedEnd = "origin"
            if movedEnd is not None:
                mime.setText(type(self).__name__ + "#" +

# Path: Qt.py

# 
# Path: ts2/utils.py
# class Context:
# class FormatException(Exception):
# class MissingDependencyException(Exception):
# class DurationProba(QtCore.QObject):
#     GAME = 10
#     EDITORS = [20, 21, 22, 23, 24, 25]
#     EDITOR_GENERAL = 20
#     EDITOR_SCENERY = 21
#     EDITOR_ROUTES = 22
#     EDITOR_TRAINTYPES = 23
#     EDITOR_SERVICES = 24
#     EDITOR_TRAINS = 25
#     def __init__(self, arg):
#     def __init__(self, arg):
# def cumsum(lis):
#     def __init__(self, data):
#     def __str__(self):
#     def list(self):
#     def isNull(self):
#     def yieldValue(self):
# def to_json(data):
# def from_json(json_str):
# 
# Path: ts2/scenery/helper.py
# class TrackGraphicsItem(QtWidgets.QGraphicsItem):
# class TrackPropertiesModel(QtCore.QAbstractTableModel):
# class TIProperty:
#     def __init__(self, trackItem, itemId=0):
#     def boundingRect(self):
#     def shape(self):
#     def paint(self, painter, option, widget=None):
#     def mousePressEvent(self, event):
#     def mouseMoveEvent(self, event):
#     def dragEnterEvent(self, event):
#     def dragLeaveEvent(self, event):
#     def dropEvent(self, event):
#     def __init__(self, trackItems):
#     def rowCount(self, parent=None, *args):
#     def columnCount(self, parent=None, *args):
#     def data(self, index, role=Qt.DisplayRole):
#     def setData(self, index, value, role=Qt.EditRole):
#     def headerData(self, section, orientation, role=Qt.DisplayRole):
#     def flags(self, index):
#     def __init__(self, name, display, readOnly=False, propType="str",
#                  enumNames=None, enumValues=None):


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

        else:
            return QtCore.QRectF(0, 0, x2 - x1, y2 - y1)

    def graphicsMouseMoveEvent(self, event, itemId=0):
        """This function is called by the owned
        :class:`~ts2.scenery.helper.TrackGraphicsItem` to handle
        its :meth:`~ts2.scenery.helper.TrackGraphicsItem.mouseMoveEvent`.
        Reimplemented in the ResizableItem class to begin a drag operation on
        corners."""
        if event.buttons() == Qt.LeftButton and \
           self.simulation.context == utils.Context.EDITOR_SCENERY:
            if QtCore.QLineF(
                    event.scenePos(),
                    event.buttonDownScenePos(Qt.LeftButton)).length() < 3.0:
                return
            drag = QtGui.QDrag(event.widget())
            mime = QtCore.QMimeData()
            pos = event.buttonDownScenePos(Qt.LeftButton) - self.origin
            if QtCore.QRectF(-5, -5, 9, 9).contains(pos):
                movedEnd = "start"
            elif QtCore.QRectF(self.end.x() - self.origin.x() - 5,
                               self.end.y() - self.origin.y() - 5,
                               9, 9).contains(pos):
                movedEnd = "end"
                pos -= self.end - self.origin
            # elif self._gi[itemId].shape().contains(pos):
            else:
                movedEnd = "origin"
            if movedEnd is not None:
                mime.setText(type(self).__name__ + "#" +

                             str(self.tiId) + "#" +