1
.TH "QwtKnob" 3 "11 Jun 2007" "Version 5.0.2" "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 "int QwtKnob::borderWidth () const"
139
Return the border width.
141
Definition at line 475 of file qwt_knob.cpp.
142
.SS "void QwtKnob::draw (QPainter * p, const QRect & ur)\fC [protected]\fP"
146
Definition at line 382 of file qwt_knob.cpp.
148
References QwtAbstractScaleDraw::draw(), and scaleDraw().
150
Referenced by paintEvent().
151
.SS "void QwtKnob::drawKnob (QPainter * painter, const QRect & r)\fC [protected]\fP"
157
\fIpainter\fP painter
159
\fIr\fP Bounding rectangle of the knob (without scale)
164
Definition at line 189 of file qwt_knob.cpp.
166
References drawMarker(), and QwtAbstractSlider::isValid().
167
.SS "void QwtKnob::drawMarker (QPainter * p, double arc, const QColor & c)\fC [protected]\fP"
169
Draw the marker at the knob's front.
175
\fIarc\fP Angle of the marker
182
Definition at line 405 of file qwt_knob.cpp.
184
Referenced by drawKnob().
185
.SS "int QwtKnob::knobWidth () const"
187
Return the width of the knob.
189
Definition at line 459 of file qwt_knob.cpp.
190
.SS "QSize QwtKnob::minimumSizeHint () const\fC [virtual]\fP"
192
Return a minimum size hint.
196
The return value of \fBQwtKnob::minimumSizeHint()\fP depends on the font and the scale.
201
Definition at line 536 of file qwt_knob.cpp.
203
References QwtRoundScaleDraw::extent(), and scaleDraw().
205
Referenced by sizeHint().
206
.SS "void QwtKnob::paintEvent (QPaintEvent * e)\fC [protected, virtual]\fP"
210
Definition at line 362 of file qwt_knob.cpp.
213
.SS "void QwtKnob::resizeEvent (QResizeEvent * e)\fC [protected, virtual]\fP"
217
Definition at line 331 of file qwt_knob.cpp.
218
.SS "\fBQwtRoundScaleDraw\fP * QwtKnob::scaleDraw ()"
222
the scale draw of the knob
232
Definition at line 179 of file qwt_knob.cpp.
234
References QwtAbstractScale::abstractScaleDraw().
235
.SS "const \fBQwtRoundScaleDraw\fP * QwtKnob::scaleDraw () const"
239
the scale draw of the knob
249
Definition at line 170 of file qwt_knob.cpp.
251
References QwtAbstractScale::abstractScaleDraw().
253
Referenced by draw(), minimumSizeHint(), setScaleDraw(), and setTotalAngle().
254
.SS "void QwtKnob::setBorderWidth (int bw)"
256
Set the knob's border width.
260
\fIbw\fP new border width
265
Definition at line 468 of file qwt_knob.cpp.
266
.SS "void QwtKnob::setKnobWidth (int w)"
268
Change the knob's width.
270
The specified width must be >= 5, or it will be clipped.
279
Definition at line 452 of file qwt_knob.cpp.
280
.SS "void QwtKnob::setScaleDraw (\fBQwtRoundScaleDraw\fP * scaleDraw)"
282
Change the scale draw of the knob
284
For changing the labels of the scales, it is necessary to derive from \fBQwtRoundScaleDraw\fP and overload \fBQwtRoundScaleDraw::label()\fP.
293
Definition at line 161 of file qwt_knob.cpp.
295
References scaleDraw(), and QwtAbstractScale::setAbstractScaleDraw().
296
.SS "void QwtKnob::setSymbol (\fBQwtKnob::Symbol\fP s)"
298
Set the symbol of the knob.
307
Definition at line 108 of file qwt_knob.cpp.
308
.SS "void QwtKnob::setTotalAngle (double angle)"
310
Set the total angle by which the knob can be turned.
314
\fIangle\fP Angle in degrees.
317
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.
319
Definition at line 134 of file qwt_knob.cpp.
321
References scaleDraw(), and QwtRoundScaleDraw::setAngleRange().
322
.SS "QSize QwtKnob::sizeHint () const\fC [virtual]\fP"
326
\fBminimumSizeHint()\fP
331
Definition at line 526 of file qwt_knob.cpp.
333
References minimumSizeHint().
334
.SS "\fBQwtKnob::Symbol\fP QwtKnob::symbol () const"
348
Definition at line 121 of file qwt_knob.cpp.
349
.SS "double QwtKnob::totalAngle () const"
351
Return the total angle.
353
Definition at line 147 of file qwt_knob.cpp.
357
Generated automatically by Doxygen for Qwt User's Guide from the source code.