Esempio n. 1
0
 def createEditor(self, parent, option, index):
     if index.column() == 0:
         if self.completion_data:
             from calibre.gui2.complete2 import EditWithComplete
             editor = EditWithComplete(parent)
             editor.set_separator(None)
             editor.update_items_cache(self.completion_data)
         else:
             from calibre.gui2.widgets import EnLineEdit
             editor = EnLineEdit(parent)
         return editor
     return QItemDelegate.createEditor(self, parent, option, index)
Esempio n. 2
0
 def destroyEditor(self, editor, index):
     self.editing_finished.emit(index.row())
     QItemDelegate.destroyEditor(self, editor, index)
Esempio n. 3
0
 def __init__(self, table):
     QItemDelegate.__init__(self)
     self.table = table
     self.completion_data = None
Esempio n. 4
0
 def __init__(self, completion_data):
     QItemDelegate.__init__(self)
     self.completion_data = completion_data