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.
Definition at line 32 of file qwt_knob.h.
Public Types | |
enum | Symbol { Line, Dot } |
Public Member Functions | |
QwtKnob (QWidget *parent=0, const char *name=0) | |
virtual | ~QwtKnob () |
void | setKnobWidth (int w) |
void | setTotalAngle (double angle) |
void | setBorderWidth (int bw) |
int | knobWidth () const |
double | totalAngle () const |
int | borderWidth () const |
void | setSymbol (Symbol) |
Symbol | symbol () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
Protected Member Functions | |
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) |
|
Symbol
Referenced by symbol(). |
|
Constructor.
References QwtScaleIf::scaleDraw(), QwtScaleDraw::setGeometry(), setTotalAngle(), and QwtSliderBase::setUpdateTime(). |
|
Destructor. Definition at line 49 of file qwt_knob.cpp. |
|
Return the border width. Definition at line 61 of file qwt_knob.h. |
|
Repaint the knob. Definition at line 275 of file qwt_knob.cpp. References QwtScaleDraw::draw(), drawKnob(), and QwtScaleIf::scaleDraw(). Referenced by paintEvent(). |
|
Draw the knob.
References drawMarker(), and QwtSliderBase::isValid(). Referenced by draw(). |
|
Draw the marker at the knob's front.
Referenced by drawKnob(). |
|
Return the width of the knob. Definition at line 57 of file qwt_knob.h. |
|
Return a minimum size hint.
References QwtScaleDraw::minHeight(), and QwtScaleIf::scaleDraw(). Referenced by sizeHint(). |
|
Repaint the knob. Definition at line 262 of file qwt_knob.cpp. References draw(), and QwtPaintBuffer::painter(). |
|
Qt Resize Event. Definition at line 228 of file qwt_knob.cpp. |
|
Set the knob's border width.
|
|
Change the knob's width. The specified width must be >= 5, or it will be clipped.
|
|
Set the symbol of the knob.
|
|
Set the total angle by which the knob can be turned.
References QwtScaleIf::scaleDraw(), and QwtScaleDraw::setAngleRange(). Referenced by QwtKnob(). |
|
References minimumSizeHint(). |
|
References Symbol. |
|
Return the total angle. Definition at line 59 of file qwt_knob.h. |