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

Method selectedList

YACReaderLibrary/yacreader_navigation_controller.cpp:181–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void YACReaderNavigationController::selectedList(const QModelIndex &mi)
182{
183 // A proxy is used
184 QModelIndex modelIndex = libraryWindow->listsModelProxy->mapToSource(mi);
185
186 // update history
187 libraryWindow->historyController->updateHistory(YACReaderLibrarySourceContainer(modelIndex, YACReaderLibrarySourceContainer::List));
188
189 // when a list is selected the search mode has to be reset
190 if (libraryWindow->exitSearchMode()) {
191
192 libraryWindow->listsView->scrollTo(mi, QAbstractItemView::PositionAtTop);
193 libraryWindow->listsView->setCurrentIndex(mi);
194 }
195
196 loadListInfo(modelIndex);
197
198 libraryWindow->setToolbarTitle(modelIndex);
199}
200
201void YACReaderNavigationController::reselectCurrentList()
202{

Callers

nothing calls this directly

Calls 6

updateHistoryMethod · 0.80
exitSearchModeMethod · 0.80
setToolbarTitleMethod · 0.80
scrollToMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected