QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtArrowButton类 参考

Arrow Button 更多...

#include <qwt_arrow_button.h>

类 QwtArrowButton 继承关系图:

class  PrivateData
 

Public 成员函数

 QwtArrowButton (int num, Qt::ArrowType, QWidget *parent=nullptr)
 Constructor
 
Qt::ArrowType arrowType () const
 Get the direction of the arrows
 
int num () const
 Get the number of arrows
 
virtual QSize sizeHint () const override
 Get a size hint for the button
 
virtual QSize minimumSizeHint () const override
 Get a minimum size hint for the button
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *) override
 Paint event handler
 
virtual void keyPressEvent (QKeyEvent *) override
 autoRepeat for the space keys
 
virtual void drawButtonLabel (QPainter *)
 Draw the button label
 
virtual void drawArrow (QPainter *, const QRect &, Qt::ArrowType) const
 Draw an arrow int a bounding rectangle
 
virtual QRect labelRect () const
 
virtual QSize arrowSize (Qt::ArrowType, const QSize &boundingSize) const
 Calculate the size for a arrow that fits into a rectangle of a given size
 

详细描述

Arrow Button

A push button with one or more filled triangles on its front. An Arrow button can have 1 to 3 arrows in a row, pointing up, down, left or right.

构造及析构函数说明

◆ QwtArrowButton()

QwtArrowButton::QwtArrowButton ( int  num,
Qt::ArrowType  arrowType,
QWidget *  parent = nullptr 
)
explicit

Constructor

参数
[in]numNumber of arrows (1-3)
[in]arrowTypeDirection of arrows (see Qt::ArrowType)
[in]parentParent widget

Destructor

成员函数说明

◆ arrowSize()

QSize QwtArrowButton::arrowSize ( Qt::ArrowType  arrowType,
const QSize &  boundingSize 
) const
protectedvirtual

Calculate the size for a arrow that fits into a rectangle of a given size

参数
arrowTypeArrow type
boundingSizeBounding size
返回
Size of the arrow

◆ arrowType()

Qt::ArrowType QwtArrowButton::arrowType ( ) const

Get the direction of the arrows

返回
Arrow direction

◆ drawArrow()

void QwtArrowButton::drawArrow ( QPainter *  painter,
const QRect &  r,
Qt::ArrowType  arrowType 
) const
protectedvirtual

Draw an arrow int a bounding rectangle

参数
painterPainter
rRectangle where to paint the arrow
arrowTypeArrow type

◆ drawButtonLabel()

void QwtArrowButton::drawButtonLabel ( QPainter *  painter)
protectedvirtual

Draw the button label

参数
painterPainter
参见
The Qt Manual for QPushButton

◆ labelRect()

QRect QwtArrowButton::labelRect ( ) const
protectedvirtual
返回
the bounding rectangle for the label

◆ minimumSizeHint()

QSize QwtArrowButton::minimumSizeHint ( ) const
overridevirtual

Get a minimum size hint for the button

返回
Minimum size hint

◆ num()

int QwtArrowButton::num ( ) const

Get the number of arrows

返回
Number of arrows

◆ paintEvent()

void QwtArrowButton::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Paint event handler

参数
eventPaint event

◆ sizeHint()

QSize QwtArrowButton::sizeHint ( ) const
overridevirtual

Get a size hint for the button

返回
Size hint

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