Qwt User's Guide
6.0.2
|
#include <qwt_wheel.h>
Public Slots | |
void | setTotalAngle (double) |
void | setViewAngle (double) |
![]() | |
virtual void | fitValue (double val) |
virtual void | incValue (int steps) |
virtual void | setReadOnly (bool) |
virtual void | setValue (double val) |
Public Member Functions | |
QwtWheel (QWidget *parent=NULL) | |
virtual | ~QwtWheel () |
int | borderWidth () const |
double | mass () const |
virtual QSize | minimumSizeHint () const |
void | setBorderWidth (int) |
void | setMass (double) |
virtual void | setOrientation (Qt::Orientation) |
void | setTickCnt (int) |
void | setWheelBorderWidth (int) |
void | setWheelWidth (int) |
virtual QSize | sizeHint () const |
int | tickCnt () const |
double | totalAngle () const |
double | viewAngle () const |
int | wheelBorderWidth () const |
QRect | wheelRect () const |
int | wheelWidth () const |
![]() | |
QwtAbstractSlider (Qt::Orientation, QWidget *parent=NULL) | |
virtual | ~QwtAbstractSlider () |
bool | isReadOnly () const |
bool | isValid () const |
Qt::Orientation | orientation () const |
void | setTracking (bool enable) |
void | setUpdateTime (int t) |
void | setValid (bool valid) |
void | stopMoving () |
![]() | |
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 |
Protected Member Functions | |
virtual void | drawTicks (QPainter *, const QRectF &) |
virtual void | drawWheelBackground (QPainter *, const QRectF &) |
virtual void | getScrollMode (const QPoint &, QwtAbstractSlider::ScrollMode &, int &direction) const |
virtual double | getValue (const QPoint &) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | valueChange () |
![]() | |
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) |
![]() | |
double | exactPrevValue () const |
double | exactValue () const |
double | prevValue () const |
virtual void | rangeChange () |
virtual void | stepChange () |
Additional Inherited Members | |
![]() | |
enum | ScrollMode { ScrNone, ScrMouse, ScrTimer, ScrDirect, ScrPage } |
![]() | |
void | sliderMoved (double value) |
void | sliderPressed () |
void | sliderReleased () |
void | valueChanged (double value) |
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 flywheel.
int QwtWheel::borderWidth | ( | ) | const |
|
protectedvirtual |
Draw the Wheel's ticks
painter | Painter |
rect | Rectangle for the wheel |
|
protectedvirtual |
Draw the Wheel's background gradient
painter | Painter |
rect | Rectangle for the wheel |
|
protectedvirtual |
Determine the scrolling mode and direction corresponding to a specified point.
p | point |
scrollMode | scrolling mode |
direction | direction |
Implements QwtAbstractSlider.
|
virtual |
Reimplemented from QwtAbstractSlider.
|
virtual |
Return a minimum size hint.
|
protectedvirtual |
Qt Paint Event.
event | Paint event |
|
protectedvirtual |
Qt Resize Event.
event | Resize event |
void QwtWheel::setBorderWidth | ( | int | width | ) |
Set the border width.
The border defaults to 2.
width | Border width |
|
virtual |
Set the mass of the wheel.
Assigning a mass turns the wheel into a flywheel.
mass | The wheel's mass |
Reimplemented from QwtAbstractSlider.
|
virtual |
Set the wheel's orientation.
o | Orientation. Allowed values are Qt::Horizontal and Qt::Vertical. Defaults to Qt::Horizontal. |
Reimplemented from QwtAbstractSlider.
void QwtWheel::setTickCnt | ( | int | cnt | ) |
Adjust the number of grooves in the wheel's surface.
The number of grooves is limited to 6 <= cnt <= 50. Values outside this range will be clipped. The default value is 10.
cnt | Number of grooves per 360 degrees |
|
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.
angle | total angle in degrees |
|
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.
angle | Visible angle in degrees |
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.
borderWidth | Border width |
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.
width | the wheel's width |
|
virtual |
int QwtWheel::tickCnt | ( | ) | const |
double QwtWheel::totalAngle | ( | ) | const |
double QwtWheel::viewAngle | ( | ) | const |
int QwtWheel::wheelBorderWidth | ( | ) | const |
QRect QwtWheel::wheelRect | ( | ) | const |
int QwtWheel::wheelWidth | ( | ) | const |