added support for loading the content of a realing list

This commit is contained in:
Luis Ángel San Martín
2014-11-27 14:38:50 +01:00
parent 6b12e7ecbf
commit b80c72f70d
3 changed files with 40 additions and 2 deletions

View File

@ -166,8 +166,22 @@ void YACReaderNavigationController::loadLabelInfo(const QModelIndex &modelIndex)
void YACReaderNavigationController::loadReadingListInfo(const QModelIndex &modelIndex)
{
libraryWindow->showEmptyReadingListWidget();
libraryWindow->disableComicsActions(true);
qulonglong id = modelIndex.data(ReadingListModel::IDRole).toULongLong();
//check comics in label with id = id
libraryWindow->comicsModel->setupReadingListModelData(id,libraryWindow->foldersModel->getDatabase());
libraryWindow->comicsView->setModel(libraryWindow->comicsModel);
//configure views
if(libraryWindow->comicsModel->rowCount() > 0)
{
//updateView
libraryWindow->showComicsView();
libraryWindow->disableComicsActions(false);
}
else{
libraryWindow->showEmptyReadingListWidget();
libraryWindow->disableComicsActions(true);
}
}
void YACReaderNavigationController::selectedList(const QModelIndex &mi)