Esempio n. 1
0
 def createEditor(self, parent, option, index):
     item = self.table.item(index.row(), 0)
     if index.column() == 0:
         item = self.table.item(index.row(), 0)
         if item.is_deleted:
             return None
         return QItemDelegate.createEditor(self, parent, option, index)
 def createEditor(self, parent, option, index):
     item = self.table.item(index.row(), 0)
     if index.column() == 0:
         item = self.table.item(index.row(), 0)
         if item.is_deleted:
             return None
         return QItemDelegate.createEditor(self, parent, option, index)
Esempio n. 3
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. 4
0
 def createEditor(self, parent, option, index):
     item = self.table.item(index.row(), 0)
     if index.column() == 0:
         item = self.table.item(index.row(), 0)
         if item.is_deleted:
             return None
         return QItemDelegate.createEditor(self, parent, option, index)
     if not confirm(_('Do you want to undo your changes?'),
                    'tag_list_editor_undo'):
         return
     item.setText(item.initial_text())
     self.table.blockSignals(True)
     self.table.item(index.row(), 2).setData(Qt.DisplayRole, '')
     self.table.blockSignals(False)
Esempio n. 5
0
 def createEditor(self, parent, option, index):
     item = self.table.item(index.row(), 0)
     if index.column() == 0:
         item = self.table.item(index.row(), 0)
         if item.is_deleted:
             return None
         return QItemDelegate.createEditor(self, parent, option, index)
     if not confirm(
             _('Do you want to undo your changes?'),
              'tag_list_editor_undo'):
             return
     item.setText(item.initial_text())
     self.table.blockSignals(True)
     self.table.item(index.row(), 2).setData(Qt.DisplayRole, '')
     self.table.blockSignals(False)
Esempio n. 6
0
 def destroyEditor(self, editor, index):
     self.editing_finished.emit(index.row())
     QItemDelegate.destroyEditor(self, editor, index)
Esempio n. 7
0
 def __init__(self, table):
     QItemDelegate.__init__(self)
     self.table = table
     self.completion_data = None
Esempio n. 8
0
 def __init__(self, table):
     QItemDelegate.__init__(self)
     self.table = table
Esempio n. 9
0
 def __init__(self, table):
     QItemDelegate.__init__(self)
     self.table = table
Esempio n. 10
0
 def __init__(self, completion_data):
     QItemDelegate.__init__(self)
     self.completion_data = completion_data