1
.TH "QwtKnob" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtAbstractSlider\fP, and \fBQwtAbstractScale\fP.
11
.SH "Detailed Description"
15
The \fBQwtKnob\fP 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 \fBQwtAbstractScale\fP). Automatic scrolling is enabled when the user presses a mouse button on the scale. For a description of signals, slots and other members, see \fBQwtAbstractSlider\fP.
21
\fBQwtAbstractSlider\fP and \fBQwtAbstractScale\fP for the descriptions of the inherited members.
26
Definition at line 34 of file qwt_knob.h.
31
.RI "enum \fBSymbol\fP { \fBLine\fP, \fBDot\fP }"
34
.SS "Public Member Functions"
38
.RI "\fBQwtKnob\fP (QWidget *parent=NULL)"
41
.RI "virtual \fB~QwtKnob\fP ()"
44
.RI "void \fBsetKnobWidth\fP (int w)"
47
.RI "int \fBknobWidth\fP () const"
50
.RI "void \fBsetTotalAngle\fP (double angle)"
53
.RI "double \fBtotalAngle\fP () const"
56
.RI "void \fBsetBorderWidth\fP (int bw)"
59
.RI "int \fBborderWidth\fP () const"
62
.RI "void \fBsetSymbol\fP (\fBSymbol\fP)"
65
.RI "\fBSymbol\fP \fBsymbol\fP () const"
68
.RI "virtual QSize \fBsizeHint\fP () const"
71
.RI "virtual QSize \fBminimumSizeHint\fP () const"
74
.RI "void \fBsetScaleDraw\fP (\fBQwtRoundScaleDraw\fP *)"
77
.RI "const \fBQwtRoundScaleDraw\fP * \fBscaleDraw\fP () const"
80
.RI "\fBQwtRoundScaleDraw\fP * \fBscaleDraw\fP ()"
83
.SS "Protected Member Functions"
87
.RI "virtual void \fBpaintEvent\fP (QPaintEvent *e)"
90
.RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)"
93
.RI "void \fBdraw\fP (QPainter *p, const QRect &ur)"
96
.RI "void \fBdrawKnob\fP (QPainter *p, const QRect &r)"
99
.RI "void \fBdrawMarker\fP (QPainter *p, double arc, const QColor &c)"
102
.SH "Member Enumeration Documentation"
104
.SS "enum \fBQwtKnob::Symbol\fP"
110
\fBQwtKnob::QwtKnob()\fP
115
Definition at line 49 of file qwt_knob.h.
116
.SH "Constructor & Destructor Documentation"
118
.SS "QwtKnob::QwtKnob (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
124
\fIparent\fP Parent widget
129
Definition at line 59 of file qwt_knob.cpp.
130
.SS "QwtKnob::~QwtKnob ()\fC [virtual]\fP"
134
Definition at line 99 of file qwt_knob.cpp.
135
.SH "Member Function Documentation"
137
.SS "void QwtKnob::setKnobWidth (int w)"
139
Change the knob's width.
141
The specified width must be >= 5, or it will be clipped.
150
Definition at line 453 of file qwt_knob.cpp.
151
.SS "int QwtKnob::knobWidth () const"
153
Return the width of the knob.
155
Definition at line 460 of file qwt_knob.cpp.
156
.SS "void QwtKnob::setTotalAngle (double angle)"
158
Set the total angle by which the knob can be turned.
162
\fIangle\fP Angle in degrees.
165
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.
167
Definition at line 134 of file qwt_knob.cpp.
169
References scaleDraw(), and QwtRoundScaleDraw::setAngleRange().
171
Referenced by setScaleDraw().
172
.SS "double QwtKnob::totalAngle () const"
174
Return the total angle.
176
Definition at line 147 of file qwt_knob.cpp.
177
.SS "void QwtKnob::setBorderWidth (int bw)"
179
Set the knob's border width.
183
\fIbw\fP new border width
188
Definition at line 469 of file qwt_knob.cpp.
189
.SS "int QwtKnob::borderWidth () const"
191
Return the border width.
193
Definition at line 476 of file qwt_knob.cpp.
194
.SS "void QwtKnob::setSymbol (\fBQwtKnob::Symbol\fP s)"
196
Set the symbol of the knob.
205
Definition at line 108 of file qwt_knob.cpp.
206
.SS "\fBQwtKnob::Symbol\fP QwtKnob::symbol () const"
220
Definition at line 121 of file qwt_knob.cpp.
221
.SS "QSize QwtKnob::sizeHint () const\fC [virtual]\fP"
225
\fBminimumSizeHint()\fP
230
Definition at line 527 of file qwt_knob.cpp.
232
References minimumSizeHint().
233
.SS "QSize QwtKnob::minimumSizeHint () const\fC [virtual]\fP"
235
Return a minimum size hint.
239
The return value of \fBQwtKnob::minimumSizeHint()\fP depends on the font and the scale.
244
Definition at line 537 of file qwt_knob.cpp.
246
References QwtRoundScaleDraw::extent(), and scaleDraw().
248
Referenced by sizeHint().
249
.SS "void QwtKnob::setScaleDraw (\fBQwtRoundScaleDraw\fP * scaleDraw)"
251
Change the scale draw of the knob
253
For changing the labels of the scales, it is necessary to derive from \fBQwtRoundScaleDraw\fP and overload \fBQwtRoundScaleDraw::label()\fP.
262
Definition at line 161 of file qwt_knob.cpp.
264
References scaleDraw(), QwtAbstractScale::setAbstractScaleDraw(), and setTotalAngle().
265
.SS "const \fBQwtRoundScaleDraw\fP * QwtKnob::scaleDraw () const"
269
the scale draw of the knob
279
Definition at line 171 of file qwt_knob.cpp.
281
References QwtAbstractScale::abstractScaleDraw().
283
Referenced by draw(), minimumSizeHint(), setScaleDraw(), and setTotalAngle().
284
.SS "\fBQwtRoundScaleDraw\fP * QwtKnob::scaleDraw ()"
288
the scale draw of the knob
298
Definition at line 180 of file qwt_knob.cpp.
300
References QwtAbstractScale::abstractScaleDraw().
301
.SS "void QwtKnob::paintEvent (QPaintEvent * e)\fC [protected, virtual]\fP"
305
Definition at line 363 of file qwt_knob.cpp.
308
.SS "void QwtKnob::resizeEvent (QResizeEvent * e)\fC [protected, virtual]\fP"
312
Definition at line 332 of file qwt_knob.cpp.
313
.SS "void QwtKnob::draw (QPainter * p, const QRect & ur)\fC [protected]\fP"
317
Definition at line 383 of file qwt_knob.cpp.
319
References QwtAbstractScaleDraw::draw(), QwtPainter::drawFocusRect(), drawKnob(), and scaleDraw().
321
Referenced by paintEvent().
322
.SS "void QwtKnob::drawKnob (QPainter * painter, const QRect & r)\fC [protected]\fP"
328
\fIpainter\fP painter
330
\fIr\fP Bounding rectangle of the knob (without scale)
335
Definition at line 190 of file qwt_knob.cpp.
337
References drawMarker(), and QwtAbstractSlider::isValid().
339
Referenced by draw().
340
.SS "void QwtKnob::drawMarker (QPainter * p, double arc, const QColor & c)\fC [protected]\fP"
342
Draw the marker at the knob's front.
348
\fIarc\fP Angle of the marker
355
Definition at line 406 of file qwt_knob.cpp.
357
Referenced by drawKnob().
361
Generated automatically by Doxygen for Qwt User's Guide from the source code.