void SheetTableView::updateCellSpan(CellAddress address) { int rows, cols; sheet->getSpans(address, rows, cols); if (rows != rowSpan(address.row(), address.col()) || cols != columnSpan(address.row(), address.col())) setSpan(address.row(), address.col(), rows, cols); }
void SheetView::setPosition(CellAddress address) { QModelIndex curr = ui->cells->currentIndex(); QModelIndex i = ui->cells->model()->index(address.row(), address.col()); if (i.isValid() && (curr.row() != address.row() || curr.column() != address.col())) { ui->cells->clearSelection(); ui->cells->setCurrentIndex(i); } }
void Sheet::setPosition(CellAddress address) { currRow.setValue(address.row()); currColumn.setValue(address.col()); currRow.purgeTouched(); currColumn.purgeTouched(); }
void SheetView::updateCell(const App::Property *prop) { try { CellAddress address; sheet->getCellAddress(prop, address); if (currentIndex().row() == address.row() && currentIndex().column() == address.col() ) updateContentLine(); } catch (...) { // Property is not a cell return; } }
void SheetModel::cellUpdated(CellAddress address) { QModelIndex i = index(address.row(), address.col()); dataChanged(i, i); }