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

QwtKnob Class Reference

The Knob Widget. More...

#include <qwt_knob.h>

Inheritance diagram for QwtKnob::

QwtSliderBase QwtScaleIf QwtDblRange List of all members.

Public Types

enum  Symbol { Line, Dot }

Public Methods

 QwtKnob (QWidget *parent=0, const char *name=0)
virtual ~QwtKnob ()
void setKnobWidth (int w)
void setTotalAngle (double angle)
void setBorderWidth (int bw)
void setSymbol (Symbol)
Symbol symbol () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual QSizePolicy sizePolicy () const

Protected Methods

virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)
void draw (QPainter *p, const QRect &ur)
void drawKnob (QPainter *p, const QRect &r)
void drawMarker (QPainter *p, double arc, const QColor &c)

Detailed Description

The Knob Widget.

The QwtKnob widget imitates look and behaviour of a volume knob on a radio. It contains a scale around the knob which is set up automatically or can be configured manually (see QwtScaleIf). Automatic scrolling is enabled when the user presses a mouse button on the scale. For a description of signals, slots and other members, see QwtSliderBase.

knob.gif
See also:
QwtSliderBase and QwtScaleIf for the descriptions of the inherited members.


Member Enumeration Documentation

enum QwtKnob::Symbol
 

Symbol

See also:
QwtKnob::QwtKnob()


Constructor & Destructor Documentation

QwtKnob::QwtKnob QWidget *    parent = 0,
const char *    name = 0
 

Constructor.

Parameters:
parent  Parent widget
name  Name

QwtKnob::~QwtKnob   [virtual]
 

Destructor.


Member Function Documentation

void QwtKnob::draw QPainter *    p,
const QRect &    ur
[protected]
 

Repaint the knob.

void QwtKnob::drawKnob QPainter *    p,
const QRect &    r
[protected]
 

Draw the knob.

Parameters:
p  painter
r  borders of the knob

void QwtKnob::drawMarker QPainter *    p,
double    arc,
const QColor &    c
[protected]
 

Draw the marker at the knob's front.

Parameters:
p  Painter
arc  Angle of the marker
c  Marker color

QSize QwtKnob::minimumSizeHint   const [virtual]
 

Return a minimum size hint.

Warning:
The return value of QwtKnob::minimumSizeHint() depends on the font and the scale.

void QwtKnob::paintEvent QPaintEvent *    e [protected, virtual]
 

Repaint the knob.

void QwtKnob::resizeEvent QResizeEvent *    e [protected, virtual]
 

Qt Resize Event.

void QwtKnob::setBorderWidth int    bw
 

Set the knob's border width.

Parameters:
bw  new border width

void QwtKnob::setKnobWidth int    w
 

Change the knob's width.

The specified width must be >= 5, or it will be clipped.

Parameters:
w  New width

void QwtKnob::setSymbol QwtKnob::Symbol    s
 

Set the symbol of the knob.

See also:
QwtKnob::symbol()

void QwtKnob::setTotalAngle double    angle
 

Set the total angle by which the knob can be turned.

Parameters:
angle  Angle in degrees.
The default angle is 270 degrees. It is possible to specify an angle of more than 360 degrees so that the knob can be turned several times around its axis.

QSize QwtKnob::sizeHint   const [virtual]
 

Returns:
QwtKnob::minimumSizeHint()

QSizePolicy QwtKnob::sizePolicy   const [virtual]
 

Returns:
Fixed/Fixed.

QwtKnob::Symbol QwtKnob::symbol   const
 

Returns:
symbol of the knob
See also:
QwtKnob::setSymbol()


Generated on Tue May 28 15:30:58 2002 for Qwt User's Guide by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001