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
Definition at line 47 of file qwt_knob.h. Referenced by symbol(). |
|
Constructor.
Definition at line 23 of file qwt_knob.cpp. 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.
Definition at line 99 of file qwt_knob.cpp. References drawMarker(), and QwtSliderBase::isValid(). Referenced by draw(). |
|
Draw the marker at the knob's front.
Definition at line 301 of file qwt_knob.cpp. Referenced by drawKnob(). |
|
Return the width of the knob.
Definition at line 57 of file qwt_knob.h. |
|
Return a minimum size hint.
Definition at line 424 of file qwt_knob.cpp. 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.
Definition at line 360 of file qwt_knob.cpp. |
|
Change the knob's width. The specified width must be >= 5, or it will be clipped.
Definition at line 350 of file qwt_knob.cpp. |
|
Set the symbol of the knob.
Definition at line 57 of file qwt_knob.cpp. |
|
Set the total angle by which the knob can be turned.
Definition at line 83 of file qwt_knob.cpp. References QwtScaleIf::scaleDraw(), and QwtScaleDraw::setAngleRange(). Referenced by QwtKnob(). |
|
Definition at line 414 of file qwt_knob.cpp. References minimumSizeHint(). |
|
Definition at line 70 of file qwt_knob.cpp. References Symbol. |
|
Return the total angle.
Definition at line 59 of file qwt_knob.h. |