|
Qwt User's Guide
5.2.3
|
#include <qwt_knob.h>

Public Types | |
| enum | Symbol { Line, Dot } |
Public Types inherited from QwtAbstractSlider | |
| enum | ScrollMode { ScrNone, ScrMouse, ScrTimer, ScrDirect, ScrPage } |
Public Member Functions | |
| QwtKnob (QWidget *parent=NULL) | |
| virtual | ~QwtKnob () |
| int | borderWidth () const |
| int | knobWidth () const |
| virtual QSize | minimumSizeHint () const |
| const QwtRoundScaleDraw * | scaleDraw () const |
| QwtRoundScaleDraw * | scaleDraw () |
| void | setBorderWidth (int bw) |
| void | setKnobWidth (int w) |
| void | setScaleDraw (QwtRoundScaleDraw *) |
| void | setSymbol (Symbol) |
| void | setTotalAngle (double angle) |
| virtual QSize | sizeHint () const |
| Symbol | symbol () const |
| double | totalAngle () const |
Public Member Functions inherited from QwtAbstractSlider | |
| QwtAbstractSlider (Qt::Orientation, QWidget *parent=NULL) | |
| virtual | ~QwtAbstractSlider () |
| bool | isReadOnly () const |
| bool | isValid () const |
| virtual double | mass () const |
| Qt::Orientation | orientation () const |
| virtual void | setMass (double val) |
| virtual void | setOrientation (Qt::Orientation o) |
| void | setTracking (bool enable) |
| void | setUpdateTime (int t) |
| void | setValid (bool valid) |
| void | stopMoving () |
Public Member Functions inherited from QwtDoubleRange | |
| QwtDoubleRange () | |
| virtual | ~QwtDoubleRange () |
| virtual void | incPages (int) |
| double | maxValue () const |
| double | minValue () const |
| int | pageSize () const |
| bool | periodic () const |
| void | setPeriodic (bool tf) |
| void | setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1) |
| void | setStep (double) |
| double | step () const |
| double | value () const |
Public Member Functions inherited from QwtAbstractScale | |
| QwtAbstractScale () | |
| virtual | ~QwtAbstractScale () |
| bool | autoScale () const |
| const QwtScaleEngine * | scaleEngine () const |
| QwtScaleEngine * | scaleEngine () |
| const QwtScaleMap & | scaleMap () const |
| int | scaleMaxMajor () const |
| int | scaleMaxMinor () const |
| void | setAutoScale () |
| void | setScale (double vmin, double vmax, double step=0.0) |
| void | setScale (const QwtDoubleInterval &, double step=0.0) |
| void | setScale (const QwtScaleDiv &s) |
| void | setScaleEngine (QwtScaleEngine *) |
| void | setScaleMaxMajor (int ticks) |
| void | setScaleMaxMinor (int ticks) |
Protected Member Functions | |
| void | draw (QPainter *p, const QRect &ur) |
| void | drawKnob (QPainter *p, const QRect &r) |
| void | drawMarker (QPainter *p, double arc, const QColor &c) |
| virtual void | paintEvent (QPaintEvent *e) |
| virtual void | resizeEvent (QResizeEvent *e) |
Protected Member Functions inherited from QwtAbstractSlider | |
| virtual void | keyPressEvent (QKeyEvent *e) |
| virtual void | mouseMoveEvent (QMouseEvent *e) |
| double | mouseOffset () const |
| virtual void | mousePressEvent (QMouseEvent *e) |
| virtual void | mouseReleaseEvent (QMouseEvent *e) |
| int | scrollMode () const |
| void | setMouseOffset (double) |
| virtual void | setPosition (const QPoint &) |
| virtual void | timerEvent (QTimerEvent *e) |
| virtual void | wheelEvent (QWheelEvent *e) |
Protected Member Functions inherited from QwtDoubleRange | |
| double | exactPrevValue () const |
| double | exactValue () const |
| double | prevValue () const |
| virtual void | stepChange () |
Protected Member Functions inherited from QwtAbstractScale | |
| const QwtAbstractScaleDraw * | abstractScaleDraw () const |
| QwtAbstractScaleDraw * | abstractScaleDraw () |
| void | rescale (double vmin, double vmax, double step=0.0) |
| void | setAbstractScaleDraw (QwtAbstractScaleDraw *) |
Additional Inherited Members | |
Public Slots inherited from QwtAbstractSlider | |
| virtual void | fitValue (double val) |
| virtual void | incValue (int steps) |
| virtual void | setReadOnly (bool) |
| virtual void | setValue (double val) |
Signals inherited from QwtAbstractSlider | |
| void | sliderMoved (double value) |
| void | sliderPressed () |
| void | sliderReleased () |
| void | valueChanged (double value) |
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 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.
| enum QwtKnob::Symbol |
Symbol
|
explicit |
Constructor
| parent | Parent widget |
|
protected |
Repaint the knob
| painter | Painter |
| rect | Update rectangle |
|
protected |
Draw the knob.
| painter | painter |
| r | Bounding rectangle of the knob (without scale) |
|
protected |
Draw the marker at the knob's front.
| p | Painter |
| arc | Angle of the marker |
| c | Marker color |
|
virtual |
Return a minimum size hint.
|
protectedvirtual |
Repaint the knob
| e | Paint event |
|
protectedvirtual |
Qt Resize Event
| const QwtRoundScaleDraw * QwtKnob::scaleDraw | ( | ) | const |
| QwtRoundScaleDraw * QwtKnob::scaleDraw | ( | ) |
| void QwtKnob::setBorderWidth | ( | int | bw | ) |
Set the knob's border width.
| 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.
| w | New width |
| void QwtKnob::setScaleDraw | ( | QwtRoundScaleDraw * | scaleDraw | ) |
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().
| void QwtKnob::setSymbol | ( | QwtKnob::Symbol | s | ) |
Set the symbol of the knob.
| void QwtKnob::setTotalAngle | ( | double | angle | ) |
Set the total angle by which the knob can be turned.
| 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.
|
virtual |
| QwtKnob::Symbol QwtKnob::symbol | ( | ) | const |
1.8.1