Qwt User's Guide  6.1.6
QwtArrowButton Class Reference

Arrow Button. More...

#include <qwt_arrow_button.h>

Inheritance diagram for QwtArrowButton:

Public Member Functions

 QwtArrowButton (int num, Qt::ArrowType, QWidget *parent=NULL)
 
virtual ~QwtArrowButton ()
 Destructor.
 
Qt::ArrowType arrowType () const
 The direction of the arrows.
 
int num () const
 The number of arrows.
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 Return a minimum size hint.
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)
 
virtual void drawButtonLabel (QPainter *)
 Draw the button label. More...
 
virtual void drawArrow (QPainter *, const QRect &, Qt::ArrowType) const
 
virtual QRect labelRect () const
 
virtual QSize arrowSize (Qt::ArrowType, const QSize &boundingSize) const
 
virtual void keyPressEvent (QKeyEvent *)
 autoRepeat for the space keys
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QwtArrowButton()

QwtArrowButton::QwtArrowButton ( int  num,
Qt::ArrowType  arrowType,
QWidget *  parent = NULL 
)
explicit
Parameters
numNumber of arrows
arrowTypesee Qt::ArrowType in the Qt docs.
parentParent widget

Member Function Documentation

◆ 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

Parameters
arrowTypeArrow type
boundingSizeBounding size
Returns
Size of the arrow

◆ drawArrow()

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

Draw an arrow int a bounding rectangle

Parameters
painterPainter
rRectangle where to paint the arrow
arrowTypeArrow type

◆ drawButtonLabel()

void QwtArrowButton::drawButtonLabel ( QPainter *  painter)
protectedvirtual

Draw the button label.

Parameters
painterPainter
See also
The Qt Manual for QPushButton

◆ labelRect()

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

◆ paintEvent()

void QwtArrowButton::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint event handler

Parameters
eventPaint event

◆ sizeHint()

QSize QwtArrowButton::sizeHint ( ) const
virtual
Returns
a size hint