Beispiel #1
0
 def flags(self, index):
     flags = QAbstractItemModel.flags(self, index)
     if index.isValid() and index.column() == 1:
         item = index.internalPointer()
         if item.get_writeable():
             flags |= Qt.ItemIsEditable
     return flags
Beispiel #2
0
 def flags(self, index):
     flags = QAbstractItemModel.flags(self, index)
     if index.isValid() and index.column() == 1:
         item = index.internalPointer()
         if item.get_writeable():
             flags |= Qt.ItemIsEditable
     return flags
Beispiel #3
0
 def flags(self, index):
     flags = QAbstractItemModel.flags(self, index)
     if index.isValid() and index.column() == 1:
         item = index.internalPointer()
         if self.isArgument(item) or self.isWriteable(item) or isinstance(item.data, Method):
             flags |= Qt.ItemIsEditable
     return flags
Beispiel #4
0
 def flags(self, index):
     ans = QAbstractItemModel.flags(self, index)
     ip = index.internalPointer()
     if getattr(ip, 'is_shortcut', False):
         ans |= Qt.ItemIsEditable
     return ans
Beispiel #5
0
 def flags(self, index):
     if index.column() == 0:
         return QAbstractItemModel.flags(self, index) | Qt.ItemIsUserCheckable
     return QAbstractItemModel.flags(self, index)
Beispiel #6
0
 def flags(self, index):
     if index.column() == 0:
         return QAbstractItemModel.flags(self,
                                         index) | Qt.ItemIsUserCheckable
     return QAbstractItemModel.flags(self, index)
Beispiel #7
0
 def flags(self, index):
     ans = QAbstractItemModel.flags(self, index)
     ip = index.internalPointer()
     if getattr(ip, 'is_shortcut', False):
         ans |= Qt.ItemIsEditable
     return ans