Inherits QwtSliderBase, and QwtScaleIf.
The Knob Widget.
The QwtKnob widget imitates look and behaviour of a volume knob on a radio. It contains a scale around the knob which is set up automatically or can be configured manually (see QwtScaleIf). Automatic scrolling is enabled when the user presses a mouse button on the scale. For a description of signals, slots and other members, see QwtSliderBase.
See also:
Definition at line 32 of file qwt_knob.h.
QwtKnob (QWidget *parent=0, const char *name=0)
virtual ~QwtKnob ()
void setKnobWidth (int w)
void setTotalAngle (double angle)
void setBorderWidth (int bw)
int knobWidth () const
double totalAngle () const
int borderWidth () const
void setSymbol (Symbol)
Symbol symbol () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)
void draw (QPainter *p, const QRect &ur)
void drawKnob (QPainter *p, const QRect &r)
void drawMarker (QPainter *p, double arc, const QColor &c)
Symbol
See also:
Definition at line 47 of file qwt_knob.h.
Constructor.
Parameters:
Definition at line 23 of file qwt_knob.cpp.
References QwtScaleIf::scaleDraw(), QwtScaleDraw::setGeometry(), setTotalAngle(), and QwtSliderBase::setUpdateTime().
Destructor.
Definition at line 49 of file qwt_knob.cpp.
Return the border width.
Definition at line 61 of file qwt_knob.h.
Repaint the knob.
Definition at line 275 of file qwt_knob.cpp.
References QwtScaleDraw::draw(), drawKnob(), and QwtScaleIf::scaleDraw().
Draw the knob.
Parameters:
Definition at line 99 of file qwt_knob.cpp.
References drawMarker(), and QwtSliderBase::isValid().
Draw the marker at the knob's front.
Parameters:
Definition at line 301 of file qwt_knob.cpp.
Return the width of the knob.
Definition at line 57 of file qwt_knob.h.
Return a minimum size hint.
Warning:
Definition at line 424 of file qwt_knob.cpp.
References QwtScaleDraw::minHeight(), and QwtScaleIf::scaleDraw().
Repaint the knob.
Definition at line 262 of file qwt_knob.cpp.
References draw(), and QwtPaintBuffer::painter().
Qt Resize Event.
Definition at line 228 of file qwt_knob.cpp.
Set the knob's border width.
Parameters:
Definition at line 360 of file qwt_knob.cpp.
Change the knob's width.
The specified width must be >= 5, or it will be clipped.
Parameters:
Definition at line 350 of file qwt_knob.cpp.
Set the symbol of the knob.
See also:
Definition at line 57 of file qwt_knob.cpp.
Set the total angle by which the knob can be turned.
Parameters:
The default angle is 270 degrees. It is possible to specify an angle of more than 360 degrees so that the knob can be turned several times around its axis. Definition at line 83 of file qwt_knob.cpp.
References QwtScaleIf::scaleDraw(), and QwtScaleDraw::setAngleRange().
Returns:
Definition at line 414 of file qwt_knob.cpp.
Returns:
See also:
Definition at line 70 of file qwt_knob.cpp.
Return the total angle.
Definition at line 59 of file qwt_knob.h.
Generated automatically by Doxygen for Qwt User's Guide from the source code.