.TH "QwtWheel" 3 "Mon Aug 1 2011" "Version 5.2.2" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtWheel \- .PP The Wheel Widget. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBQwtAbstractSlider\fP. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBScrollMode\fP { \fBScrNone\fP, \fBScrMouse\fP, \fBScrTimer\fP, \fBScrDirect\fP, \fBScrPage\fP }" .br .in -1c .SS "Public Slots" .in +1c .ti -1c .RI "virtual void \fBfitValue\fP (double val)" .br .ti -1c .RI "virtual void \fBincValue\fP (int steps)" .br .ti -1c .RI "virtual void \fBsetReadOnly\fP (bool)" .br .ti -1c .RI "virtual void \fBsetValue\fP (double val)" .br .in -1c .SS "Signals" .in +1c .ti -1c .RI "void \fBsliderMoved\fP (double value)" .br .ti -1c .RI "void \fBsliderPressed\fP ()" .br .ti -1c .RI "void \fBsliderReleased\fP ()" .br .ti -1c .RI "void \fBvalueChanged\fP (double value)" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual void \fBincPages\fP (int)" .br .ti -1c .RI "int \fBinternalBorder\fP () const " .br .ti -1c .RI "bool \fBisReadOnly\fP () const " .br .ti -1c .RI "bool \fBisValid\fP () const " .br .ti -1c .RI "double \fBmass\fP () const " .br .ti -1c .RI "double \fBmaxValue\fP () const " .br .ti -1c .RI "virtual QSize \fBminimumSizeHint\fP () const " .br .ti -1c .RI "double \fBminValue\fP () const " .br .ti -1c .RI "Qt::Orientation \fBorientation\fP () const " .br .ti -1c .RI "int \fBpageSize\fP () const " .br .ti -1c .RI "bool \fBperiodic\fP () const " .br .ti -1c .RI "\fBQwtWheel\fP (QWidget *parent=NULL)" .br .ti -1c .RI "void \fBsetInternalBorder\fP (int width)" .br .ti -1c .RI "void \fBsetMass\fP (double val)" .br .ti -1c .RI "virtual void \fBsetOrientation\fP (Qt::Orientation)" .br .ti -1c .RI "void \fBsetPeriodic\fP (bool tf)" .br .ti -1c .RI "void \fBsetRange\fP (double vmin, double vmax, double vstep=0.0, int pagesize=1)" .br .ti -1c .RI "void \fBsetStep\fP (double)" .br .ti -1c .RI "void \fBsetTickCnt\fP (int cnt)" .br .ti -1c .RI "void \fBsetTotalAngle\fP (double angle)" .br .ti -1c .RI "void \fBsetTracking\fP (bool enable)" .br .ti -1c .RI "void \fBsetUpdateTime\fP (int t)" .br .ti -1c .RI "void \fBsetValid\fP (bool valid)" .br .ti -1c .RI "void \fBsetViewAngle\fP (double angle)" .br .ti -1c .RI "void \fBsetWheelWidth\fP (int w)" .br .ti -1c .RI "virtual QSize \fBsizeHint\fP () const " .br .ti -1c .RI "double \fBstep\fP () const " .br .ti -1c .RI "void \fBstopMoving\fP ()" .br .ti -1c .RI "int \fBtickCnt\fP () const " .br .ti -1c .RI "double \fBtotalAngle\fP () const " .br .ti -1c .RI "double \fBvalue\fP () const " .br .ti -1c .RI "double \fBviewAngle\fP () const " .br .ti -1c .RI "virtual \fB~QwtWheel\fP ()" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBdraw\fP (QPainter *, const QRect &)" .br .ti -1c .RI "void \fBdrawWheel\fP (QPainter *, const QRect &)" .br .ti -1c .RI "void \fBdrawWheelBackground\fP (QPainter *, const QRect &)" .br .ti -1c .RI "double \fBexactPrevValue\fP () const " .br .ti -1c .RI "double \fBexactValue\fP () const " .br .ti -1c .RI "virtual void \fBgetScrollMode\fP (const QPoint &, int &scrollMode, int &direction)" .br .ti -1c .RI "virtual double \fBgetValue\fP (const QPoint &)" .br .ti -1c .RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *e)" .br .ti -1c .RI "void \fBlayoutWheel\fP (bool update=true)" .br .ti -1c .RI "virtual void \fBmouseMoveEvent\fP (QMouseEvent *e)" .br .ti -1c .RI "double \fBmouseOffset\fP () const " .br .ti -1c .RI "virtual void \fBmousePressEvent\fP (QMouseEvent *e)" .br .ti -1c .RI "virtual void \fBmouseReleaseEvent\fP (QMouseEvent *e)" .br .ti -1c .RI "virtual void \fBpaintEvent\fP (QPaintEvent *e)" .br .ti -1c .RI "virtual void \fBpaletteChange\fP (const QPalette &)" .br .ti -1c .RI "double \fBprevValue\fP () const " .br .ti -1c .RI "virtual void \fBrangeChange\fP ()" .br .ti -1c .RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)" .br .ti -1c .RI "int \fBscrollMode\fP () const " .br .ti -1c .RI "void \fBsetColorArray\fP ()" .br .ti -1c .RI "void \fBsetMouseOffset\fP (double)" .br .ti -1c .RI "virtual void \fBsetPosition\fP (const QPoint &)" .br .ti -1c .RI "virtual void \fBstepChange\fP ()" .br .ti -1c .RI "virtual void \fBtimerEvent\fP (QTimerEvent *e)" .br .ti -1c .RI "virtual void \fBvalueChange\fP ()" .br .ti -1c .RI "virtual void \fBwheelEvent\fP (QWheelEvent *e)" .br .in -1c .SH "Detailed Description" .PP 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. .PP \fBSee also:\fP .RS 4 The radio example. .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtAbstractSlider::ScrollMode\fP\fC [inherited]\fP"Scroll mode .PP \fBSee also:\fP .RS 4 \fBgetScrollMode()\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "QwtWheel::QwtWheel (QWidget *parent = \fCNULL\fP)\fC [explicit]\fP" .PP Constructor. .SS "QwtWheel::~QwtWheel ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "void QwtWheel::draw (QPainter *painter, const QRect &)\fC [protected]\fP"Redraw panel and wheel .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .RE .PP .SS "void QwtWheel::drawWheel (QPainter *painter, const QRect &r)\fC [protected]\fP" .PP Redraw the wheel. \fBParameters:\fP .RS 4 \fIpainter\fP painter .br \fIr\fP contents rectangle .RE .PP .SS "void QwtWheel::drawWheelBackground (QPainter *painter, const QRect &r)\fC [protected]\fP"Draw the Wheel's background gradient .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIr\fP Bounding rectangle .RE .PP .SS "double QwtDoubleRange::exactPrevValue () const\fC [protected, inherited]\fP" .PP Returns the exact previous value. .SS "double QwtDoubleRange::exactValue () const\fC [protected, inherited]\fP" .PP Returns the exact value. The exact value is the value which \fBQwtDoubleRange::value\fP would return if the value were not adjusted to the step raster. It differs from the current value only if \fBQwtDoubleRange::fitValue\fP or \fBQwtDoubleRange::incValue\fP have been used before. This function is intended for internal use in derived classes. .SS "void QwtAbstractSlider::fitValue (doublevalue)\fC [virtual, slot, inherited]\fP" .PP Set the slider's value to the nearest integer multiple of the step size. \fBParameters:\fP .RS 4 \fIvalue\fP Value .RE .PP \fBSee also:\fP .RS 4 \fBsetValue()\fP, \fBincValue()\fP .RE .PP .PP Reimplemented from \fBQwtDoubleRange\fP. .SS "void QwtWheel::getScrollMode (const QPoint &p, int &scrollMode, int &direction)\fC [protected, virtual]\fP" .PP Determine the scrolling mode and direction corresponding to a specified point. \fBParameters:\fP .RS 4 \fIp\fP point .br \fIscrollMode\fP scrolling mode .br \fIdirection\fP direction .RE .PP .PP Implements \fBQwtAbstractSlider\fP. .SS "double QwtWheel::getValue (const QPoint &p)\fC [protected, virtual]\fP" .PP Determine the value corresponding to a specified point. .PP Implements \fBQwtAbstractSlider\fP. .SS "void QwtDoubleRange::incPages (intnPages)\fC [virtual, inherited]\fP" .PP Increment the value by a specified number of pages. \fBParameters:\fP .RS 4 \fInPages\fP Number of pages to increment. A negative number decrements the value. .RE .PP \fBWarning:\fP .RS 4 The Page size is specified in the constructor. .RE .PP .SS "void QwtAbstractSlider::incValue (intsteps)\fC [virtual, slot, inherited]\fP" .PP Increment the value by a specified number of steps. \fBParameters:\fP .RS 4 \fIsteps\fP number of steps .RE .PP \fBSee also:\fP .RS 4 \fBsetValue()\fP .RE .PP .PP Reimplemented from \fBQwtDoubleRange\fP. .SS "int QwtWheel::internalBorder () const"\fBReturns:\fP .RS 4 Internal border width of the wheel. .RE .PP \fBSee also:\fP .RS 4 \fBsetInternalBorder()\fP .RE .PP .SS "bool QwtAbstractSlider::isReadOnly () const\fC [inherited]\fP"In read only mode the slider can't be controlled by mouse or keyboard. .PP \fBReturns:\fP .RS 4 true if read only .RE .PP \fBSee also:\fP .RS 4 \fBsetReadOnly()\fP .RE .PP .SS "bool QwtAbstractSlider::isValid () const\fC [inline, inherited]\fP"\fBSee also:\fP .RS 4 QwtDblRange::isValid() .RE .PP .PP Reimplemented from \fBQwtDoubleRange\fP. .SS "void QwtAbstractSlider::keyPressEvent (QKeyEvent *e)\fC [protected, virtual, inherited]\fP"Handles key events .PP .IP "\(bu" 2 Key_Down, KeyLeft .br Decrement by 1 .IP "\(bu" 2 Key_Up, Key_Right .br Increment by 1 .PP .PP \fBParameters:\fP .RS 4 \fIe\fP Key event .RE .PP \fBSee also:\fP .RS 4 \fBisReadOnly()\fP .RE .PP .PP Reimplemented in \fBQwtCompass\fP, and \fBQwtDial\fP. .SS "void QwtWheel::layoutWheel (boolupdate = \fCtrue\fP)\fC [protected]\fP" .PP Recalculate the slider's geometry and layout based on. .SS "double QwtWheel::mass () const\fC [virtual]\fP"\fBReturns:\fP .RS 4 mass .RE .PP .PP Reimplemented from \fBQwtAbstractSlider\fP. .SS "double QwtDoubleRange::maxValue () const\fC [inherited]\fP" .PP Returns the value of the second border of the range. maxValue returns the value which has been specified as the second parameter in \fBQwtDoubleRange::setRange\fP. .PP \fBSee also:\fP .RS 4 \fBsetRange()\fP .RE .PP .SS "QSize QwtWheel::minimumSizeHint () const\fC [virtual]\fP" .PP Return a minimum size hint. \fBWarning:\fP .RS 4 The return value is based on the wheel width. .RE .PP .SS "double QwtDoubleRange::minValue () const\fC [inherited]\fP" .PP Returns the value at the first border of the range. minValue returns the value which has been specified as the first parameter in \fBsetRange()\fP. .PP \fBSee also:\fP .RS 4 \fBsetRange()\fP .RE .PP .SS "void QwtAbstractSlider::mouseMoveEvent (QMouseEvent *e)\fC [protected, virtual, inherited]\fP"Mouse Move Event handler .PP \fBParameters:\fP .RS 4 \fIe\fP Mouse event .RE .PP .SS "void QwtAbstractSlider::mousePressEvent (QMouseEvent *e)\fC [protected, virtual, inherited]\fP"Mouse press event handler .PP \fBParameters:\fP .RS 4 \fIe\fP Mouse event .RE .PP .SS "void QwtAbstractSlider::mouseReleaseEvent (QMouseEvent *e)\fC [protected, virtual, inherited]\fP"Mouse Release Event handler .PP \fBParameters:\fP .RS 4 \fIe\fP Mouse event .RE .PP .SS "Qt::Orientation QwtAbstractSlider::orientation () const\fC [inherited]\fP"\fBReturns:\fP .RS 4 Orientation .RE .PP \fBSee also:\fP .RS 4 \fBsetOrientation()\fP .RE .PP .SS "int QwtDoubleRange::pageSize () const\fC [inherited]\fP" .PP Returns the page size in steps. .SS "void QwtWheel::paintEvent (QPaintEvent *e)\fC [protected, virtual]\fP" .PP Qt Paint Event. .SS "void QwtWheel::paletteChange (const QPalette &)\fC [protected, virtual]\fP" .PP Call update() when the palette changes. .SS "bool QwtDoubleRange::periodic () const\fC [inherited]\fP" .PP Returns true if the range is periodic. \fBSee also:\fP .RS 4 \fBsetPeriodic()\fP .RE .PP .SS "double QwtDoubleRange::prevValue () const\fC [protected, inherited]\fP" .PP Returns the previous value. .SS "void QwtDoubleRange::rangeChange ()\fC [protected, virtual, inherited]\fP" .PP Notify a change of the range. This virtual function is called whenever the range changes. The default implementation does nothing. .PP Reimplemented in \fBQwtCounter\fP, \fBQwtDial\fP, and \fBQwtSlider\fP. .SS "void QwtWheel::resizeEvent (QResizeEvent *e)\fC [protected, virtual]\fP" .PP Qt Resize Event. .SS "void QwtWheel::setColorArray ()\fC [protected]\fP" .PP Set up the color array for the background pixmap. .SS "void QwtWheel::setInternalBorder (intw)" .PP Set the internal border width of the wheel. The internal 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. .PP The internal border defaults to 2. .PP \fBParameters:\fP .RS 4 \fIw\fP border width .RE .PP \fBSee also:\fP .RS 4 \fBinternalBorder()\fP .RE .PP .SS "void QwtWheel::setMass (doubleval)\fC [virtual]\fP" .PP Set the mass of the wheel. Assigning a mass turns the wheel into a flywheel. .PP \fBParameters:\fP .RS 4 \fIval\fP the wheel's mass .RE .PP .PP Reimplemented from \fBQwtAbstractSlider\fP. .SS "void QwtWheel::setOrientation (Qt::Orientationo)\fC [virtual]\fP" .PP Set the wheel's orientation. \fBParameters:\fP .RS 4 \fIo\fP Orientation. Allowed values are Qt::Horizontal and Qt::Vertical. Defaults to Qt::Horizontal. .RE .PP \fBSee also:\fP .RS 4 \fBQwtAbstractSlider::orientation()\fP .RE .PP .PP Reimplemented from \fBQwtAbstractSlider\fP. .SS "void QwtDoubleRange::setPeriodic (booltf)\fC [inherited]\fP" .PP Make the range periodic. When the range is periodic, the value will be set to a point inside the interval such that .PP .PP .nf point = value + n * width .fi .PP .PP if the user tries to set a new value which is outside the range. If the range is nonperiodic (the default), values outside the range will be clipped. .PP \fBParameters:\fP .RS 4 \fItf\fP true for a periodic range .RE .PP .SS "void QwtAbstractSlider::setPosition (const QPoint &p)\fC [protected, virtual, inherited]\fP"Move the slider to a specified point, adjust the value and emit signals if necessary. .SS "void QwtDoubleRange::setRange (doublevmin, doublevmax, doublevstep = \fC0.0\fP, intpageSize = \fC1\fP)\fC [inherited]\fP" .PP Specify range and step size. \fBParameters:\fP .RS 4 \fIvmin\fP lower boundary of the interval .br \fIvmax\fP higher boundary of the interval .br \fIvstep\fP step width .br \fIpageSize\fP page size in steps .RE .PP \fBWarning:\fP .RS 4 .PD 0 .IP "\(bu" 2 A change of the range changes the value if it lies outside the new range. The current value will *not* be adjusted to the new step raster. .IP "\(bu" 2 vmax < vmin is allowed. .IP "\(bu" 2 If the step size is left out or set to zero, it will be set to 1/100 of the interval length. .IP "\(bu" 2 If the step size has an absurd value, it will be corrected to a better one. .PP .RE .PP .SS "void QwtAbstractSlider::setReadOnly (boolreadOnly)\fC [virtual, slot, inherited]\fP"En/Disable read only mode .PP In read only mode the slider can't be controlled by mouse or keyboard. .PP \fBParameters:\fP .RS 4 \fIreadOnly\fP Enables in case of true .RE .PP \fBSee also:\fP .RS 4 \fBisReadOnly()\fP .RE .PP .SS "void QwtDoubleRange::setStep (doublevstep)\fC [inherited]\fP" .PP Change the step raster. \fBParameters:\fP .RS 4 \fIvstep\fP new step width .RE .PP \fBWarning:\fP .RS 4 The value will \fInot\fP be adjusted to the new step raster. .RE .PP .PP Reimplemented in \fBQwtCounter\fP. .SS "void QwtWheel::setTickCnt (intcnt)" .PP 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. .PP \fBParameters:\fP .RS 4 \fIcnt\fP Number of grooves per 360 degrees .RE .PP \fBSee also:\fP .RS 4 \fBtickCnt()\fP .RE .PP .SS "void QwtWheel::setTotalAngle (doubleangle)" .PP 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. .PP The default setting of the total angle is 360 degrees. .PP \fBParameters:\fP .RS 4 \fIangle\fP total angle in degrees .RE .PP \fBSee also:\fP .RS 4 \fBtotalAngle()\fP .RE .PP .SS "void QwtAbstractSlider::setTracking (boolenable)\fC [inherited]\fP" .PP Enables or disables tracking. If tracking is enabled, the slider emits a \fBvalueChanged()\fP signal whenever its value changes (the default behaviour). If tracking is disabled, the value changed() signal will only be emitted if: .PD 0 .IP "\(bu" 2 the user releases the mouse button and the value has changed or .IP "\(bu" 2 at the end of automatic scrolling. .PP Tracking is enabled by default. .PP \fBParameters:\fP .RS 4 \fIenable\fP \fCtrue\fP (enable) or \fCfalse\fP (disable) tracking. .RE .PP .SS "void QwtAbstractSlider::setUpdateTime (intt)\fC [inherited]\fP" .PP Specify the update interval for automatic scrolling. \fBParameters:\fP .RS 4 \fIt\fP update interval in milliseconds .RE .PP \fBSee also:\fP .RS 4 \fBgetScrollMode()\fP .RE .PP .SS "void QwtAbstractSlider::setValid (boolvalid)\fC [inline, inherited]\fP"\fBParameters:\fP .RS 4 \fIvalid\fP true/false .RE .PP \fBSee also:\fP .RS 4 QwtDblRange::isValid() .RE .PP .PP Reimplemented from \fBQwtDoubleRange\fP. .SS "void QwtAbstractSlider::setValue (doubleval)\fC [virtual, slot, inherited]\fP" .PP Move the slider to a specified value. This function can be used to move the slider to a value which is not an integer multiple of the step size. .PP \fBParameters:\fP .RS 4 \fIval\fP new value .RE .PP \fBSee also:\fP .RS 4 \fBfitValue()\fP .RE .PP .PP Reimplemented from \fBQwtDoubleRange\fP. .SS "void QwtWheel::setViewAngle (doubleangle)" .PP 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. .PP \fBParameters:\fP .RS 4 \fIangle\fP Visible angle in degrees .RE .PP \fBSee also:\fP .RS 4 \fBviewAngle()\fP, \fBsetTotalAngle()\fP .RE .PP .SS "void QwtWheel::setWheelWidth (intw)" .PP Set the width of the wheel. Corresponds to the wheel height for horizontal orientation, and the wheel width for vertical orientation. .PP \fBParameters:\fP .RS 4 \fIw\fP the wheel's width .RE .PP .SS "QSize QwtWheel::sizeHint () const\fC [virtual]\fP"\fBReturns:\fP .RS 4 a size hint .RE .PP .SS "void QwtAbstractSlider::sliderMoved (doublevalue)\fC [signal, inherited]\fP"This signal is emitted when the user moves the slider with the mouse. .PP \fBParameters:\fP .RS 4 \fIvalue\fP new value .RE .PP .SS "void QwtAbstractSlider::sliderPressed ()\fC [signal, inherited]\fP"This signal is emitted when the user presses the movable part of the slider (start ScrMouse Mode). .SS "void QwtAbstractSlider::sliderReleased ()\fC [signal, inherited]\fP"This signal is emitted when the user releases the movable part of the slider. .SS "double QwtDoubleRange::step () const\fC [inherited]\fP"\fBReturns:\fP .RS 4 the step size .RE .PP \fBSee also:\fP .RS 4 \fBsetStep()\fP, \fBsetRange()\fP .RE .PP .PP Reimplemented in \fBQwtCounter\fP. .SS "void QwtDoubleRange::stepChange ()\fC [protected, virtual, inherited]\fP" .PP Notify a change of the step size. This virtual function is called whenever the step size changes. The default implementation does nothing. .SS "void QwtAbstractSlider::stopMoving ()\fC [inherited]\fP" .PP Stop updating if automatic scrolling is active. .SS "int QwtWheel::tickCnt () const"\fBReturns:\fP .RS 4 Number of grooves in the wheel's surface. .RE .PP \fBSee also:\fP .RS 4 \fBsetTickCnt()\fP .RE .PP .SS "void QwtAbstractSlider::timerEvent (QTimerEvent *e)\fC [protected, virtual, inherited]\fP"Qt timer event .PP \fBParameters:\fP .RS 4 \fIe\fP Timer event .RE .PP .SS "double QwtWheel::totalAngle () const"\fBReturns:\fP .RS 4 Total angle which the wheel can be turned. .RE .PP \fBSee also:\fP .RS 4 \fBsetTotalAngle()\fP .RE .PP .SS "double QwtDoubleRange::value () const\fC [inherited]\fP" .PP Returns the current value. .PP Reimplemented in \fBQwtCounter\fP. .SS "void QwtWheel::valueChange ()\fC [protected, virtual]\fP" .PP Notify value change. .PP Reimplemented from \fBQwtAbstractSlider\fP. .SS "void QwtAbstractSlider::valueChanged (doublevalue)\fC [signal, inherited]\fP" .PP Notify a change of value. In the default setting (tracking enabled), this signal will be emitted every time the value changes ( see \fBsetTracking()\fP ). .PP \fBParameters:\fP .RS 4 \fIvalue\fP new value .RE .PP .SS "double QwtWheel::viewAngle () const"\fBReturns:\fP .RS 4 Visible portion of the wheel .RE .PP \fBSee also:\fP .RS 4 \fBsetViewAngle()\fP, \fBtotalAngle()\fP .RE .PP .SS "void QwtAbstractSlider::wheelEvent (QWheelEvent *e)\fC [protected, virtual, inherited]\fP"Wheel Event handler .PP \fBParameters:\fP .RS 4 \fIe\fP Whell event .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.