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

Method setRootIndex

YACReaderLibrary/library_window.cpp:2024–2039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2022}
2023
2024void LibraryWindow::setRootIndex()
2025{
2026 if (!libraries.isEmpty()) {
2027 QString path = LibraryPaths::libraryDataPath(libraries.getPath(selectedLibrary->currentText()));
2028 QDir d; // TODO change this by static methods (utils class?? with delTree for example)
2029 if (d.exists(path)) {
2030 navigationController->selectedFolder(QModelIndex());
2031 } else {
2032 contentViewsManager->comicsView->setModel(NULL);
2033 }
2034
2035 auto selectionModel = foldersView->selectionModel();
2036 if (selectionModel != nullptr)
2037 selectionModel->clear();
2038 }
2039}
2040
2041void LibraryWindow::toggleFullScreen()
2042{

Callers

nothing calls this directly

Calls 8

isEmptyMethod · 0.80
getPathMethod · 0.80
currentTextMethod · 0.80
selectedFolderMethod · 0.80
QModelIndexClass · 0.50
setModelMethod · 0.45
selectionModelMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected