MCPcopy Create free account
hub / github.com/KDE/labplot / getCurrentCell

Method getCurrentCell

src/frontend/matrix/MatrixView.cpp:513–522  ·  view source on GitHub ↗

! Determine the current cell (-1 if no cell is designated as the current) */

Source from the content-addressed store, hash-verified

511 Determine the current cell (-1 if no cell is designated as the current)
512*/
513void MatrixView::getCurrentCell(int* row, int* col) const {
514 const auto& index = m_tableView->selectionModel()->currentIndex();
515 if (index.isValid()) {
516 *row = index.row();
517 *col = index.column();
518 } else {
519 *row = -1;
520 *col = -1;
521 }
522}
523
524bool MatrixView::eventFilter(QObject* watched, QEvent* event) {
525 if (event->type() == QEvent::ContextMenu) {

Callers

nothing calls this directly

Calls 5

selectionModelMethod · 0.80
currentIndexMethod · 0.45
isValidMethod · 0.45
rowMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected