Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtArrowButton Class Reference

Arrow Button. More...

#include <qwt_arrow_button.h>

Inheritance diagram for QwtArrowButton:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Member Functions

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

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 *)
 Draw the button label. More...
 
virtual void keyPressEvent (QKeyEvent *) QWT_OVERRIDE
 autoRepeat for the space keys More...
 
virtual QRect labelRect () const
 
virtual void paintEvent (QPaintEvent *) QWT_OVERRIDE
 

Private Attributes

PrivateDatam_data
 

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.

Definition at line 23 of file qwt_arrow_button.h.

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

Definition at line 55 of file qwt_arrow_button.cpp.

◆ ~QwtArrowButton()

QwtArrowButton::~QwtArrowButton ( )
virtual

Destructor.

Definition at line 79 of file qwt_arrow_button.cpp.

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

Definition at line 296 of file qwt_arrow_button.cpp.

◆ arrowType()

Qt::ArrowType QwtArrowButton::arrowType ( ) const

The direction of the arrows.

Definition at line 88 of file qwt_arrow_button.cpp.

◆ 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

Definition at line 215 of file qwt_arrow_button.cpp.

◆ drawButtonLabel()

void QwtArrowButton::drawButtonLabel ( QPainter *  painter)
protectedvirtual

Draw the button label.

Parameters
painterPainter
See also
The Qt Manual for QPushButton

Definition at line 143 of file qwt_arrow_button.cpp.

◆ keyPressEvent()

void QwtArrowButton::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

autoRepeat for the space keys

Definition at line 326 of file qwt_arrow_button.cpp.

◆ labelRect()

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

Definition at line 104 of file qwt_arrow_button.cpp.

◆ minimumSizeHint()

QSize QwtArrowButton::minimumSizeHint ( ) const
virtual

Return a minimum size hint.

Definition at line 268 of file qwt_arrow_button.cpp.

◆ num()

int QwtArrowButton::num ( ) const

The number of arrows.

Definition at line 96 of file qwt_arrow_button.cpp.

◆ paintEvent()

void QwtArrowButton::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint event handler

Parameters
eventPaint event

Definition at line 130 of file qwt_arrow_button.cpp.

◆ sizeHint()

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

Definition at line 259 of file qwt_arrow_button.cpp.

Member Data Documentation

◆ m_data

PrivateData* QwtArrowButton::m_data
private

Definition at line 54 of file qwt_arrow_button.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50