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

Method lastSelectedRow

src/frontend/spreadsheet/SpreadsheetView.cpp:1322–1333  ·  view source on GitHub ↗

! Return the index of the last selected row. If \param full is \c true, this function only looks for fully selected rows. */

Source from the content-addressed store, hash-verified

1320 If \param full is \c true, this function only looks for fully selected rows.
1321 */
1322int SpreadsheetView::lastSelectedRow(bool full) const {
1323 QModelIndexList indexes;
1324 if (!full)
1325 indexes = m_tableView->selectionModel()->selectedIndexes();
1326 else
1327 indexes = m_tableView->selectionModel()->selectedRows();
1328
1329 if (!indexes.empty())
1330 return indexes.last().row();
1331 else
1332 return -2;
1333}
1334
1335/*!
1336 Return whether a cell is selected

Callers

nothing calls this directly

Calls 4

selectionModelMethod · 0.80
selectedRowsMethod · 0.80
emptyMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected