QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
QwtArrowButton Class Reference

Arrow Button. More...

#include <qwt_arrow_button.h>

Inheritance diagram for QwtArrowButton:

Classes

class  PrivateData
 

Public Member Functions

 QwtArrowButton (int num, Qt::ArrowType, QWidget *parent=nullptr)
 Constructor.
 
virtual ~QwtArrowButton ()
 Destructor .
 
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 Member Functions

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.
 

Detailed Description

Arrow Button.

Constructor & Destructor Documentation

◆ QwtArrowButton()

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

Constructor.

◆ ~QwtArrowButton()

QwtArrowButton::~QwtArrowButton ( )
virtual

Destructor .

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

◆ arrowType()

Qt::ArrowType QwtArrowButton::arrowType ( ) const

Get the direction of the arrows.

Returns
Arrow direction

◆ 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

◆ minimumSizeHint()

QSize QwtArrowButton::minimumSizeHint ( ) const
overridevirtual

Get a minimum size hint for the button.

Returns
Minimum size hint

◆ num()

int QwtArrowButton::num ( ) const

Get the number of arrows.

Returns
Number of arrows

◆ paintEvent()

void QwtArrowButton::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Paint event handler.

Parameters
eventPaint event

◆ sizeHint()

QSize QwtArrowButton::sizeHint ( ) const
overridevirtual

Get a size hint for the button.

Returns
Size hint

The documentation for this class was generated from the following files: