Saves the input from the editor widget to the model component.
        :qtdoc:`Re-implemented<QStyledItemDelegate.setModelData>`

def setModelData(self, editor, model, index):
        """Saves the input from the editor widget to the model component.
        :qtdoc:`Re-implemented<QStyledItemDelegate.setModelData>`"""
        editor.saveToObject()
        # need to save over component object in stimulus model
        model.dataEdited()

        # clean up
        editor.attributesSaved.disconnect()
        if hasattr(editor, 'vocalFilesChanged'):
            editor.vocalFilesChanged.disconnect()
        editor.close()