# 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):


from Qt import QtCore, Qt
from ts2 import utils

    def for_json(self):
        """Dumps this service line to JSON."""
        return {
            "__type__": "ServiceLine",
            "placeCode": self.placeCode,
            "scheduledArrivalTime": self.scheduledArrivalTimeStr,
            "scheduledDepartureTime": self.scheduledDepartureTimeStr,
            "trackCode": self.trackCode,
            "mustStop": bool(self.mustStop)
        }

    @property
    def service(self):
        """Returns the service this ServiceLine belongs to"""
        return self._service

    @property
    def place(self):
        """Returns the place of this ServiceLine"""
        return self.service.simulation.place(self._placeCode)

    @property
    def placeCode(self):
        """Returns the place code of this ServiceLine"""
        return self._placeCode

    @placeCode.setter
    def placeCode(self, value):
        """Setter function for the placeCode property"""

# 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/trains/service.py
from Qt import QtCore, Qt
from ts2 import utils


    def for_json(self):
        """Dumps this service line to JSON."""
        return {
            "__type__": "ServiceLine",
            "placeCode": self.placeCode,
            "scheduledArrivalTime": self.scheduledArrivalTimeStr,
            "scheduledDepartureTime": self.scheduledDepartureTimeStr,
            "trackCode": self.trackCode,
            "mustStop": bool(self.mustStop)
        }

    @property
    def service(self):
        """Returns the service this ServiceLine belongs to"""
        return self._service

    @property
    def place(self):
        """Returns the place of this ServiceLine"""
        return self.service.simulation.place(self._placeCode)

    @property
    def placeCode(self):
        """Returns the place code of this ServiceLine"""
        return self._placeCode

    @placeCode.setter
    def placeCode(self, value):
        """Setter function for the placeCode property"""

        if self.simulation.context == utils.Context.EDITOR_SERVICES: