added support for removing elements from a list

This commit is contained in:
Luis Ángel San Martín
2014-11-30 16:30:01 +01:00
parent 53eaf14d64
commit c232f239d1
8 changed files with 204 additions and 24 deletions

View File

@ -209,6 +209,17 @@ void YACReaderNavigationController::reselectCurrentList()
selectedList(libraryWindow->listsView->currentIndex());
}
void YACReaderNavigationController::reselectCurrentSource()
{
if(!libraryWindow->listsView->selectionModel()->selectedRows().isEmpty())
{
reselectCurrentList();
}else
{
reselectCurrentFolder();
}
}
void YACReaderNavigationController::selectedIndexFromHistory(const YACReaderLibrarySourceContainer &sourceContainer)
{
//TODO NO searching allowed, just disable backward/forward actions in searching mode
@ -273,7 +284,7 @@ void YACReaderNavigationController::setupConnections()
connect(libraryWindow->listsView,SIGNAL(clicked(QModelIndex)),this,SLOT(selectedList(QModelIndex)));
connect(libraryWindow->historyController,SIGNAL(modelIndexSelected(YACReaderLibrarySourceContainer)),this,SLOT(selectedIndexFromHistory(YACReaderLibrarySourceContainer)));
connect(libraryWindow->emptyFolderWidget,SIGNAL(subfolderSelected(QModelIndex,int)),this,SLOT(selectSubfolder(QModelIndex,int)));
connect(libraryWindow->comicsModel,SIGNAL(isEmpty()),this,SLOT(reselectCurrentFolder()));
connect(libraryWindow->comicsModel,SIGNAL(isEmpty()),this,SLOT(reselectCurrentSource()));
}
qulonglong YACReaderNavigationController::folderModelIndexToID(const QModelIndex &mi)