DtkWidget 5.6.0.2
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) | |
Construct a new DArrowButton with DArrowButton::ArrowDown direction 更多... | |
void | setArrowDirection (ArrowDirection direction) |
Set arrow direction of the button. 更多... | |
int | arrowDirection () const |
Get the arrow direction of the button. 更多... | |
int | buttonState () const |
Get the button state 更多... | |
Protected 成员函数 | |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | enterEvent (QEvent *) |
void | leaveEvent (QEvent *) |
可以使用 DArrowButton 类快速创建箭头形状的按钮.
\inmodule dtkwidget
DArrowButton allowed you create button with arrow icon conveniently.
DArrowButton 提供了快速的方式创建包含箭头标识的按钮,并允许通过 setArrowDirection() 设置箭头方向来直接改按钮的箭头图标的方向。 此外,还可以通过 arrowButtonDirection 和 arrowButtonState 属性获取和修改箭头按钮的状态。 You can use DArrowButton to create button with arrow icon, and it also allowed you update the arrow direction by calling setArrowDirection() . You can also update arrow state via arrowButtonDirection and arrowButtonState property.
|
explicit |
Construct a new DArrowButton with DArrowButton::ArrowDown direction
构造一个 DArrowButton 箭头按钮,默认箭头方向向下
parent 父控件指针.
int Dtk::Widget::DArrowButton::arrowDirection | ( | ) | const |
Get the arrow direction of the button.
获取箭头方向.
int Dtk::Widget::DArrowButton::buttonState | ( | ) | const |
Get the button state
获得按钮状态
void Dtk::Widget::DArrowButton::setArrowDirection | ( | ArrowDirection | direction | ) |
Set arrow direction of the button.
设置按钮的箭头方向.
direction 箭头的方向.