# Path: Qt.py

# 
# Path: ts2/editor/delegates.py
# class ServicesDelegate(QtWidgets.QStyledItemDelegate):
# class TrainTypesDelegate(QtWidgets.QStyledItemDelegate):
# class PlacesDelegate(QtWidgets.QStyledItemDelegate):
# class PropertyValuesDelegate(QtWidgets.QStyledItemDelegate):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):


from Qt import QtCore, QtGui, QtWidgets, Qt
from ts2.editor import delegates
        self.setSizePolicy(sizePolicy)
        self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.setItemDelegateForColumn(0, delegates.PlacesDelegate(self))

    def setModel(self, model):
        """Sets model and also setup cols"""
        super().setModel(model)
        self.resizeColumnsToContents()


class TrainsEditorView(QtWidgets.QTableView):
    """Table view with specific options for editing trains in the editor
    """
    def __init__(self, parent):
        """Constructor for the TrainsEditorView class"""
        super().__init__(parent)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setVerticalStretch(1)
        self.setSizePolicy(sizePolicy)
        self.setSortingEnabled(True)
        self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        servicesDelegate = delegates.ServicesDelegate(self)
        trainTypesDelegate = delegates.TrainTypesDelegate(self)
        self.setItemDelegateForColumn(1, servicesDelegate)
        self.setItemDelegateForColumn(2, trainTypesDelegate)

    trainSelected = QtCore.pyqtSignal(int)

# Path: Qt.py

# 
# Path: ts2/editor/delegates.py
# class ServicesDelegate(QtWidgets.QStyledItemDelegate):
# class TrainTypesDelegate(QtWidgets.QStyledItemDelegate):
# class PlacesDelegate(QtWidgets.QStyledItemDelegate):
# class PropertyValuesDelegate(QtWidgets.QStyledItemDelegate):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):
#     def createEditor(self, parent, option, index):
#     def setEditorData(self, editor, index):
#     def setModelData(self, editor, model, index):
#     def updateEditorGeometry(self, editor, option, index):


# Path: ts2/editor/views.py
from Qt import QtCore, QtGui, QtWidgets, Qt
from ts2.editor import delegates

        self.setSizePolicy(sizePolicy)
        self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.setItemDelegateForColumn(0, delegates.PlacesDelegate(self))

    def setModel(self, model):
        """Sets model and also setup cols"""
        super().setModel(model)
        self.resizeColumnsToContents()


class TrainsEditorView(QtWidgets.QTableView):
    """Table view with specific options for editing trains in the editor
    """
    def __init__(self, parent):
        """Constructor for the TrainsEditorView class"""
        super().__init__(parent)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setVerticalStretch(1)
        self.setSizePolicy(sizePolicy)
        self.setSortingEnabled(True)
        self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        servicesDelegate = delegates.ServicesDelegate(self)
        trainTypesDelegate = delegates.TrainTypesDelegate(self)
        self.setItemDelegateForColumn(1, servicesDelegate)
        self.setItemDelegateForColumn(2, trainTypesDelegate)

    trainSelected = QtCore.pyqtSignal(int)

    trainsUnselected = QtCore.pyqtSignal()