Exemplo n.º 1
0
 def flags(self, index):
     column = index.column()
     flags = CTreeModel.flags(self, index)
     item = index.internalPointer()
     if self._editable and (column == TreeColumns.EXTERNAL_ID
                            or column == TreeColumns.TISSUE_TYPE
                            and isinstance(item, CJobTicketTreeActionItem)):
         return flags | QtCore.Qt.ItemIsEditable
     else:
         return flags
Exemplo n.º 2
0
 def flags(self, index):
     flags = CTreeModel.flags(self, index)
     item = index.internalPointer()
     if not item.bookkeeperCode():
         flags = flags & ~QtCore.Qt.ItemIsEnabled
     return flags