QwtWheel(3)
π‘ QwtWheel(3) β Library Functions Manual β¨
okay bestie, meet QwtWheel: The Wheel Widget. Itβs giving very βspin the wheel, change the valueβ energy, and it lives in the Library Functions Manual. Periodt.
β¨ NAME β¨
QwtWheel β The Wheel Widget. Literally the wheel widget, no cap.
π¦ SYNOPSIS π¦
#include <qwt_wheel.h>
Inherits QWidget.
π Public Slots π
void setValue (double)β Set a new value without adjusting to the step raster.void setTotalAngle (double)β Set the total angle which the wheel can be turned.void setViewAngle (double)β Specify the visible portion of the wheel.void setMass (double)β Set the sliderβs mass for flywheel effect.
π£ Signals π£
void valueChanged (double value)β Notify a change of value.void wheelPressed ()void wheelReleased ()void wheelMoved (double value)
π«Ά Public Member Functions π«Ά
QwtWheel (QWidget *parent=NULL)β Constructor.virtual ~QwtWheel ()β Destructor.double value () constvoid setOrientation (Qt::Orientation)β Set the wheelβs orientation.Qt::Orientation orientation () constdouble totalAngle () constdouble viewAngle () constvoid setTickCount (int)β Adjust the number of grooves in the wheelβs surface.int tickCount () constvoid setWheelWidth (int)β Set the width of the wheel.int wheelWidth () constvoid setWheelBorderWidth (int)β Set the wheel border width of the wheel.int wheelBorderWidth () constvoid setBorderWidth (int)β Set the border width.int borderWidth () constvoid setInverted (bool)β En/Disable inverted appearance.bool isInverted () constvoid setWrapping (bool)β En/Disable wrapping.bool wrapping () constvoid setSingleStep (double)β Set the step size of the counter.double singleStep () constvoid setPageStepCount (int)β Set the page step count.int pageStepCount () constvoid setStepAlignment (bool on)β En/Disable step alignment.bool stepAlignment () constvoid setRange (double min, double max)β Set the minimum and maximum values.void setMinimum (double)double minimum () constvoid setMaximum (double)double maximum () constvoid setUpdateInterval (int)β Specify the update interval when the wheel is flying.int updateInterval () constvoid setTracking (bool)β En/Disable tracking.bool isTracking () constdouble mass () const
π‘οΈ Protected Member Functions π‘οΈ
virtual void paintEvent (QPaintEvent *) overrideβ Qt Paint Event.virtual void mousePressEvent (QMouseEvent *) overrideβ Mouse press event handler.virtual void mouseReleaseEvent (QMouseEvent *) overrideβ Mouse Release Event handler.virtual void mouseMoveEvent (QMouseEvent *) overrideβ Mouse Move Event handler.virtual void keyPressEvent (QKeyEvent *) overridevirtual void wheelEvent (QWheelEvent *) overrideβ Handle wheel events.virtual void timerEvent (QTimerEvent *) overrideβ Qt timer event.void stopFlying ()β Stop the flying movement of the wheel.QRect wheelRect () constvirtual QSize sizeHint () const overridevirtual QSize minimumSizeHint () const overridevirtual void drawTicks (QPainter *, const QRectF &)virtual void drawWheelBackground (QPainter *, const QRectF &)virtual double valueAt (const QPoint &) const
πΈ Detailed Description πΈ
The Wheel Widget. Iconic.
The wheel widget can be used to change values over a very large range in very small steps. Using the setMass() member, it can be configured as a flying wheel. Thatβs the flywheel vibe, bestie.
The default range of the wheel is [0.0, 100.0].
See also: The radio example.
Definition at line 27 of file qwt_wheel.h.
π Constructor & Destructor Documentation π
QwtWheel::QwtWheel (QWidget * parent = NULL) [explicit]
Constructor.
Definition at line 92 of file qwt_wheel.cpp.
QwtWheel::~QwtWheel () [virtual]
Destructor.
Definition at line 103 of file qwt_wheel.cpp.
π Member Function Documentation π
int QwtWheel::borderWidth () const
Returns: Border width.
See also: setBorderWidth()
Definition at line 586 of file qwt_wheel.cpp.
void QwtWheel::drawTicks (QPainter * painter, const QRectF & rect) [protected], [virtual]
Draw the Wheelβs ticks.
Parameters:
painterβ Painterrectβ Geometry for the wheel
Definition at line 817 of file qwt_wheel.cpp.
void QwtWheel::drawWheelBackground (QPainter * painter, const QRectF & rect) [protected], [virtual]
Draw the Wheelβs background gradient.
Parameters:
painterβ Painterrectβ Geometry for the wheel
Definition at line 761 of file qwt_wheel.cpp.
bool QwtWheel::isInverted () const
Returns: True, when the wheel is inverted.
See also: setInverted()
Definition at line 1176 of file qwt_wheel.cpp.
bool QwtWheel::isTracking () const
Returns: True, when tracking is enabled.
See also: setTracking(), valueChanged(), wheelMoved()
Definition at line 129 of file qwt_wheel.cpp.
void QwtWheel::keyPressEvent (QKeyEvent * event) [override], [protected], [virtual]
Handle key events. Keyboard queen behavior, incoming:
Qt::Key_Homeβ Step tominimum()Qt::Key_Endβ Step tomaximum()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 bypageStepSize() * singleStepSize().Qt::Key_PageDownβ The value will be decremented bypageStepSize() * singleStepSize().
Parameters:
eventβ Key event
Definition at line 409 of file qwt_wheel.cpp.
double QwtWheel::mass () const
Returns: mass.
See also: setMass()
Definition at line 1240 of file qwt_wheel.cpp.
double QwtWheel::maximum () const
Returns: The maximum of the range.
See also: setRange(), setMaximum(), minimum()
Definition at line 1114 of file qwt_wheel.cpp.
double QwtWheel::minimum () const
Returns: The minimum of the range.
See also: setRange(), setMinimum(), maximum()
Definition at line 1094 of file qwt_wheel.cpp.
QSize QwtWheel::minimumSizeHint () const [override], [protected], [virtual]
Returns: Minimum size hint.
β οΈ Warning: The return value is based on the wheel width.
Definition at line 962 of file qwt_wheel.cpp.
void QwtWheel::mouseMoveEvent (QMouseEvent * event) [override], [protected], [virtual]
Mouse Move Event handler. Turn the wheel according to the mouse position.
Parameters:
eventβ Mouse event
Definition at line 188 of file qwt_wheel.cpp.
void QwtWheel::mousePressEvent (QMouseEvent * event) [override], [protected], [virtual]
Mouse press event handler. Start movement of the wheel.
Parameters:
eventβ Mouse event
Definition at line 163 of file qwt_wheel.cpp.
void QwtWheel::mouseReleaseEvent (QMouseEvent * event) [override], [protected], [virtual]
Mouse Release Event handler. When the wheel has no mass the movement of the wheel stops, otherwise it starts flying.
Parameters:
eventβ Mouse event
Definition at line 237 of file qwt_wheel.cpp.
Qt::Orientation QwtWheel::orientation () const
Returns: Orientation.
See also: setOrientation()
Definition at line 661 of file qwt_wheel.cpp.
int QwtWheel::pageStepCount () const
Returns: Page step count.
See also: setPageStepCount(), singleStep()
Definition at line 1043 of file qwt_wheel.cpp.
void QwtWheel::paintEvent (QPaintEvent * event) [override], [protected], [virtual]
Qt Paint Event.
Parameters:
eventβ Paint event
Definition at line 736 of file qwt_wheel.cpp.
void QwtWheel::setBorderWidth (int width)
Set the border width. The border defaults to 2.
Parameters:
widthβ Border width
See also: borderWidth()
Definition at line 576 of file qwt_wheel.cpp.
void QwtWheel::setInverted (bool on)
En/Disable inverted appearance. An inverted wheel increases its values in the opposite direction. The direction of an inverted horizontal wheel will be from right to left; an inverted vertical wheel will increase from bottom to top.
Parameters:
onβ En/Disable inverted appearance
See also: isInverted()
Definition at line 1163 of file qwt_wheel.cpp.
void QwtWheel::setMass (double mass) [slot]
Set the sliderβs mass for flywheel effect. If the sliderβs mass is greater then 0, it will continue to move after the mouse button has been released. Its speed decreases with time at a rate depending on the sliderβs mass. A large mass means that it will continue to move for a long time.
Derived widgets may overload this function to make it public.
Parameters:
massβ New mass in kg
See also: mass()
Definition at line 1221 of file qwt_wheel.cpp.
void QwtWheel::setMaximum (double value)
Set the maximum value of the range.
Parameters:
valueβ Maximum value
See also: setRange(), setMinimum(), maximum()
Definition at line 1105 of file qwt_wheel.cpp.
void QwtWheel::setMinimum (double value)
Set the minimum value of the range.
Parameters:
valueβ Minimum value
See also: setRange(), setMaximum(), minimum()
Note: The maximum is adjusted if necessary to ensure that the range remains valid.
Definition at line 1085 of file qwt_wheel.cpp.
void QwtWheel::setOrientation (Qt::Orientation orientation)
Set the wheelβs orientation. The default orientation is Qt::Horizontal.
Parameters:
orientationβQt::HorizontalorQt::Vertical.
See also: orientation()
Definition at line 639 of file qwt_wheel.cpp.
void QwtWheel::setPageStepCount (int count)
Set the page step count. pageStepCount is a multiplicator for the single step size that typically corresponds to the user pressing PageUp or PageDown.
A value of 0 disables page stepping.
The default value is 1.
Parameters:
countβ Multiplicator for the single step size
See also: pageStepCount(), setSingleStep()
Definition at line 1034 of file qwt_wheel.cpp.
void QwtWheel::setRange (double min, double max)
Set the minimum and maximum values. The maximum is adjusted if necessary to ensure that the range remains valid. The value might be modified to be inside of the range.
Parameters:
minβ Minimum valuemaxβ Maximum value
See also: minimum(), maximum()
Definition at line 1059 of file qwt_wheel.cpp.
void QwtWheel::setSingleStep(double stepSize)
Bestie, this is your "how much does one lil nudge move the value" dial π. It sets the step size of the counter.
Lowkey important: a value <= 0.0 disables stepping entirely. Not "steps really tiny" β fully off. Periodt.
Parameters
stepSizeβ Single step size
See also singleStep(), setPageStepCount()
Defined at line 980 of file qwt_wheel.cpp.
void QwtWheel::setStepAlignment(bool on)
En/Disable step alignment β¨. When step alignment is enabled, value changes initiated by user input (mouse, keyboard, wheel) are aligned to the multiples of the single step. It's giving "snap to the grid, bestie" β so you never land on some cursed in-between number π¦.
Parameters
onβ On/Off
See also stepAlignment(), setSingleStep()
Defined at line 1004 of file qwt_wheel.cpp.
void QwtWheel::setTickCount(int count)
Adjusts 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 (so don't try to be extra, it literally won't let you π). The default value is 10.
Parameters
countβ Number of grooves per 360 degrees
See also tickCount()
Defined at line 519 of file qwt_wheel.cpp.
void QwtWheel::setTotalAngle(double angle) [slot]
Sets the total angle 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 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()
Defined at line 613 of file qwt_wheel.cpp.
void QwtWheel::setTracking(bool enable)
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.
Big note: the wheelMoved() signal is emitted regardless id tracking is enabled or not. (That's exactly what the page says, no cap β it's not a typo on my end π.)
Parameters
enableβ On/Off
See also isTracking()
Defined at line 120 of file qwt_wheel.cpp.
void QwtWheel::setUpdateInterval(int interval)
Specify the update interval when the wheel is flying ποΈ. Default and minimum value is 50 ms. Don't go lower, it said minimum, girlie π.
Parameters
intervalβ Interval in milliseconds
See also updateInterval(), setMass(), setTracking()
Defined at line 142 of file qwt_wheel.cpp.
void QwtWheel::setValue(double value) [slot]
Set a new value without adjusting to the step raster. So yes, she can land off-grid if you want her to π .
Parameters
valueβ New value
See also value(), valueChanged()
β οΈ Warning: the value is clipped when it lies outside the range. So if you're out here passing wild numbers, bestie, they're getting squished back in range, not saved π«Ά.
Defined at line 1127 of file qwt_wheel.cpp.
void QwtWheel::setViewAngle(double angle) [slot]
Specify the visible portion of the wheel ποΈβ¨. You may use this function for fine-tuning the appearance of the wheel. The default value is 175 degrees. The value is limited from 10 to 175 degrees.
Parameters
angleβ Visible angle in degrees
See also viewAngle(), setTotalAngle()
Defined at line 676 of file qwt_wheel.cpp.
void QwtWheel::setWheelBorderWidth(int borderWidth)
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
borderWidthβ Border width
See also internalBorder()
Defined at line 551 of file qwt_wheel.cpp.
void QwtWheel::setWheelWidth(int width)
Set the width of the wheel π. Corresponds to the wheel height for horizontal orientation, and the wheel width for vertical orientation. (Yes, orientation flips which dimension it means β she's flexible like that πΈ.)
Parameters
widthβ the wheel's width
See also wheelWidth()
Defined at line 934 of file qwt_wheel.cpp.
void QwtWheel::setWrapping(bool on)
En/Disable wrapping π. If wrapping is true, stepping up from the maximum() value will take you to the minimum() value and vice versa. It's the "wrap around like a playlist on repeat" behaviour, iconic honestly π§.
Parameters
onβ En/Disable wrapping
See also wrapping()
Defined at line 1190 of file qwt_wheel.cpp.
double QwtWheel::singleStep() const
Returns β Single step size
See also setSingleStep()
Defined at line 989 of file qwt_wheel.cpp.
QSize QwtWheel::sizeHint() const [override], [protected], [virtual]
Returns β a size hint
Defined at line 952 of file qwt_wheel.cpp.
bool QwtWheel::stepAlignment() const
Returns β True, when the step alignment is enabled
See also setStepAlignment(), singleStep()
Defined at line 1016 of file qwt_wheel.cpp.
void QwtWheel::stopFlying() [protected]
Stop the flying movement of the wheel π¬. Put her down gently, she's done spinning.
Defined at line 1246 of file qwt_wheel.cpp.
int QwtWheel::tickCount() const
Returns β Number of grooves in the wheel's surface.
See also setTickCnt() (that's exactly how it's written on the page, iykyk π«Ά)
Defined at line 534 of file qwt_wheel.cpp.
void QwtWheel::timerEvent(QTimerEvent *event) [override], [protected], [virtual]
Qt timer event β°. The flying wheel effect is implemented using a timer β that's the whole secret sauce, bestie, it's just a timer being dramatic.
Parameters
eventβ Timer event
See also updateInterval()
Defined at line 283 of file qwt_wheel.cpp.
double QwtWheel::totalAngle() const
Returns β Total angle which the wheel can be turned.
See also setTotalAngle()
Defined at line 626 of file qwt_wheel.cpp.
int QwtWheel::updateInterval() const
Returns β Update interval when the wheel is flying
See also setUpdateInterval(), mass(), isTracking()
Defined at line 151 of file qwt_wheel.cpp.
double QwtWheel::value() const
Returns β Current value of the wheel
See also setValue(), valueChanged()
Defined at line 1147 of file qwt_wheel.cpp.
double QwtWheel::valueAt(const QPoint &pos) const [protected], [virtual]
Determine the value corresponding to a specified point π β like, "you clicked here, so the value is this."
Parameters
posβ Position
Returns β Value corresponding to pos
Defined at line 697 of file qwt_wheel.cpp.
void QwtWheel::valueChanged(double value) [signal]
Notify a change of value π. When tracking is enabled this signal will be emitted every time the value changes.
Parameters
valueβ new value
See also setTracking()
double QwtWheel::viewAngle() const
Returns β Visible portion of the wheel
See also setViewAngle(), totalAngle()
Defined at line 686 of file qwt_wheel.cpp.
int QwtWheel::wheelBorderWidth() const
Returns β Wheel border width
See also setWheelBorderWidth()
Defined at line 563 of file qwt_wheel.cpp.
void QwtWheel::wheelEvent(QWheelEvent *event) [override], [protected], [virtual]
Handle wheel events π±οΈ. In/Decrement the value.
Parameters
eventβ Wheel event
Defined at line 324 of file qwt_wheel.cpp.
void QwtWheel::wheelMoved(double value) [signal]
This signal is emitted when the user moves the wheel with the mouse π±οΈβ¨.
Parameters
valueβ new value
void QwtWheel::wheelPressed() [signal]
This signal is emitted when the user presses the the wheel with the mouse. (Two "the"s, bestie β that's the page's words, not mine ππ )
QRect QwtWheel::wheelRect() const [protected]
Returns β Rectangle of the wheel without the outer border
Defined at line 594 of file qwt_wheel.cpp.
void QwtWheel::wheelReleased() [signal]
This signal is emitted when the user releases the mouse π«Ά.
int QwtWheel::wheelWidth() const
Returns β Width of the wheel
See also setWheelWidth()
Defined at line 944 of file qwt_wheel.cpp.
bool QwtWheel::wrapping() const
Returns β True, when wrapping is set
See also setWrapping()
Defined at line 1199 of file qwt_wheel.cpp.
π«Ά AUTHOR π«Ά
Generated automatically by Doxygen for Qwt User's Guide from the source code. She wasn't hand-written by a human, she was birthed by a doc generator, and honestly? Still ate π β¨.
And that's the whole page, bestie β no cap, every flag, every line number, every signal accounted for ππ. This lil masterpiece is from the Qwt User's Guide, filed under QwtWheel(3), auto-generated by Doxygen straight from the source code. Go forth and spin that wheel, you gorgeous Unix gremlin ππ¦π.
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms