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

Method loadLabelInfo

YACReaderLibrary/yacreader_navigation_controller.cpp:142–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void YACReaderNavigationController::loadLabelInfo(const QModelIndex &modelIndex)
143{
144 qulonglong id = modelIndex.data(ReadingListModel::IDRole).toULongLong();
145 // check comics in label with id = id
146 libraryWindow->comicsModel->setupLabelModelData(id, libraryWindow->foldersModel->getDatabase());
147 contentViewsManager->comicsView->setModel(libraryWindow->comicsModel);
148
149 // configure views
150 if (libraryWindow->comicsModel->rowCount() > 0) {
151 // updateView
152 contentViewsManager->showComicsView();
153 libraryWindow->disableComicsActions(false);
154 } else {
155 // showEmptyFolder
156 // loadEmptyLabelInfo(); //there is no info in an empty label by now, TODO design something
157 contentViewsManager->emptyLabelWidget->setColor((YACReader::LabelColors)modelIndex.data(ReadingListModel::LabelColorRole).toInt());
158 contentViewsManager->showEmptyLabelView();
159 libraryWindow->disableComicsActions(true);
160 }
161}
162
163void YACReaderNavigationController::loadReadingListInfo(const QModelIndex &modelIndex)
164{

Callers

nothing calls this directly

Calls 9

setupLabelModelDataMethod · 0.80
getDatabaseMethod · 0.80
showComicsViewMethod · 0.80
showEmptyLabelViewMethod · 0.80
dataMethod · 0.45
setModelMethod · 0.45
rowCountMethod · 0.45
disableComicsActionsMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected