Ejemplo n.º 1
0
 def flags(self, index=None):
     flags = CTreeItem.flags(self)
     if not self.saved():
         if index and index.isValid() and self.canBeChecked(index.column()):
             flags |= QtCore.Qt.ItemIsUserCheckable
         if index and index.isValid() and self.editableExternalId(index.column()):
             flags |= QtCore.Qt.ItemIsEditable
     else:
         flags &= ~QtCore.Qt.ItemIsEnabled
     return flags
Ejemplo n.º 2
0
 def flags(self):
     flags = CTreeItem.flags(self)
     if self._deleted == 1:
         flags = flags & ~QtCore.Qt.ItemIsEnabled
     return flags