| 580 | } |
| 581 | |
| 582 | void MatrixView::goToCell() { |
| 583 | bool ok; |
| 584 | |
| 585 | int col = QInputDialog::getInt(nullptr, i18n("Go to Cell"), i18n("Enter column"), 1, 1, m_matrix->columnCount(), 1, &ok); |
| 586 | if (!ok) |
| 587 | return; |
| 588 | |
| 589 | int row = QInputDialog::getInt(nullptr, i18n("Go to Cell"), i18n("Enter row"), 1, 1, m_matrix->rowCount(), 1, &ok); |
| 590 | if (!ok) |
| 591 | return; |
| 592 | |
| 593 | goToCell(row - 1, col - 1); |
| 594 | } |
| 595 | |
| 596 | void MatrixView::goToCell(int row, int col) { |
| 597 | const auto& index = m_model->index(row, col); |