logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtWheel - The Wheel Widget.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                                      QwtWheel(3)

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]

       Seealso:
           The radio example.

Member Function Documentation

intQwtWheel::borderWidth()constReturns:
           Border width

       Seealso:setBorderWidth()voidQwtWheel::drawTicks(QPainter*painter,constQRectF&rect)[protected],[virtual]
       Draw the Wheel's ticks

       Parameters:painter Painter
           rect Geometry for the wheel

   voidQwtWheel::drawWheelBackground(QPainter*painter,constQRectF&rect)[protected],[virtual]
       Draw the Wheel's background gradient

       Parameters:painter Painter
           rect Geometry for the wheel

   boolQwtWheel::isInverted()constReturns:
           True, when the wheel is inverted

       Seealso:setInverted()boolQwtWheel::isTracking()constReturns:
           True, when tracking is enabled

       Seealso:setTracking(), valueChanged(), wheelMoved()voidQwtWheel::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:event Key event

   doubleQwtWheel::mass()constReturns:
           mass

       Seealso:setMass()doubleQwtWheel::maximum()constReturns:
           The maximum of the range

       Seealso:setRange(), setMaximum(), minimum()doubleQwtWheel::minimum()constReturns:
           The minimum of the range

       Seealso:setRange(), setMinimum(), maximum()QSizeQwtWheel::minimumSizeHint()const[protected],[virtual]Returns:
           Minimum size hint

       Warning:
           The return value is based on the wheel width.

   voidQwtWheel::mouseMoveEvent(QMouseEvent*event)[protected],[virtual]
       Mouse Move Event handler. Turn the wheel according to the mouse position

       Parameters:event Mouse event

   voidQwtWheel::mousePressEvent(QMouseEvent*event)[protected],[virtual]
       Mouse press event handler. Start movement of the wheel.

       Parameters:event Mouse event

   voidQwtWheel::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:event Mouse event

   Qt::OrientationQwtWheel::orientation()constReturns:
           Orientation

       Seealso:setOrientation()intQwtWheel::pageStepCount()constReturns:
           Page step count

       Seealso:setPageStepCount(), singleStep()voidQwtWheel::paintEvent(QPaintEvent*event)[protected],[virtual]
       Qt Paint Event.

       Parameters:event Paint event

   voidQwtWheel::setBorderWidth(intwidth)
       Set the border width. The border defaults to 2.

       Parameters:width Border width

       Seealso:borderWidth()voidQwtWheel::setInverted(boolon)
       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

       Seealso:isInverted()voidQwtWheel::setMass(doublemass)[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

       Seealso:mass()voidQwtWheel::setMaximum(doublevalue)
       Set the maximum value of the range

       Parameters:value Maximum value

       Seealso:setRange(), setMinimum(), maximum()voidQwtWheel::setMinimum(doublevalue)
       Set the minimum value of the range

       Parameters:value Minimum value

       Seealso:setRange(), setMaximum(), minimum()Note:
           The maximum is adjusted if necessary to ensure that the range remains valid.

   voidQwtWheel::setOrientation(Qt::Orientationorientation)
       Set the wheel's orientation. The default orientation is Qt::Horizontal.

       Parameters:orientation Qt::Horizontal or Qt::Vertical.

       Seealso:orientation()voidQwtWheel::setPageStepCount(intcount)
       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

       Seealso:pageStepCount(), setSingleStep()voidQwtWheel::setRange(doublemin,doublemax)
       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 value
           max Maximum value

       Seealso:minimum(), maximum()voidQwtWheel::setSingleStep(doublestepSize)
       Set the step size of the counter. A value <= 0.0 disables stepping

       Parameters:stepSize Single step size

       Seealso:singleStep(), setPageStepCount()voidQwtWheel::setStepAlignment(boolon)
       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:on On/Off

       Seealso:stepAlignment(), setSingleStep()voidQwtWheel::setTickCount(intcount)
       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

       Seealso:tickCount()voidQwtWheel::setTotalAngle(doubleangle)[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

       Seealso:totalAngle()voidQwtWheel::setTracking(boolenable)
       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:enable On/Off

       Seealso:isTracking()voidQwtWheel::setUpdateInterval(intinterval)
       Specify the update interval when the wheel is flying. Default and minimum value is 50 ms.

       Parameters:interval Interval in milliseconds

       Seealso:updateInterval(), setMass(), setTracking()voidQwtWheel::setValue(doublevalue)[slot]
       Set a new value without adjusting to the step raster.

       Parameters:value New value

       Seealso:value(), valueChanged()Warning:
           The value is clipped when it lies outside the range.

   voidQwtWheel::setViewAngle(doubleangle)[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

       Seealso:viewAngle(), setTotalAngle()voidQwtWheel::setWheelBorderWidth(intborderWidth)
       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

       Seealso:
           internalBorder()

   voidQwtWheel::setWheelWidth(intwidth)
       Set  the  width  of  the wheel. Corresponds to the wheel height for horizontal orientation, and the wheel
       width for vertical orientation.

       Parameters:width the wheel's width

       Seealso:wheelWidth()voidQwtWheel::setWrapping(boolon)
       En/Disable wrapping. If wrapping is true stepping up from maximum() value will take you to the  minimum()
       value and vice versa.

       Parameters:on En/Disable wrapping

       Seealso:wrapping()doubleQwtWheel::singleStep()constReturns:
           Single step size

       Seealso:setSingleStep()QSizeQwtWheel::sizeHint()const[protected],[virtual]Returns:
           a size hint

   boolQwtWheel::stepAlignment()constReturns:
           True, when the step alignment is enabled

       Seealso:setStepAlignment(), singleStep()intQwtWheel::tickCount()constReturns:
           Number of grooves in the wheel's surface.

       Seealso:
           setTickCnt()

   voidQwtWheel::timerEvent(QTimerEvent*event)[protected],[virtual]
       Qt timer event. The flying wheel effect is implemented using a timer

       Parameters:event Timer event

       Seealso:updateInterval()doubleQwtWheel::totalAngle()constReturns:
           Total angle which the wheel can be turned.

       Seealso:setTotalAngle()intQwtWheel::updateInterval()constReturns:
           Update interval when the wheel is flying

       Seealso:setUpdateInterval(), mass(), isTracking()doubleQwtWheel::value()constReturns:
           Current value of the wheel

       Seealso:setValue(), valueChanged()doubleQwtWheel::valueAt(constQPoint&pos)const[protected],[virtual]
       Determine the value corresponding to a specified point

       Parameters:pos Position

       Returns:
           Value corresponding to pos

   voidQwtWheel::valueChanged(doublevalue)[signal]
       Notify  a  change  of  value.  When  tracking is enabled this signal will be emitted every time the value
       changes.

       Parameters:value new value

       Seealso:setTracking()doubleQwtWheel::viewAngle()constReturns:
           Visible portion of the wheel

       Seealso:setViewAngle(), totalAngle()intQwtWheel::wheelBorderWidth()constReturns:
           Wheel border width

       Seealso:setWheelBorderWidth()voidQwtWheel::wheelEvent(QWheelEvent*event)[protected],[virtual]
       Handle wheel events. In/Decrement the value

       Parameters:event Wheel event

   voidQwtWheel::wheelMoved(doublevalue)[signal]
       This signal is emitted when the user moves the wheel with the mouse.

       Parameters:value new value

   voidQwtWheel::wheelPressed()[signal]
       This signal is emitted when the user presses the the wheel with the mouse

   QRectQwtWheel::wheelRect()const[protected]Returns:
           Rectangle of the wheel without the outer border

   voidQwtWheel::wheelReleased()[signal]
       This signal is emitted when the user releases the mouse

   intQwtWheel::wheelWidth()constReturns:
           Width of the wheel

       Seealso:setWheelWidth()boolQwtWheel::wrapping()constReturns:
           True, when wrapping is set

       Seealso:setWrapping()

Name

       QwtWheel - The Wheel Widget.

Synopsis

       #include <qwt_wheel.h>

       Inherits QWidget.

   PublicSlots
       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)

   PublicMemberFunctionsQwtWheel (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

   ProtectedMemberFunctions
       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

See Also