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

Method setupAddToSubmenu

YACReaderLibrary/library_window.cpp:1628–1647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1626}
1627
1628void LibraryWindow::setupAddToSubmenu(QMenu &menu)
1629{
1630 menu.addAction(actions.addToFavoritesAction);
1631 actions.addToMenuAction->setMenu(&menu);
1632
1633 const QList<LabelItem *> labels = listsModel->getLabels();
1634 if (labels.count() > 0)
1635 menu.addSeparator();
1636 for (auto *label : labels) {
1637 auto action = new QAction(this);
1638 action->setIcon(label->getIcon());
1639 action->setText(label->name());
1640
1641 action->setData(label->getId());
1642
1643 menu.addAction(action);
1644
1645 connect(action, &QAction::triggered, this, &LibraryWindow::onAddComicsToLabel);
1646 }
1647}
1648
1649void LibraryWindow::onAddComicsToLabel()
1650{

Callers

nothing calls this directly

Calls 8

addActionMethod · 0.80
setIconMethod · 0.80
getLabelsMethod · 0.45
getIconMethod · 0.45
setTextMethod · 0.45
nameMethod · 0.45
setDataMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected