MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / createMenuActions

Method createMenuActions

launcher/ui/MainWindow.cpp:574–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572 }
573
574 void createMenuActions(MainWindow *MainWindow)
575 {
576 actionCloseWindow = TranslatedAction(MainWindow);
577 actionCloseWindow->setObjectName(QStringLiteral("actionCloseWindow"));
578 actionCloseWindow.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Close &Window"));
579 actionCloseWindow.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Close the current window"));
580 actionCloseWindow->setShortcut(QKeySequence::Close);
581 connect(actionCloseWindow, &QAction::triggered, APPLICATION, &Application::closeCurrentWindow);
582 all_actions.append(&actionCloseWindow);
583
584 actionOpenWiki = TranslatedAction(MainWindow);
585 actionOpenWiki->setObjectName(QStringLiteral("actionOpenWiki"));
586 actionOpenWiki.setTextId(QT_TRANSLATE_NOOP("MainWindow", "%1 &Help"));
587 actionOpenWiki.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 wiki"));
588 connect(actionOpenWiki, &QAction::triggered, MainWindow, &MainWindow::on_actionOpenWiki_triggered);
589 all_actions.append(&actionOpenWiki);
590
591 actionNewsMenuBar = TranslatedAction(MainWindow);
592 actionNewsMenuBar->setObjectName(QStringLiteral("actionNewsMenuBar"));
593 actionNewsMenuBar.setTextId(QT_TRANSLATE_NOOP("MainWindow", "%1 &News"));
594 actionNewsMenuBar.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 wiki"));
595 connect(actionNewsMenuBar, &QAction::triggered, MainWindow, &MainWindow::on_actionMoreNews_triggered);
596 all_actions.append(&actionNewsMenuBar);
597 }
598
599 // "Instance actions" are actions that require an instance to be selected (i.e. "new instance" is not here)
600 // Actions that also require other conditions (e.g. a running instance) won't be changed.

Callers

nothing calls this directly

Calls 3

setTextIdMethod · 0.80
setTooltipIdMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected