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


import sys
import traceback
import ts2
from Qt import QtCore, QtWidgets, Qt
from ts2.gui import servicelistview
from ts2.utils import settings
        descriptionText.setText(simulation.option("description"))
        optionsLabel = QtWidgets.QLabel(self)
        optionsLabel.setText("<u>" + self.tr("Options:") + "</u>")
        tibOptionCB = QtWidgets.QCheckBox(self)
        tibOptionCB.stateChanged.connect(self.changeTIB)
        tibOptionCB.setChecked(
            int(simulation.option("trackCircuitBased")) != 0)
        optionLayout = QtWidgets.QFormLayout()
        optionLayout.addRow(self.tr("Play simulation with track circuits"),
                            tibOptionCB)
        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok)
        layout = QtWidgets.QVBoxLayout()
        layout.addLayout(hlayout)
        layout.addWidget(descriptionLabel)
        layout.addWidget(descriptionText)
        layout.addWidget(optionsLabel)
        layout.addLayout(optionLayout)
        layout.addWidget(buttonBox)
        self.setLayout(layout)
        buttonBox.accepted.connect(self.accept)

    @QtCore.pyqtSlot(int)
    def changeTIB(self, checkState):
        """Changes the trackItemBased Option."""
        if checkState == Qt.Checked:
            self.simulation.setOption("trackCircuitBased", 1)
        else:
            self.simulation.setOption("trackCircuitBased", 0)



# 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/gui/dialogs.py
import sys
import traceback
import ts2
from Qt import QtCore, QtWidgets, Qt
from ts2.gui import servicelistview
from ts2.utils import settings

        descriptionText.setText(simulation.option("description"))
        optionsLabel = QtWidgets.QLabel(self)
        optionsLabel.setText("<u>" + self.tr("Options:") + "</u>")
        tibOptionCB = QtWidgets.QCheckBox(self)
        tibOptionCB.stateChanged.connect(self.changeTIB)
        tibOptionCB.setChecked(
            int(simulation.option("trackCircuitBased")) != 0)
        optionLayout = QtWidgets.QFormLayout()
        optionLayout.addRow(self.tr("Play simulation with track circuits"),
                            tibOptionCB)
        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok)
        layout = QtWidgets.QVBoxLayout()
        layout.addLayout(hlayout)
        layout.addWidget(descriptionLabel)
        layout.addWidget(descriptionText)
        layout.addWidget(optionsLabel)
        layout.addLayout(optionLayout)
        layout.addWidget(buttonBox)
        self.setLayout(layout)
        buttonBox.accepted.connect(self.accept)

    @QtCore.pyqtSlot(int)
    def changeTIB(self, checkState):
        """Changes the trackItemBased Option."""
        if checkState == Qt.Checked:
            self.simulation.setOption("trackCircuitBased", 1)
        else:
            self.simulation.setOption("trackCircuitBased", 0)



class ServiceAssignDialog(QtWidgets.QDialog):