Refer to the color setting button in the office, which can display the color below the icon(参考office的颜色设置按钮,可以显示颜色在图标下方)
更多...
|
|
| SARibbonColorToolButton (QWidget *parent=nullptr) |
| |
|
| SARibbonColorToolButton (QAction *defaultAction, QWidget *parent=nullptr) |
| |
| QColor | color () const |
| | 获取按钮维护的颜色
|
| |
| void | setColorStyle (ColorStyle s) |
| | 设置颜色显示的样式
|
| |
| ColorStyle | colorStyle () const |
| | 颜色显示的样式
|
| |
| SAColorMenu * | setupStandardColorMenu () |
| | 建立标准的颜色菜单
|
| |
|
| SARibbonToolButton (QWidget *parent=nullptr) |
| |
|
| SARibbonToolButton (QAction *defaultAction, QWidget *parent=nullptr) |
| |
| RibbonButtonType | buttonType () const |
| | Gets the current button type (LargeButton or SmallButton) / 获取当前按钮的类型(大按钮或小按钮)
|
| |
| void | setButtonType (const RibbonButtonType &buttonType) |
| | Sets the button type to LargeButton or SmallButton / 设置按钮类型为大按钮或小按钮
|
| |
| bool | isSmallRibbonButton () const |
| | Checks if the button is a small ribbon button / 判断按钮是否为小Ribbon按钮
|
| |
| bool | isLargeRibbonButton () const |
| | Checks if the button is a large ribbon button / 判断按钮是否为大Ribbon按钮
|
| |
| int | spacing () const |
| | Gets the current spacing value / 获取当前的间距值
|
| |
| void | setSpacing (int v) |
| | Sets the spacing between elements and the border / 设置元素与边框之间的间距
|
| |
| void | updateRect () |
| | Forces an update of the internal layout rectangles / 强制更新内部布局矩形
|
| |
| void | setLayoutFactor (const LayoutFactor &fac) |
| | Sets the layout factor for fine-tuning the button's appearance / 设置布局系数以微调按钮外观
|
| |
| const LayoutFactor & | layoutFactor () const |
| | Gets a const reference to the current layout factor / 获取当前布局系数的常量引用
|
| |
| LayoutFactor & | layoutFactor () |
| | Gets a mutable reference to the current layout factor / 获取当前布局系数的可变引用
|
| |
| void | setEnableWordWrap (bool on) |
| | Enables or disables automatic text wrapping for large buttons / 为大按钮启用或禁用自动文字换行
|
| |
| bool | isEnableWordWrap () |
| | Checks if automatic text wrapping is enabled / 检查是否启用了自动文字换行
|
| |
| void | setButtonMaximumAspectRatio (qreal v=1.4) |
| | Sets the button's maximum aspect ratio (width/height) / 设置按钮的最大宽高比
|
| |
| qreal | buttonMaximumAspectRatio () const |
| | Gets the button's maximum aspect ratio (width/height) / 获取按钮的最大宽高比
|
| |
| void | invalidateSizeHint () |
| | Invalidates the cached size hint / 使缓存的size hint失效
|
| |
| virtual QSize | sizeHint () const Q_DECL_OVERRIDE |
| | Returns the recommended size for the button / 返回按钮的推荐尺寸
|
| |
| virtual QSize | minimumSizeHint () const Q_DECL_OVERRIDE |
| | Returns the recommended minimum size for the button / 返回按钮的推荐最小尺寸
|
| |
|
| void | paintIcon (QPainter &p, const QStyleOptionToolButton &opt, const QRect &iconDrawRect) |
| | 重写paintIcon函数,把颜色加到icon下面
|
| |
|
virtual void | paintEvent (QPaintEvent *e) Q_DECL_OVERRIDE |
| |
| virtual void | resizeEvent (QResizeEvent *e) Q_DECL_OVERRIDE |
| | 在resizeevent计算绘图所需的尺寸,避免在绘图过程中实时绘制提高效率
|
| |
| virtual void | mouseMoveEvent (QMouseEvent *e) Q_DECL_OVERRIDE |
| | 鼠标移动事件
|
| |
| virtual void | mousePressEvent (QMouseEvent *e) Q_DECL_OVERRIDE |
| | SARibbonToolButton::mousePressEvent
|
| |
|
virtual void | mouseReleaseEvent (QMouseEvent *e) Q_DECL_OVERRIDE |
| |
|
virtual void | focusOutEvent (QFocusEvent *e) Q_DECL_OVERRIDE |
| |
|
virtual void | leaveEvent (QEvent *e) Q_DECL_OVERRIDE |
| |
|
virtual bool | hitButton (const QPoint &pos) const Q_DECL_OVERRIDE |
| |
|
virtual bool | event (QEvent *e) Q_DECL_OVERRIDE |
| |
|
virtual void | changeEvent (QEvent *e) Q_DECL_OVERRIDE |
| |
|
virtual void | actionEvent (QActionEvent *e) Q_DECL_OVERRIDE |
| |
| virtual void | paintButton (QPainter &p, const QStyleOptionToolButton &opt) |
| | Paints the button's background and frame / 绘制按钮的背景和边框
|
| |
| virtual void | paintText (QPainter &p, const QStyleOptionToolButton &opt, const QRect &textDrawRect) |
| | Paints the button's text / 绘制按钮的文字
|
| |
| virtual void | paintIndicator (QPainter &p, const QStyleOptionToolButton &opt, const QRect &indicatorDrawRect) |
| | Paints the button's indicator (e.g., dropdown arrow) / 绘制按钮的指示器(例如下拉箭头)
|
| |
Refer to the color setting button in the office, which can display the color below the icon(参考office的颜色设置按钮,可以显示颜色在图标下方)