MCPcopy Create free account
hub / github.com/QuiteRSS/quiterss / showMenuAddButton

Method showMenuAddButton

src/customizetoolbardialog.cpp:359–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359void CustomizeToolbarDialog::showMenuAddButton()
360{
361 addButtonMenu_->clear();
362
363 QListIterator<QAction *> iter(mainApp->mainWindow()->actions());
364 while (iter.hasNext()) {
365 QAction *pAction = iter.next();
366 if ((pAction->objectName() == "restoreNewsAct") ||
367 pAction->objectName().contains("labelAction_")) continue;
368
369 if (!pAction->icon().isNull()) {
370 QList<QTreeWidgetItem *> treeItems = shortcutTree_->findItems(pAction->objectName(),
371 Qt::MatchFixedString,
372 1);
373 if (!treeItems.count()) {
374 QAction *action = addButtonMenu_->addAction(pAction->icon(), pAction->text());
375 action->setObjectName(pAction->objectName());
376
377 if (pAction->objectName() == "autoLoadImagesToggle") {
378 action->setIcon(QIcon(":/images/imagesOn"));
379 action->setText(tr("Load images"));
380 } else if ((pAction->objectName() == "feedsFilter") ||
381 (pAction->objectName() == "newsFilter")) {
382 action->setIcon(QIcon(":/images/filterOn"));
383 } else action->setIcon(pAction->icon());
384 }
385 }
386 }
387 addButtonMenu_->addSeparator();
388 QAction *action = addButtonMenu_->addAction(QIcon(":/images/images/noicon.png"),
389 tr("Separator"));
390 action->setObjectName("Separator");
391}
392
393void CustomizeToolbarDialog::addShortcut(QAction *action)
394{

Callers

nothing calls this directly

Calls 7

mainWindowMethod · 0.80
containsMethod · 0.80
isNullMethod · 0.80
addActionMethod · 0.80
setIconMethod · 0.80
clearMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected