The Wheel Widget.
More...
#include <qwt_wheel.h>
|
| void | setValue (double) |
| | Set a new value without adjusting to the step raster.
|
| |
| void | setTotalAngle (double) |
| |
| void | setViewAngle (double) |
| | Specify the visible portion of the wheel.
|
| |
| void | setMass (double) |
| | Set the slider's mass for flywheel effect.
|
| |
|
| void | valueChanged (double value) |
| | Notify a change of value.
|
| |
| void | wheelPressed () |
| | Signal emitted when the user presses the wheel with the mouse .
|
| |
| void | wheelReleased () |
| | Signal emitted when the user releases the mouse .
|
| |
| void | wheelMoved (double value) |
| | Signal emitted when the user moves the wheel with the mouse.
|
| |
|
| virtual void | paintEvent (QPaintEvent *) override |
| |
| virtual void | mousePressEvent (QMouseEvent *) override |
| |
| virtual void | mouseReleaseEvent (QMouseEvent *) override |
| |
| virtual void | mouseMoveEvent (QMouseEvent *) override |
| |
| virtual void | keyPressEvent (QKeyEvent *) override |
| | Handle key events
|
| |
| virtual void | wheelEvent (QWheelEvent *) override |
| |
| virtual void | timerEvent (QTimerEvent *) override |
| |
| void | stopFlying () |
| |
| QRect | wheelRect () const |
| |
| virtual QSize | sizeHint () const override |
| | Return the size hint.
|
| |
| virtual QSize | minimumSizeHint () const override |
| | Return the minimum size hint.
|
| |
| virtual void | drawTicks (QPainter *, const QRectF &) |
| | Draw the Wheel's ticks.
|
| |
| virtual void | drawWheelBackground (QPainter *, const QRectF &) |
| | Draw the Wheel's background gradient.
|
| |
| virtual double | valueAt (const QPoint &) const |
| | Determine the value corresponding to a specified point.
|
| |
|
|
Qt::Orientation | orientation |
| |
|
double | value |
| |
|
double | minimum |
| |
|
double | maximum |
| |
|
double | singleStep |
| |
|
int | pageStepCount |
| |
|
bool | stepAlignment |
| |
|
bool | tracking |
| |
|
bool | wrapping |
| |
|
bool | inverted |
| |
|
double | mass |
| |
|
int | updateInterval |
| |
|
double | totalAngle |
| |
|
double | viewAngle |
| |
|
int | tickCount |
| |
|
int | wheelWidth |
| |
|
int | borderWidth |
| |
|
int | wheelBorderWidth |
| |
◆ borderWidth()
| int QwtWheel::borderWidth |
( |
| ) |
const |
◆ drawTicks()
| void QwtWheel::drawTicks |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
protectedvirtual |
Draw the Wheel's ticks.
- Parameters
-
| painter | Painter |
| rect | Geometry for the wheel |
◆ drawWheelBackground()
| void QwtWheel::drawWheelBackground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
protectedvirtual |
Draw the Wheel's background gradient.
- Parameters
-
| painter | Painter |
| rect | Geometry for the wheel |
◆ isInverted()
| bool QwtWheel::isInverted |
( |
| ) |
const |
Return whether the wheel is inverted.
◆ isTracking()
| bool QwtWheel::isTracking |
( |
| ) |
const |
◆ keyPressEvent()
| void QwtWheel::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Handle key events
- Qt::Key_Home
Step to minimum()
- Qt::Key_End
Step to maximum()
- Qt::Key_Up
In case of a horizontal or not inverted vertical wheel the value will be incremented by the step size. For an inverted vertical wheel the value will be decremented by the step size.
- Qt::Key_Down
In case of a horizontal or not inverted vertical wheel the value will be decremented by the step size. For an inverted vertical wheel the value will be incremented by the step size.
- Qt::Key_PageUp
The value will be incremented by pageStepSize() * singleStepSize().
- Qt::Key_PageDown
The value will be decremented by pageStepSize() * singleStepSize().
- Parameters
-
◆ mass()
| double QwtWheel::mass |
( |
| ) |
const |
Return mass for flywheel effect.
Return the mass for flywheel effect.
◆ maximum()
| double QwtWheel::maximum |
( |
| ) |
const |
Return maximum value.
Return the maximum of the range.
◆ minimum()
| double QwtWheel::minimum |
( |
| ) |
const |
Return minimum value.
Return the minimum of the range.
◆ minimumSizeHint()
| QSize QwtWheel::minimumSizeHint |
( |
| ) |
const |
|
overrideprotectedvirtual |
Return the minimum size hint.
◆ mouseMoveEvent()
| void QwtWheel::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Mouse Move Event handler
Turn the wheel according to the mouse position
- Parameters
-
◆ mousePressEvent()
| void QwtWheel::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Mouse press event handler
Start movement of the wheel.
- Parameters
-
◆ mouseReleaseEvent()
| void QwtWheel::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Mouse Release Event handler
When the wheel has no mass the movement of the wheel stops, otherwise it starts flying.
- Parameters
-
◆ orientation()
| Qt::Orientation QwtWheel::orientation |
( |
| ) |
const |
◆ pageStepCount()
| int QwtWheel::pageStepCount |
( |
| ) |
const |
Return page step count.
Return the page step count.
◆ paintEvent()
| void QwtWheel::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Qt Paint Event
- Parameters
-
◆ setBorderWidth()
| void QwtWheel::setBorderWidth |
( |
int |
width | ) |
|
Set the outer border width.
Set the border width
The border defaults to 2.
- Parameters
-
- See also
- borderWidth()
◆ setInverted()
| void QwtWheel::setInverted |
( |
bool |
on | ) |
|
Set inverted appearance.
En/Disable inverted appearance.
◆ setMass
| void QwtWheel::setMass |
( |
double |
mass | ) |
|
|
slot |
Set the slider's mass for flywheel effect.
◆ setMaximum()
| void QwtWheel::setMaximum |
( |
double |
value | ) |
|
Set maximum value.
Set the maximum value of the range.
◆ setMinimum()
| void QwtWheel::setMinimum |
( |
double |
value | ) |
|
Set minimum value.
Set the minimum value of the range.
◆ setOrientation()
| void QwtWheel::setOrientation |
( |
Qt::Orientation |
orientation | ) |
|
Set the wheel orientation.
Set the wheel's orientation.
◆ setPageStepCount()
| void QwtWheel::setPageStepCount |
( |
int |
count | ) |
|
Set page step count.
Set the page step count.
◆ setRange()
| void QwtWheel::setRange |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
Set value range.
Set the minimum and maximum values.
◆ setSingleStep()
| void QwtWheel::setSingleStep |
( |
double |
stepSize | ) |
|
Set single step size.
Set the step size of the counter.
◆ setStepAlignment()
| void QwtWheel::setStepAlignment |
( |
bool |
on | ) |
|
Set step alignment.
En/Disable step alignment.
◆ setTickCount()
| void QwtWheel::setTickCount |
( |
int |
count | ) |
|
Set the number of ticks.
Adjust the number of grooves in the wheel's surface.
The number of grooves is limited to 6 <= count <= 50. Values outside this range will be clipped. The default value is 10.
- Parameters
-
| count | Number of grooves per 360 degrees |
- See also
- tickCount()
◆ setTotalAngle
| void QwtWheel::setTotalAngle |
( |
double |
angle | ) |
|
|
slot |
Set the total angle which the wheel can be turned.
One full turn of the wheel corresponds to an angle of 360 degrees. A total angle of n*360 degrees means that the wheel has to be turned n times around its axis to get from the minimum value to the maximum value.
The default setting of the total angle is 360 degrees.
- Parameters
-
| angle | total angle in degrees |
- See also
- totalAngle()
◆ setTracking()
| void QwtWheel::setTracking |
( |
bool |
enable | ) |
|
Set tracking mode.
En/Disable tracking
If tracking is enabled (the default), the wheel emits the valueChanged() signal while the wheel is moving. If tracking is disabled, the wheel emits the valueChanged() signal only when the wheel movement is terminated.
The wheelMoved() signal is emitted regardless id tracking is enabled or not.
- Parameters
-
- See also
- isTracking()
◆ setUpdateInterval()
| void QwtWheel::setUpdateInterval |
( |
int |
interval | ) |
|
Set update interval.
Specify the update interval when the wheel is flying
Default and minimum value is 50 ms.
- Parameters
-
| interval | Interval in milliseconds |
- See also
- updateInterval(), setMass(), setTracking()
◆ setValue
| void QwtWheel::setValue |
( |
double |
value | ) |
|
|
slot |
Set a new value without adjusting to the step raster.
◆ setViewAngle
| void QwtWheel::setViewAngle |
( |
double |
angle | ) |
|
|
slot |
Specify the visible portion of the wheel.
◆ setWheelBorderWidth()
| void QwtWheel::setWheelBorderWidth |
( |
int |
borderWidth | ) |
|
Set the wheel border width.
Set the wheel border width of the wheel.
The wheel border must not be smaller than 1 and is limited in dependence on the wheel's size. Values outside the allowed range will be clipped.
The wheel border defaults to 2.
- Parameters
-
- See also
- internalBorder()
◆ setWheelWidth()
| void QwtWheel::setWheelWidth |
( |
int |
width | ) |
|
Set the wheel width.
Set the width of the wheel.
◆ setWrapping()
| void QwtWheel::setWrapping |
( |
bool |
on | ) |
|
Set wrapping mode.
En/Disable wrapping.
◆ singleStep()
| double QwtWheel::singleStep |
( |
| ) |
const |
Return single step size.
Return the single step size.
◆ sizeHint()
| QSize QwtWheel::sizeHint |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ stepAlignment()
| bool QwtWheel::stepAlignment |
( |
| ) |
const |
Return whether step alignment is enabled.
◆ stopFlying()
| void QwtWheel::stopFlying |
( |
| ) |
|
|
protected |
Stop the flying movement of the wheel
◆ tickCount()
| int QwtWheel::tickCount |
( |
| ) |
const |
Return the number of ticks.
- Returns
- Number of grooves in the wheel's surface.
- See also
- setTickCnt()
◆ timerEvent()
| void QwtWheel::timerEvent |
( |
QTimerEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Qt timer event
The flying wheel effect is implemented using a timer
- Parameters
-
- See also
- updateInterval()
◆ totalAngle()
| double QwtWheel::totalAngle |
( |
| ) |
const |
Return the total angle.
- Returns
- Total angle which the wheel can be turned.
- See also
- setTotalAngle()
◆ updateInterval()
| int QwtWheel::updateInterval |
( |
| ) |
const |
◆ value()
| double QwtWheel::value |
( |
| ) |
const |
Return the current value.
Return the current value of the wheel.
◆ valueAt()
| double QwtWheel::valueAt |
( |
const QPoint & |
pos | ) |
const |
|
protectedvirtual |
Determine the value corresponding to a specified point.
- Parameters
-
- Returns
- Value corresponding to pos
◆ valueChanged
| void QwtWheel::valueChanged |
( |
double |
value | ) |
|
|
signal |
Notify a change of value.
◆ viewAngle()
| double QwtWheel::viewAngle |
( |
| ) |
const |
Return the view angle.
Return the visible portion of the wheel.
◆ wheelBorderWidth()
| int QwtWheel::wheelBorderWidth |
( |
| ) |
const |
◆ wheelEvent()
| void QwtWheel::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Handle wheel events
In/Decrement the value
- Parameters
-
◆ wheelMoved
| void QwtWheel::wheelMoved |
( |
double |
value | ) |
|
|
signal |
Signal emitted when the user moves the wheel with the mouse.
◆ wheelPressed
| void QwtWheel::wheelPressed |
( |
| ) |
|
|
signal |
Signal emitted when the user presses the wheel with the mouse .
◆ wheelRect()
| QRect QwtWheel::wheelRect |
( |
| ) |
const |
|
protected |
- Returns
- Rectangle of the wheel without the outer border
◆ wheelReleased
| void QwtWheel::wheelReleased |
( |
| ) |
|
|
signal |
Signal emitted when the user releases the mouse .
◆ wheelWidth()
| int QwtWheel::wheelWidth |
( |
| ) |
const |
Return the wheel width.
Return the width of the wheel.
◆ wrapping()
| bool QwtWheel::wrapping |
( |
| ) |
const |
Return whether wrapping is enabled.
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot/qwt_wheel.h
- /home/runner/work/QWT/QWT/src/plot/qwt_wheel.cpp