* \if ENGLISH * @brief Create right button group * @details RightButtonGroup is a toolbar on the right side of the ribbonbar where you can place some shortcut icons. * This is useful for placing help buttons, settings, and other frequently accessed commands. * \endif * * \if CHINESE * @brief 创建右侧按钮组 * @details RightButtonGroup是在Ribbon栏右边的工具栏,可以放置一些快捷图标。 * 这对于放置帮
| 2837 | * \endif |
| 2838 | */ |
| 2839 | void MainWindow::createRightButtonGroup() |
| 2840 | { |
| 2841 | SARibbonBar* currentRibbonBar = ribbonBar(); |
| 2842 | if (!currentRibbonBar) { |
| 2843 | return; |
| 2844 | } |
| 2845 | SARibbonButtonGroupWidget* rightBar = currentRibbonBar->rightButtonGroup(); |
| 2846 | QAction* actionHelp = createAction(tr("help"), ":/icon/icon/help.svg"); |
| 2847 | mActionVisibleAll = createAction(tr("Visible"), ":/icon/icon/visible-true.svg"); |
| 2848 | mActionVisibleAll->setCheckable(true); |
| 2849 | mActionVisibleAll->setChecked(true); |
| 2850 | connect(actionHelp, &QAction::triggered, this, &MainWindow::onActionHelpTriggered); |
| 2851 | connect(mActionVisibleAll, &QAction::triggered, this, &MainWindow::onActionVisibleAllTriggered); |
| 2852 | rightBar->addAction(actionHelp); |
| 2853 | rightBar->addAction(mActionVisibleAll); |
| 2854 | } |
| 2855 | |
| 2856 | /** |
| 2857 | * \if ENGLISH |
nothing calls this directly
no test coverage detected