def setData(self, data): # Data is raw rows, cols of values. for iRow, row in enumerate(data): for iCol, col in enumerate(row): cell, r, c = self._findCellForElement(iRow, iCol) element = cell.getElementAt(r, c) element.setValue(col) self.fix()
def _updateFromElement(self, element): elRow = element._offsetRow+element.row elCol = element._offsetCol+element.col cell, eRow, eCol = self._findCellForElement(elRow, elCol) el = cell.getElementAt(eRow, eCol) el.update(element)
def _findElement(self, elRow, elCol): cell, row, col = self._findCellForElement(elRow, elCol) return cell.getElementAt(row, col)