Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

QwtArrowButton Class Reference

Arrow Button. More...

#include <qwt_arrbtn.h>

List of all members.

Public Member Functions

 QwtArrowButton (int num, Qt::ArrowType, QWidget *parent, const char *name=0)
Qt::ArrowType arrowType () const
int num () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual QSizePolicy sizePolicy () const

Protected Member Functions

virtual void drawButtonLabel (QPainter *p)
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 *)

Private Attributes

const int d_num
const Qt::ArrowType d_arrowType


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_arrbtn.h.


Constructor & Destructor Documentation

QwtArrowButton::QwtArrowButton int  num,
Qt::ArrowType  arrowType,
QWidget *  parent,
const char *  name = 0
 

Parameters:
num Number of arrows
arrowType see Qt::ArowType in the Qt docs.
parent Parent widget
name Object name

Definition at line 27 of file qwt_arrbtn.cpp.

References MaxNum, and qwtLim().


Member Function Documentation

QSize QwtArrowButton::arrowSize Qt::ArrowType  ,
const QSize &  boundingSize
const [protected, virtual]
 

Definition at line 228 of file qwt_arrbtn.cpp.

Referenced by drawButtonLabel(), and minimumSizeHint().

Qt::ArrowType QwtArrowButton::arrowType  )  const
 

The direction of the arrows.

Definition at line 45 of file qwt_arrbtn.cpp.

References d_arrowType.

void QwtArrowButton::drawArrow QPainter *  ,
const QRect &  ,
Qt::ArrowType 
const [protected, virtual]
 

Definition at line 149 of file qwt_arrbtn.cpp.

Referenced by drawButtonLabel().

void QwtArrowButton::drawButtonLabel QPainter *  p  )  [protected, virtual]
 

Draw the button label.

See also:
The Qt Manual on QPushButton

Definition at line 92 of file qwt_arrbtn.cpp.

References arrowSize(), d_arrowType, d_num, drawArrow(), labelRect(), MaxNum, and Spacing.

void QwtArrowButton::keyPressEvent QKeyEvent *  e  )  [protected, virtual]
 

autoRepeat for the space keys

Definition at line 258 of file qwt_arrbtn.cpp.

QRect QwtArrowButton::labelRect  )  const [protected, virtual]
 

Definition at line 58 of file qwt_arrbtn.cpp.

References Margin.

Referenced by drawButtonLabel().

QSize QwtArrowButton::minimumSizeHint  )  const [virtual]
 

Return a minimum size hint.

Definition at line 207 of file qwt_arrbtn.cpp.

References arrowSize(), d_arrowType, Margin, MaxNum, and Spacing.

Referenced by sizeHint().

int QwtArrowButton::num  )  const
 

The number of arrows.

Definition at line 53 of file qwt_arrbtn.cpp.

References d_num.

QSize QwtArrowButton::sizeHint  )  const [virtual]
 

Returns:
a size hint

Definition at line 199 of file qwt_arrbtn.cpp.

References minimumSizeHint().

QSizePolicy QwtArrowButton::sizePolicy  )  const [virtual]
 

Returns:
Fixed/Expanding for Left/Right, Expanding/Fixed for Up/Down

Definition at line 185 of file qwt_arrbtn.cpp.

References d_arrowType.


Member Data Documentation

const Qt::ArrowType QwtArrowButton::d_arrowType [private]
 

Definition at line 49 of file qwt_arrbtn.h.

Referenced by arrowType(), drawButtonLabel(), minimumSizeHint(), and sizePolicy().

const int QwtArrowButton::d_num [private]
 

Definition at line 48 of file qwt_arrbtn.h.

Referenced by drawButtonLabel(), and num().


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 14:11:47 2003 for Qwt Developer's Guide by doxygen 1.3.2