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

Method showContinueReadingContextMenu

YACReaderLibrary/library_window.cpp:1603–1626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1601}
1602
1603void LibraryWindow::showContinueReadingContextMenu(QPoint point, ComicDB comic)
1604{
1605 QMenu menu;
1606
1607 auto setAsUnReadAction = new QAction();
1608 setAsUnReadAction->setText(tr("Set as unread"));
1609 setAsUnReadAction->setIcon(theme.comicsViewToolbar.setAsUnreadIcon);
1610
1611 menu.addAction(setAsUnReadAction);
1612
1613 connect(setAsUnReadAction, &QAction::triggered, this, [=]() {
1614 auto libraryId = libraries.getId(selectedLibrary->currentText());
1615 auto info = comic.info;
1616 info.setRead(false);
1617 info.currentPage = 1;
1618 info.hasBeenOpened = false;
1619 info.lastTimeOpened = QVariant();
1620 DBHelper::update(libraryId, info);
1621
1622 contentViewsManager->folderContentView->reloadContinueReadingModel();
1623 });
1624
1625 menu.exec(contentViewsManager->folderContentView->mapToGlobal(point));
1626}
1627
1628void LibraryWindow::setupAddToSubmenu(QMenu &menu)
1629{

Callers

nothing calls this directly

Calls 8

setIconMethod · 0.80
addActionMethod · 0.80
currentTextMethod · 0.80
execMethod · 0.80
setTextMethod · 0.45
getIdMethod · 0.45
setReadMethod · 0.45

Tested by

no test coverage detected