Qwt User's Guide  5.2.3
Public Member Functions | Protected Member Functions
QwtArrowButton Class Reference

#include <qwt_arrow_button.h>

List of all members.

Public Member Functions

 QwtArrowButton (int num, Qt::ArrowType, QWidget *parent=NULL)
virtual ~QwtArrowButton ()
Qt::ArrowType arrowType () const
virtual QSize minimumSizeHint () const
int num () const
virtual QSize sizeHint () const

Protected Member Functions

virtual QSize arrowSize (Qt::ArrowType, const QSize &boundingSize) const
virtual void drawArrow (QPainter *, const QRect &, Qt::ArrowType) const
virtual void drawButtonLabel (QPainter *p)
virtual void keyPressEvent (QKeyEvent *)
virtual QRect labelRect () const
virtual void paintEvent (QPaintEvent *event)

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 ( int  num,
Qt::ArrowType  arrowType,
QWidget *  parent = NULL 
)
explicit
Parameters:
numNumber of arrows
arrowTypesee Qt::ArowType in the Qt docs.
parentParent widget

Member Function Documentation

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

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

Parameters:
arrowTypeArrow type
boundingSizeBounding size
Returns:
Size of the arrow
void QwtArrowButton::drawArrow ( QPainter *  painter,
const QRect &  r,
Qt::ArrowType  arrowType 
) const
protectedvirtual

Draw an arrow int a bounding rect

Parameters:
painterPainter
rRectangle where to paint the arrow
arrowTypeArrow type
void QwtArrowButton::drawButtonLabel ( QPainter *  painter)
protectedvirtual

Draw the button label.

Parameters:
painterPainter
See also:
The Qt Manual on QPushButton
QRect QwtArrowButton::labelRect ( ) const
protectedvirtual
Returns:
the bounding rect for the label
void QwtArrowButton::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint event handler

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