Exemplo n.º 1
0
 def data(self, index, role=QtCore.Qt.DisplayRole):
     if not index.isValid():
         return QtCore.QVariant()
     row = index.row()
     id = self._idList[row]
     if id == 0 and role == QtCore.Qt.DisplayRole:
         return QtCore.QVariant('-')
     else:
         return CTableModel.data(self, index, role)
Exemplo n.º 2
0
 def data(self, index, role=QtCore.Qt.DisplayRole):
     if not index.isValid():
         return QtCore.QVariant()
     if role == QtCore.Qt.BackgroundRole:
         column = index.column()
         row    = index.row()
         (col, values) = self.getRecordValues(column, row)
         return self.getBackGroundByMaintenancePeriod(values[1])
     else:
         return CTableModel.data(self, index, role)
     return QtCore.QVariant()