MCPcopy Create free account
hub / github.com/YACReader/yacreader / getSelectedComics

Method getSelectedComics

YACReaderLibrary/library_window.cpp:2475–2488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2473}
2474
2475QModelIndexList LibraryWindow::getSelectedComics()
2476{
2477 // se fuerza a que haya almenos una fila seleccionada TODO comprobar se se puede forzar a la tabla a que lo haga automáticamente
2478 // avoid selection.count()==0 forcing selection in comicsView
2479 QModelIndexList selection = contentViewsManager->comicsView->selectionModel()->selectedRows();
2480 QLOG_TRACE() << "selection count " << selection.length();
2481 std::sort(selection.begin(), selection.end(), lessThanModelIndexRow);
2482
2483 if (selection.count() == 0) {
2484 contentViewsManager->comicsView->selectIndex(0);
2485 selection = contentViewsManager->comicsView->selectionModel()->selectedRows();
2486 }
2487 return selection;
2488}
2489
2490void LibraryWindow::deleteMetadataFromSelectedComics()
2491{

Callers 1

showComicsContextMenuMethod · 0.95

Calls 3

selectedRowsMethod · 0.80
selectionModelMethod · 0.45
selectIndexMethod · 0.45

Tested by

no test coverage detected