Inherits QwtSliderBase.
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.
See also:
Definition at line 25 of file qwt_wheel.h.
QwtWheel (QWidget *parent=0, const char *name=0)
virtual ~QwtWheel ()
virtual void setOrientation (Qt::Orientation)
double totalAngle () const
double viewAngle () const
int tickCnt () const
int internalBorder () const
double mass () const
void setTotalAngle (double angle)
void setTickCnt (int cnt)
void setViewAngle (double angle)
void setInternalBorder (int width)
void setMass (double val)
void setWheelWidth (int w)
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual QSizePolicy sizePolicy () const
virtual void resizeEvent (QResizeEvent *e)
virtual void paintEvent (QPaintEvent *e)
void layoutWheel (bool update=TRUE)
void draw (QPainter *p, const QRect &update_rect)
void drawWheel (QPainter *p, const QRect &r)
void drawWheelBackground (QPainter *p, const QRect &r)
void setColorArray ()
virtual void valueChange ()
virtual void paletteChange (const QPalette &)
virtual double getValue (const QPoint &p)
virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)
Constructor.
Definition at line 20 of file qwt_wheel.cpp.
References QwtSliderBase::setUpdateTime().
Destructor.
Definition at line 37 of file qwt_wheel.cpp.
Redraw panel and wheel.
Definition at line 437 of file qwt_wheel.cpp.
References drawWheel().
Redraw the wheel.
Parameters:
Definition at line 265 of file qwt_wheel.cpp.
References drawWheelBackground(), QwtDblRange::maxValue(), QwtDblRange::minValue(), QwtSliderBase::orientation(), and QwtDblRange::value().
Draw the Wheel's background gradient.
Definition at line 123 of file qwt_wheel.cpp.
References QwtSliderBase::orientation(), and setColorArray().
Determine the scrolling mode and direction corresponding to a specified point.
Parameters:
Implements QwtSliderBase.
Definition at line 481 of file qwt_wheel.cpp.
Determine the value corresponding to a specified point.
Implements QwtSliderBase.
Definition at line 372 of file qwt_wheel.cpp.
References QwtDblRange::maxValue(), QwtDblRange::minValue(), and QwtSliderBase::orientation().
Recalculate the slider's geometry and layout based on.
Definition at line 411 of file qwt_wheel.cpp.
Referenced by resizeEvent(), setInternalBorder(), setOrientation(), and setWheelWidth().
Returns:
Reimplemented from QwtSliderBase.
Definition at line 97 of file qwt_wheel.cpp.
References QwtSliderBase::mass().
Return a minimum size hint.
Warning:
Definition at line 548 of file qwt_wheel.cpp.
References QwtSliderBase::orientation().
Qt Paint Event.
Definition at line 425 of file qwt_wheel.cpp.
References draw(), and QwtPaintBuffer::painter().
Call update() when the palette changes.
Definition at line 560 of file qwt_wheel.cpp.
Qt Resize Event.
Definition at line 402 of file qwt_wheel.cpp.
Set up the color array for the background pixmap.
Definition at line 45 of file qwt_wheel.cpp.
Referenced by drawWheelBackground().
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.
The internal border defaults to 2.
Parameters:
Definition at line 114 of file qwt_wheel.cpp.
Set the mass of the wheel.
Assigning a mass turns the wheel into a flywheel.
Parameters:
Reimplemented from QwtSliderBase.
Definition at line 497 of file qwt_wheel.cpp.
References QwtSliderBase::setMass().
Set the wheel's orientation.
Parameters:
See also:
Definition at line 237 of file qwt_wheel.cpp.
References layoutWheel(), QwtSliderBase::orientation(), and QwtSliderBase::setOrientation().
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.
Parameters:
Definition at line 88 of file qwt_wheel.cpp.
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:
Definition at line 224 of file qwt_wheel.cpp.
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:
Definition at line 254 of file qwt_wheel.cpp.
Set the width of the wheel.
Corresponds to the wheel height for horizontal orientation, and the wheel width for vertical orientation.
Parameters:
Definition at line 509 of file qwt_wheel.cpp.
Returns:
Definition at line 539 of file qwt_wheel.cpp.
Returns:
Definition at line 520 of file qwt_wheel.cpp.
References QwtSliderBase::orientation().
Notify value change.
Reimplemented from QwtSliderBase.
Definition at line 467 of file qwt_wheel.cpp.
References QwtSliderBase::valueChange().
Generated automatically by Doxygen for Qwt User's Guide from the source code.