# Path: Qt.py



from Qt import QtWidgets, Qt

    def setModelData(self, editor, model, index):
        """Sets the values from the combo box to the model after editing"""
        code = editor.currentText()
        model.setData(index, code, Qt.EditRole)

    def updateEditorGeometry(self, editor, option, index):
        """Sets the editor geometry."""
        editor.setGeometry(option.rect)


class PropertyValuesDelegate(QtWidgets.QStyledItemDelegate):
    """PropertyValuesDelegate is a delegate that provides different editing
    delegates for property values depending on the property propType."""

    def createEditor(self, parent, option, index):
        """Creates the editor, i.e. a combo box for selecting an end
        direction."""
        prop = index.model().trackItems[0].properties[index.row()]
        if prop.propType == "enum":
            comboBox = QtWidgets.QComboBox(parent)
            comboBox.insertItems(0, prop.enumNames)
            return comboBox
        else:
            return super().createEditor(parent, option, index)

    def setEditorData(self, editor, index):
        """Sets the values from the model in the combo box"""
        prop = index.model().trackItems[0].properties[index.row()]
        if prop.propType == "enum":

# Path: Qt.py



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


    def setModelData(self, editor, model, index):
        """Sets the values from the combo box to the model after editing"""
        code = editor.currentText()
        model.setData(index, code, Qt.EditRole)

    def updateEditorGeometry(self, editor, option, index):
        """Sets the editor geometry."""
        editor.setGeometry(option.rect)


class PropertyValuesDelegate(QtWidgets.QStyledItemDelegate):
    """PropertyValuesDelegate is a delegate that provides different editing
    delegates for property values depending on the property propType."""

    def createEditor(self, parent, option, index):
        """Creates the editor, i.e. a combo box for selecting an end
        direction."""
        prop = index.model().trackItems[0].properties[index.row()]
        if prop.propType == "enum":
            comboBox = QtWidgets.QComboBox(parent)
            comboBox.insertItems(0, prop.enumNames)
            return comboBox
        else:
            return super().createEditor(parent, option, index)

    def setEditorData(self, editor, index):
        """Sets the values from the model in the combo box"""
        prop = index.model().trackItems[0].properties[index.row()]
        if prop.propType == "enum":

            endDirName = index.data(Qt.EditRole)