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 QwtAbstractScale). Automatic scrolling is enabled when the user presses a mouse button on the scale. For a description of signals, slots and other members, see QwtAbstractSlider.
Definition at line 32 of file qwt_knob.h.
Public Types | |
enum | Symbol { Line, Dot } |
Public Member Functions | |
QwtKnob (QWidget *parent=NULL) | |
virtual | ~QwtKnob () |
void | setKnobWidth (int w) |
int | knobWidth () const |
void | setTotalAngle (double angle) |
double | totalAngle () const |
void | setBorderWidth (int bw) |
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. |
|
Constructor.
Definition at line 64 of file qwt_knob.cpp. References QwtAbstractScale::scaleDraw(), QwtScaleDraw::setGeometry(), QwtDoubleRange::setRange(), setTotalAngle(), QwtAbstractSlider::setUpdateTime(), and QwtAbstractSlider::setValue(). |
|
Destructor.
Definition at line 85 of file qwt_knob.cpp. |
|
Return the border width.
Definition at line 430 of file qwt_knob.cpp. |
|
Repaint the knob.
Definition at line 337 of file qwt_knob.cpp. References QwtScaleDraw::draw(), drawKnob(), and QwtAbstractScale::scaleDraw(). Referenced by paintEvent(). |
|
Draw the knob.
Definition at line 145 of file qwt_knob.cpp. References drawMarker(), and QwtAbstractSlider::isValid(). Referenced by draw(). |
|
Draw the marker at the knob's front.
Definition at line 360 of file qwt_knob.cpp. References QwtScaleDraw::x(), and QwtScaleDraw::y(). Referenced by drawKnob(). |
|
Return the width of the knob.
Definition at line 414 of file qwt_knob.cpp. |
|
Return a minimum size hint.
Definition at line 493 of file qwt_knob.cpp. References QwtScaleDraw::minHeight(), and QwtAbstractScale::scaleDraw(). Referenced by sizeHint(). |
|
Repaint the knob.
Definition at line 317 of file qwt_knob.cpp. References draw(), and QwtPaintBuffer::painter(). |
|
Qt Resize Event.
Definition at line 283 of file qwt_knob.cpp. |
|
Set the knob's border width.
Definition at line 423 of file qwt_knob.cpp. |
|
Change the knob's width. The specified width must be >= 5, or it will be clipped.
Definition at line 407 of file qwt_knob.cpp. |
|
Set the symbol of the knob.
Definition at line 94 of file qwt_knob.cpp. |
|
Set the total angle by which the knob can be turned.
Definition at line 120 of file qwt_knob.cpp. References QwtAbstractScale::scaleDraw(), and QwtScaleDraw::setAngleRange(). Referenced by QwtKnob(). |
|
Definition at line 483 of file qwt_knob.cpp. References minimumSizeHint(). |
|
Definition at line 107 of file qwt_knob.cpp. |
|
Return the total angle.
Definition at line 133 of file qwt_knob.cpp. |