table of contents
- bookworm 6.1.4-2
- testing 6.1.4-2
- unstable 6.1.4-2
- experimental 6.2.0-1
QwtWheel(3) | Qwt User's Guide | QwtWheel(3) |
NAME¶
QwtWheel - The Wheel Widget.
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 () const
void setOrientation (Qt::Orientation)
Set the wheel's orientation. Qt::Orientation orientation () const
double totalAngle () const
double viewAngle () const
void setTickCount (int)
Adjust the number of grooves in the wheel's surface. int tickCount ()
const
void setWheelWidth (int)
Set the width of the wheel. int wheelWidth () const
void setWheelBorderWidth (int)
Set the wheel border width of the wheel. int wheelBorderWidth () const
void setBorderWidth (int)
Set the border width. int borderWidth () const
void setInverted (bool)
En/Disable inverted appearance. bool isInverted () const
void setWrapping (bool)
En/Disable wrapping. bool wrapping () const
void setSingleStep (double)
Set the step size of the counter. double singleStep () const
void setPageStepCount (int)
Set the page step count. int pageStepCount () const
void setStepAlignment (bool on)
En/Disable step alignment. bool stepAlignment () const
void setRange (double min, double max)
Set the minimum and maximum values. void setMinimum (double)
double minimum () const
void setMaximum (double)
double maximum () const
void setUpdateInterval (int)
Specify the update interval when the wheel is flying. int
updateInterval () const
void setTracking (bool)
En/Disable tracking. bool isTracking () const
double mass () const
Protected Member Functions¶
virtual void paintEvent (QPaintEvent *)
Qt Paint Event. virtual void mousePressEvent (QMouseEvent *)
Mouse press event handler. virtual void mouseReleaseEvent (QMouseEvent
*)
Mouse Release Event handler. virtual void mouseMoveEvent (QMouseEvent
*)
Mouse Move Event handler. virtual void keyPressEvent (QKeyEvent *)
virtual void wheelEvent (QWheelEvent *)
Handle wheel events. virtual void timerEvent (QTimerEvent *)
Qt timer event. void stopFlying ()
Stop the flying movement of the wheel. QRect wheelRect () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual void drawTicks (QPainter *, const QRectF &)
virtual void drawWheelBackground (QPainter *, const QRectF &)
virtual double valueAt (const QPoint &) const
Detailed Description¶
The Wheel Widget.
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.
The default range of the wheel is [0.0, 100.0]
See also:
Member Function Documentation¶
int QwtWheel::borderWidth () const¶
Returns:
See also:
void QwtWheel::drawTicks (QPainter * painter, const QRectF & rect) [protected], [virtual]¶
Draw the Wheel's ticks
Parameters:
rect Geometry for the wheel
void QwtWheel::drawWheelBackground (QPainter * painter, const QRectF & rect) [protected], [virtual]¶
Draw the Wheel's background gradient
Parameters:
rect Geometry for the wheel
bool QwtWheel::isInverted () const¶
Returns:
See also:
bool QwtWheel::isTracking () const¶
Returns:
See also:
void QwtWheel::keyPressEvent (QKeyEvent * event) [protected], [virtual]¶
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:
double QwtWheel::mass () const¶
Returns:
See also:
double QwtWheel::maximum () const¶
Returns:
See also:
double QwtWheel::minimum () const¶
Returns:
See also:
QSize QwtWheel::minimumSizeHint () const [protected], [virtual]¶
Returns:
Warning:
void QwtWheel::mouseMoveEvent (QMouseEvent * event) [protected], [virtual]¶
Mouse Move Event handler. Turn the wheel according to the mouse position
Parameters:
void QwtWheel::mousePressEvent (QMouseEvent * event) [protected], [virtual]¶
Mouse press event handler. Start movement of the wheel.
Parameters:
void QwtWheel::mouseReleaseEvent (QMouseEvent * event) [protected], [virtual]¶
Mouse Release Event handler. When the wheel has no mass the movement of the wheel stops, otherwise it starts flying.
Parameters:
Qt::Orientation QwtWheel::orientation () const¶
Returns:
See also:
int QwtWheel::pageStepCount () const¶
Returns:
See also:
void QwtWheel::paintEvent (QPaintEvent * event) [protected], [virtual]¶
Qt Paint Event.
Parameters:
void QwtWheel::setBorderWidth (int width)¶
Set the border width. The border defaults to 2.
Parameters:
See also:
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:
See also:
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:
See also:
void QwtWheel::setMaximum (double value)¶
Set the maximum value of the range
Parameters:
See also:
void QwtWheel::setMinimum (double value)¶
Set the minimum value of the range
Parameters:
See also:
Note:
void QwtWheel::setOrientation (Qt::Orientation orientation)¶
Set the wheel's orientation. The default orientation is Qt::Horizontal.
Parameters:
See also:
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:
See also:
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:
max Maximum value
See also:
void QwtWheel::setSingleStep (double stepSize)¶
Set the step size of the counter. A value <= 0.0 disables stepping
Parameters:
See also:
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.
Parameters:
See also:
void QwtWheel::setTickCount (int count)¶
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:
See also:
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:
See also:
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.
The wheelMoved() signal is emitted regardless id tracking is enabled or not.
Parameters:
See also:
void QwtWheel::setUpdateInterval (int interval)¶
Specify the update interval when the wheel is flying. Default and minimum value is 50 ms.
Parameters:
See also:
void QwtWheel::setValue (double value) [slot]¶
Set a new value without adjusting to the step raster.
Parameters:
See also:
Warning:
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:
See also:
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:
See also:
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.
Parameters:
See also:
void QwtWheel::setWrapping (bool on)¶
En/Disable wrapping. If wrapping is true stepping up from maximum() value will take you to the minimum() value and vice versa.
Parameters:
See also:
double QwtWheel::singleStep () const¶
Returns:
See also:
QSize QwtWheel::sizeHint () const [protected], [virtual]¶
Returns:
bool QwtWheel::stepAlignment () const¶
Returns:
See also:
int QwtWheel::tickCount () const¶
Returns:
See also:
void QwtWheel::timerEvent (QTimerEvent * event) [protected], [virtual]¶
Qt timer event. The flying wheel effect is implemented using a timer
Parameters:
See also:
double QwtWheel::totalAngle () const¶
Returns:
See also:
int QwtWheel::updateInterval () const¶
Returns:
See also:
double QwtWheel::value () const¶
Returns:
See also:
double QwtWheel::valueAt (const QPoint & pos) const [protected], [virtual]¶
Determine the value corresponding to a specified point
Parameters:
Returns:
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:
See also:
double QwtWheel::viewAngle () const¶
Returns:
See also:
int QwtWheel::wheelBorderWidth () const¶
Returns:
See also:
void QwtWheel::wheelEvent (QWheelEvent * event) [protected], [virtual]¶
Handle wheel events. In/Decrement the value
Parameters:
void QwtWheel::wheelMoved (double value) [signal]¶
This signal is emitted when the user moves the wheel with the mouse.
Parameters:
void QwtWheel::wheelPressed () [signal]¶
This signal is emitted when the user presses the the wheel with the mouse
QRect QwtWheel::wheelRect () const [protected]¶
Returns:
void QwtWheel::wheelReleased () [signal]¶
This signal is emitted when the user releases the mouse
int QwtWheel::wheelWidth () const¶
Returns:
See also:
bool QwtWheel::wrapping () const¶
Returns:
See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |