|
DtkWidget
DTK Widget module
|
可以使用 DArrowButton 类快速创建箭头形状的按钮。 更多...
Public 类型 | |
| enum | ArrowDirection { ArrowUp , ArrowDown , ArrowLeft , ArrowRight } |
| 表示箭头图标的方向 更多... | |
| enum | ArrowButtonState { ArrowStateNormal , ArrowStateHover , ArrowStatePress } |
| 表示箭头图标的方向 更多... | |
信号 | |
| void | mousePress () |
| void | mouseRelease () |
| void | mouseEnter () |
| void | mouseLeave () |
Public 成员函数 | |
| DArrowButton (QWidget *parent=0) | |
| 构造一个 DArrowButton 箭头按钮,默认箭头方向向下 | |
| void | setArrowDirection (ArrowDirection direction) |
| 设置按钮的箭头方向. | |
| int | arrowDirection () const |
| 获取箭头方向. | |
| int | buttonState () const |
| 获得按钮状态 | |
Protected 成员函数 | |
| void | mousePressEvent (QMouseEvent *event) |
| void | mouseReleaseEvent (QMouseEvent *event) |
| void | enterEvent (QEvent *) |
| void | leaveEvent (QEvent *) |
可以使用 DArrowButton 类快速创建箭头形状的按钮。
DArrowButton 提供了快速的方式创建包含箭头标识的按钮,并允许通过 setArrowDirection() 设置箭头方向来直接改按钮的箭头图标的方向。 此外,还可以通过 arrowButtonDirection 和 arrowButtonState 属性获取和修改箭头按钮的状态。
|
explicit |
构造一个 DArrowButton 箭头按钮,默认箭头方向向下
| parent | 父控件指针. |
| int DArrowButton::arrowDirection | ( | ) | const |
获取箭头方向.
| int DArrowButton::buttonState | ( | ) | const |
获得按钮状态
| void DArrowButton::setArrowDirection | ( | ArrowDirection | direction | ) |