! Return the index of the last selected row. If \param full is \c true, this function only looks for fully selected rows. */
| 1320 | If \param full is \c true, this function only looks for fully selected rows. |
| 1321 | */ |
| 1322 | int 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 |
nothing calls this directly
no test coverage detected