DtkWidget 5.6.0.2
DTK Widget module
Public 类型 | 信号 | Public 成员函数 | Protected 成员函数 | 所有成员列表
Dtk::Widget::DArrowButton类 参考

可以使用 DArrowButton 类快速创建箭头形状的按钮. 更多...

类 Dtk::Widget::DArrowButton 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DArrowButton 的协作图:
Collaboration graph
[图例]

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.

参见
QLabel

构造及析构函数说明

◆ DArrowButton()

Dtk::Widget::DArrowButton::DArrowButton ( QWidget *  parent = 0)
explicit

Construct a new DArrowButton with DArrowButton::ArrowDown direction

构造一个 DArrowButton 箭头按钮,默认箭头方向向下

parent 父控件指针.

成员函数说明

◆ arrowDirection()

int Dtk::Widget::DArrowButton::arrowDirection ( ) const

Get the arrow direction of the button.

获取箭头方向.

返回
返回箭头方向.

◆ buttonState()

int Dtk::Widget::DArrowButton::buttonState ( ) const

Get the button state

获得按钮状态

返回
返回按钮的状态.

◆ setArrowDirection()

void Dtk::Widget::DArrowButton::setArrowDirection ( ArrowDirection  direction)

Set arrow direction of the button.

设置按钮的箭头方向.

direction 箭头的方向.

参见
DArrowButton::ArrowDirection DArrowButton::arrowDirection()

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