|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
The Knob Widget. More...
#include <qwt_knob.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | KnobStyle { Flat , Raised , Sunken , Styled } |
| Style of the knob surface. More... | |
| enum | MarkerStyle { NoMarker = -1 , Tick , Triangle , Dot , Nub , Notch } |
| Marker type. More... | |
Public Member Functions | |
| QwtKnob (QWidget *parent=nullptr) | |
| Constructor. | |
| virtual | ~QwtKnob () |
| Destructor. | |
| void | setAlignment (Qt::Alignment) |
| Set alignment of the knob inside contentsRect() | |
| Qt::Alignment | alignment () const |
| Return alignment of the knob. | |
| void | setKnobWidth (int) |
| Set the knob's width (diameter) | |
| int | knobWidth () const |
| Return the knob's width. | |
| void | setNumTurns (int) |
| Set the number of turns for the knob. | |
| int | numTurns () const |
| Return the number of turns. | |
| void | setTotalAngle (double angle) |
| Set the total angle which the knob can be turned. | |
| double | totalAngle () const |
| Return the total angle. | |
| void | setKnobStyle (KnobStyle) |
| Set the knob style. | |
| KnobStyle | knobStyle () const |
| Return the knob style. | |
| void | setBorderWidth (int) |
| Set the border width. | |
| int | borderWidth () const |
| Return the border width. | |
| void | setMarkerStyle (MarkerStyle) |
| Set the marker style. | |
| MarkerStyle | markerStyle () const |
| Return the marker style. | |
| void | setMarkerSize (int) |
| Set the marker size. | |
| int | markerSize () const |
| Return the marker size. | |
| virtual QSize | sizeHint () const override |
| Return size hint. | |
| virtual QSize | minimumSizeHint () const override |
| Return minimum size hint. | |
| void | setScaleDraw (QwtRoundScaleDraw *) |
| Set the scale draw. | |
| const QwtRoundScaleDraw * | scaleDraw () const |
| Return the scale draw (const version) | |
| QwtRoundScaleDraw * | scaleDraw () |
| Return the scale draw (non-const version) | |
| QRect | knobRect () const |
| Return the bounding rectangle of the knob. | |
Public Member Functions inherited from QwtAbstractSlider | |
| QwtAbstractSlider (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractSlider (English only) | |
| virtual | ~QwtAbstractSlider () |
| Destructor for QwtAbstractSlider (English only) | |
| void | setValid (bool) |
| Set whether the slider is valid (English only) | |
| bool | isValid () const |
| Return whether the slider is valid (English only) | |
| double | value () const |
| Return the current value (English only) | |
| void | setWrapping (bool) |
| Set whether wrapping is enabled (English only) | |
| bool | wrapping () const |
| Return whether wrapping is enabled (English only) | |
| void | setTotalSteps (uint) |
| Set the total number of steps (English only) | |
| uint | totalSteps () const |
| Return the total number of steps (English only) | |
| void | setSingleSteps (uint) |
| Set the number of single steps (English only) | |
| uint | singleSteps () const |
| Return the number of single steps (English only) | |
| void | setPageSteps (uint) |
| Set the number of page steps (English only) | |
| uint | pageSteps () const |
| Return the number of page steps (English only) | |
| void | setStepAlignment (bool) |
| Set whether step alignment is enabled (English only) | |
| bool | stepAlignment () const |
| Return whether step alignment is enabled (English only) | |
| void | setTracking (bool) |
| Set whether tracking is enabled (English only) | |
| bool | isTracking () const |
| Return whether tracking is enabled (English only) | |
| void | setReadOnly (bool) |
| Set whether the slider is read-only (English only) | |
| bool | isReadOnly () const |
| Return whether the slider is read-only (English only) | |
| void | setInvertedControls (bool) |
| Set whether controls are inverted (English only) | |
| bool | invertedControls () const |
| Return whether controls are inverted (English only) | |
Public Member Functions inherited from QwtAbstractScale | |
| QwtAbstractScale (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractScale. | |
| virtual | ~QwtAbstractScale () |
| Destructor for QwtAbstractScale . | |
| void | setScale (double lowerBound, double upperBound) |
| Specify a scale by interval bounds. | |
| void | setScale (const QwtInterval &) |
| Specify a scale by interval. | |
| void | setScale (const QwtScaleDiv &) |
| Specify a scale by scale division. | |
| const QwtScaleDiv & | scaleDiv () const |
| Return the scale division. | |
| void | setLowerBound (double value) |
| Set the lower bound of the scale. | |
| double | lowerBound () const |
| Return the lower bound of the scale. | |
| void | setUpperBound (double value) |
| Set the upper bound of the scale. | |
| double | upperBound () const |
| Return the upper bound of the scale. | |
| void | setScaleStepSize (double stepSize) |
| Set the step size used for calculating scale division. | |
| double | scaleStepSize () const |
| Return the step size hint. | |
| void | setScaleMaxMajor (int ticks) |
| Set the maximum number of major tick intervals. | |
| int | scaleMaxMinor () const |
| Return the maximum number of minor tick intervals. | |
| void | setScaleMaxMinor (int ticks) |
| Set the maximum number of minor tick intervals. | |
| int | scaleMaxMajor () const |
| Return the maximum number of major tick intervals. | |
| void | setScaleEngine (QwtScaleEngine *) |
| Set the scale engine. | |
| const QwtScaleEngine * | scaleEngine () const |
| Return the scale engine (const version) | |
| QwtScaleEngine * | scaleEngine () |
| Return the scale engine (non-const version) | |
| int | transform (double) const |
| Transform a scale value to widget coordinates. | |
| double | invTransform (int) const |
| Transform a widget coordinate to scale value. | |
| bool | isInverted () const |
| Check if scale is inverted. | |
| double | minimum () const |
| Return the minimum boundary. | |
| double | maximum () const |
| Return the maximum boundary. | |
| const QwtScaleMap & | scaleMap () const |
| Return the scale map. | |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *) override |
| Repaint the knob. | |
| virtual void | changeEvent (QEvent *) override |
| Handle QEvent::StyleChange and QEvent::FontChange;. | |
| virtual void | drawKnob (QPainter *, const QRectF &) const |
| Draw the knob. | |
| virtual void | drawFocusIndicator (QPainter *) const |
| Draw the focus indicator. | |
| virtual void | drawMarker (QPainter *, const QRectF &, double angle) const |
| Draw the marker at the knob's front. | |
| virtual double | scrolledTo (const QPoint &) const override |
| Determine the value for a new position of the mouse. | |
| virtual bool | isScrollPosition (const QPoint &) const override |
| Determine what to do when the user presses a mouse button. | |
Protected Member Functions inherited from QwtAbstractSlider | |
| virtual void | mousePressEvent (QMouseEvent *) override |
| Handle mouse press events (English only) | |
| virtual void | mouseReleaseEvent (QMouseEvent *) override |
| Handle mouse release events (English only) | |
| virtual void | mouseMoveEvent (QMouseEvent *) override |
| Handle mouse move events (English only) | |
| virtual void | keyPressEvent (QKeyEvent *) override |
| Handle key press events (English only) | |
| virtual void | wheelEvent (QWheelEvent *) override |
| Handle wheel events (English only) | |
| void | incrementValue (int stepCount) |
| Increment the value by a number of steps (English only) | |
| virtual void | scaleChange () override |
| Handle scale changes (English only) | |
| virtual void | sliderChange () |
| Handle slider changes (English only) | |
| double | incrementedValue (double value, int stepCount) const |
| Calculate incremented value (English only) | |
Protected Member Functions inherited from QwtAbstractScale | |
| void | rescale (double lowerBound, double upperBound, double stepSize) |
| Recalculate scale and update scale draw (English only) | |
| void | setAbstractScaleDraw (QwtAbstractScaleDraw *) |
| Set the scale draw object (English only) | |
| const QwtAbstractScaleDraw * | abstractScaleDraw () const |
| Return the scale draw (const version) (English only) | |
| QwtAbstractScaleDraw * | abstractScaleDraw () |
| Return the scale draw (non-const version) (English only) | |
| void | updateScaleDraw () |
| Update the scale draw (English only) | |
Properties | |
| KnobStyle | knobStyle |
| int | knobWidth |
| Qt::Alignment | alignment |
| double | totalAngle |
| int | numTurns |
| MarkerStyle | markerStyle |
| int | markerSize |
| int | borderWidth |
Properties inherited from QwtAbstractSlider | |
| double | value |
| uint | totalSteps |
| uint | singleSteps |
| uint | pageSteps |
| bool | stepAlignment |
| bool | readOnly |
| bool | tracking |
| bool | wrapping |
| bool | invertedControls |
Properties inherited from QwtAbstractScale | |
| double | lowerBound |
| double | upperBound |
| int | scaleMaxMajor |
| int | scaleMaxMinor |
| double | scaleStepSize |
Additional Inherited Members | |
Public Slots inherited from QwtAbstractSlider | |
| void | setValue (double value) |
| Set the slider value (English only) | |
Signals inherited from QwtAbstractSlider | |
| void | valueChanged (double value) |
| Notify a change of value. | |
| void | sliderPressed () |
| Signal emitted when the user presses the movable part of the slider . | |
| void | sliderReleased () |
| Signal emitted when the user releases the movable part of the slider . | |
| void | sliderMoved (double value) |
| Signal emitted when the user moves the slider with the mouse. | |
The Knob Widget.
| enum QwtKnob::KnobStyle |
Style of the knob surface.
| enum QwtKnob::MarkerStyle |
Marker type.
|
explicit |
Constructor.
| Qt::Alignment QwtKnob::alignment | ( | ) | const |
Return alignment of the knob.
Return alignment of the knob inside contentsRect()
|
overrideprotectedvirtual |
Handle QEvent::StyleChange and QEvent::FontChange;.
| event | Change event |
Reimplemented from QwtAbstractScale.
|
protectedvirtual |
Draw the focus indicator.
| painter | Painter |
|
protectedvirtual |
Draw the knob.
| painter | painter |
| knobRect | Bounding rectangle of the knob (without scale) |
|
protectedvirtual |
Draw the marker at the knob's front.
| painter | Painter |
| rect | Bounding rectangle of the knob without scale |
| angle | Angle of the marker in degrees ( clockwise, 0 at the 12 o'clock position ) |
|
overrideprotectedvirtual |
Determine what to do when the user presses a mouse button.
| pos | Mouse position |
| True,when | pos is inside the circle of the knob. |
Implements QwtAbstractSlider.
| QRect QwtKnob::knobRect | ( | ) | const |
Return the bounding rectangle of the knob.
Calculate the bounding rectangle of the knob without the scale.
| QwtKnob::KnobStyle QwtKnob::knobStyle | ( | ) | const |
Return the knob style.
| int QwtKnob::knobWidth | ( | ) | const |
Return the knob's width.
Return the width of the knob.
| int QwtKnob::markerSize | ( | ) | const |
Return the marker size.
| QwtKnob::MarkerStyle QwtKnob::markerStyle | ( | ) | const |
Return the marker style.
|
overridevirtual |
Return minimum size hint.
Return the minimum size hint.
| int QwtKnob::numTurns | ( | ) | const |
Return the number of turns.
|
overrideprotectedvirtual |
Repaint the knob.
| event | Paint event |
| QwtRoundScaleDraw * QwtKnob::scaleDraw | ( | ) |
Return the scale draw (non-const version)
Return the scale draw of the knob (non-const version)
| const QwtRoundScaleDraw * QwtKnob::scaleDraw | ( | ) | const |
Return the scale draw (const version)
Return the scale draw of the knob (const version)
|
overrideprotectedvirtual |
Determine the value for a new position of the mouse.
| pos | Mouse position |
Implements QwtAbstractSlider.
| void QwtKnob::setAlignment | ( | Qt::Alignment | alignment | ) |
Set alignment of the knob inside contentsRect()
Set the alignment of the knob.
| void QwtKnob::setBorderWidth | ( | int | borderWidth | ) |
Set the border width.
Set the knob's border width.
| void QwtKnob::setKnobStyle | ( | KnobStyle | knobStyle | ) |
Set the knob style.
Set the knob type.
| void QwtKnob::setKnobWidth | ( | int | width | ) |
Set the knob's width (diameter)
Change the knob's width.
| void QwtKnob::setMarkerSize | ( | int | size | ) |
Set the marker size.
Set the size of the marker.
| void QwtKnob::setMarkerStyle | ( | MarkerStyle | markerStyle | ) |
Set the marker style.
Set the marker type of the knob.
| void QwtKnob::setNumTurns | ( | int | numTurns | ) |
Set the number of turns for the knob.
Set the number of turns.
| void QwtKnob::setScaleDraw | ( | QwtRoundScaleDraw * | scaleDraw | ) |
Set the scale draw.
Change the scale draw of the knob.
| void QwtKnob::setTotalAngle | ( | double | angle | ) |
Set the total angle which the knob can be turned.
Set the total angle by which the knob can be turned.
|
overridevirtual |
Return size hint.
Return the size hint.
| double QwtKnob::totalAngle | ( | ) | const |
Return the total angle.