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 34 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 |
void | setScaleDraw (QwtRoundScaleDraw *) |
const QwtRoundScaleDraw * | scaleDraw () const |
QwtRoundScaleDraw * | scaleDraw () |
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 49 of file qwt_knob.h. |
|
Constructor
Definition at line 59 of file qwt_knob.cpp. |
|
Destructor.
Definition at line 99 of file qwt_knob.cpp. |
|
Return the border width.
Definition at line 475 of file qwt_knob.cpp. |
|
Repaint the knob.
Definition at line 382 of file qwt_knob.cpp. References QwtAbstractScaleDraw::draw(), and scaleDraw(). Referenced by paintEvent(). |
|
Draw the knob.
Definition at line 189 of file qwt_knob.cpp. References drawMarker(), and QwtAbstractSlider::isValid(). |
|
Draw the marker at the knob's front.
Definition at line 405 of file qwt_knob.cpp. Referenced by drawKnob(). |
|
Return the width of the knob.
Definition at line 459 of file qwt_knob.cpp. |
|
Return a minimum size hint.
Definition at line 536 of file qwt_knob.cpp. References QwtRoundScaleDraw::extent(), and scaleDraw(). Referenced by sizeHint(). |
|
Repaint the knob.
Definition at line 362 of file qwt_knob.cpp. References draw(). |
|
Qt Resize Event.
Definition at line 331 of file qwt_knob.cpp. |
|
Definition at line 179 of file qwt_knob.cpp. References QwtAbstractScale::abstractScaleDraw(). |
|
Definition at line 170 of file qwt_knob.cpp. References QwtAbstractScale::abstractScaleDraw(). Referenced by draw(), minimumSizeHint(), setScaleDraw(), and setTotalAngle(). |
|
Set the knob's border width.
Definition at line 468 of file qwt_knob.cpp. |
|
Change the knob's width. The specified width must be >= 5, or it will be clipped.
Definition at line 452 of file qwt_knob.cpp. |
|
Change the scale draw of the knob For changing the labels of the scales, it is necessary to derive from QwtRoundScaleDraw and overload QwtRoundScaleDraw::label().
Definition at line 161 of file qwt_knob.cpp. References scaleDraw(), and QwtAbstractScale::setAbstractScaleDraw(). |
|
Set the symbol of the knob.
Definition at line 108 of file qwt_knob.cpp. |
|
Set the total angle by which the knob can be turned.
Definition at line 134 of file qwt_knob.cpp. References scaleDraw(), and QwtRoundScaleDraw::setAngleRange(). |
|
Definition at line 526 of file qwt_knob.cpp. References minimumSizeHint(). |
|
Definition at line 121 of file qwt_knob.cpp. |
|
Return the total angle.
Definition at line 147 of file qwt_knob.cpp. |