SARibbon 2.5.1
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonQuickAccessBar类 参考

Ribbon quick access toolbar in the top left corner/ribbon左上顶部的快速响应栏 更多...

#include <SARibbonQuickAccessBar.h>

类 SARibbonQuickAccessBar 继承关系图:
SARibbonButtonGroupWidget

Public 成员函数

 SARibbonQuickAccessBar (QWidget *parent=nullptr)
 
- Public 成员函数 继承自 SARibbonButtonGroupWidget
 SARibbonButtonGroupWidget (QWidget *parent=nullptr)
 
void addMenuAction (QAction *menuAction, QToolButton::ToolButtonPopupMode popupMode=QToolButton::InstantPopup)
 Add a menu QAction to the button group widget/在按钮栏中添加一个带菜单的 QAction
 
QAction * addMenuAction (QMenu *menu, QToolButton::ToolButtonPopupMode popupMode=QToolButton::InstantPopup)
 Create and add a menu action to the button group widget (text only version)/在按钮栏中创建并添加一个带菜单的动作(仅文本版本)
 

详细描述

Ribbon quick access toolbar in the top left corner/ribbon左上顶部的快速响应栏

The SARibbonQuickAccessBar class provides a specialized toolbar that is typically placedin the top-left corner of the ribbon interface. It contains frequently used commands that users can access quickly without navigating through ribbon tabs.

This toolbar supports adding regular actions as well as menu actions with different popup modes. The menu actions can be configured with various popup behaviors such as InstantPopup, MenuButtonPopup, or DelayedPopup.

此类提供了一个专门的工具栏,通常放置在ribbon界面的左上角。它包含常用的命令用户可以快速访问这些命令,而无需浏览ribbon选项卡。

此工具栏支持添加常规动作以及具有不同弹出模式的菜单动作。菜单动作可以配置各种弹出行为,如InstantPopup、MenuButtonPopup或DelayedPopup。

Features:/特点:
  • Quick access to frequently used commands/快速访问常用命令
  • Support for menu actions with customizable popup modes/支持具有可自定义弹出模式的菜单动作
  • Easy integration with ribbon interface/与ribbon界面轻松集成
  • Automatic management of action lifecycles/自动管理动作生命周期
Usage:/用法:
// Create quick access bar/创建快速访问栏
SARibbonQuickAccessBar *quickAccessBar = ribbonBar()->quickAccessBar();
// Add regular actions/添加常规动作
quickAccessBar->addAction(saveAction);
quickAccessBar->addAction(undoAction);
// Add menu actions/添加菜单动作
QMenu *fileMenu = new QMenu("File");
fileMenu->addAction(newAction);
fileMenu->addAction(openAction);
quickAccessBar->addMenuAction(fileMenu, QToolButton::InstantPopup);
void addMenuAction(QAction *menuAction, QToolButton::ToolButtonPopupMode popupMode=QToolButton::InstantPopup)
Add a menu QAction to the button group widget/在按钮栏中添加一个带菜单的 QAction
Definition SARibbonButtonGroupWidget.cpp:64
Ribbon quick access toolbar in the top left corner/ribbon左上顶部的快速响应栏
Definition SARibbonQuickAccessBar.h:46
注解
This class inherits from QToolBar, so all standard QToolBar features are available/此类继承自QToolBar,因此所有标准QToolBar功能都可用
Menu actions are automatically configured with appropriate tool button popup modes/菜单动作会自动配置适当的工具按钮弹出模式
参见
SARibbonBar

该类的文档由以下文件生成: