mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Add the possibility to show a recently added/updated indicator
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
|
||||
using namespace YACReader;
|
||||
|
||||
FolderContentView::FolderContentView(QWidget *parent)
|
||||
FolderContentView::FolderContentView(QAction *toogleRecentVisibilityAction, QWidget *parent)
|
||||
: QWidget { parent }, parent(QModelIndex()), comicModel(new ComicModel()), folderModel(new FolderModel())
|
||||
{
|
||||
qmlRegisterType<FolderModel>("com.yacreader.FolderModel", 1, 0, "FolderModel");
|
||||
@ -60,6 +60,8 @@ FolderContentView::FolderContentView(QWidget *parent)
|
||||
|
||||
toolbar = new QToolBar();
|
||||
toolbar->addWidget(new YACReaderToolBarStretch);
|
||||
toolbar->addAction(toogleRecentVisibilityAction);
|
||||
toolbar->addSeparator();
|
||||
toolbar->addWidget(coverSizeSliderWidget);
|
||||
|
||||
auto l = new QVBoxLayout;
|
||||
@ -205,6 +207,11 @@ void FolderContentView::reloadContinueReadingModel()
|
||||
}
|
||||
}
|
||||
|
||||
void FolderContentView::setShowRecent(bool visible)
|
||||
{
|
||||
folderModel->setShowRecent(visible);
|
||||
}
|
||||
|
||||
void FolderContentView::openFolder(int index)
|
||||
{
|
||||
emit subfolderSelected(this->parent, index);
|
||||
|
Reference in New Issue
Block a user