* \if ENGLISH * @brief Create window button group bar * @details Add custom tool buttons next to system window buttons (minimize, maximize, close). * This allows you to add custom buttons to the title bar area. * \endif * * \if CHINESE * @brief 创建窗口按钮组栏 * @details 在系统窗口按钮(最小化、最大化、关闭)旁边添加自定义工具按钮。 * 这允许您在标题栏区域添加自定义按钮。 * \endif */
| 2867 | * \endif |
| 2868 | */ |
| 2869 | void MainWindow::createWindowButtonGroupBar() |
| 2870 | { |
| 2871 | SARibbonSystemButtonBar* windowButtonBar = this->windowButtonBar(); |
| 2872 | if (!windowButtonBar) { |
| 2873 | return; |
| 2874 | } |
| 2875 | QAction* actionLogin = new QAction(QIcon(), tr("Login"), this); |
| 2876 | QAction* actionHelp = createAction(tr("help"), ":/icon/icon/help.svg"); |
| 2877 | connect(actionLogin, &QAction::triggered, this, &MainWindow::onLoginActionTriggered); |
| 2878 | connect(actionHelp, &QAction::triggered, this, &MainWindow::onActionHelpTriggered); |
| 2879 | windowButtonBar->addAction(actionLogin); |
| 2880 | windowButtonBar->addAction(actionHelp); |
| 2881 | } |
| 2882 | |
| 2883 | /** |
| 2884 | * \if ENGLISH |
nothing calls this directly
no test coverage detected