1
.TH "QwtRoundScaleDraw" 3 "26 Feb 2007" "Version 5.0.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtAbstractScaleDraw\fP.
11
Inherited by \fBQwtDialScaleDraw\fP.
13
.SH "Detailed Description"
15
A class for drawing round scales.
17
\fBQwtRoundScaleDraw\fP can be used to draw round scales. The circle segment can be adjusted by \fBQwtRoundScaleDraw::setAngleRange()\fP. The geometry of the scale can be specified with \fBQwtRoundScaleDraw::moveCenter()\fP and \fBQwtRoundScaleDraw::setRadius()\fP.
19
After a scale division has been specified as a \fBQwtScaleDiv\fP object using \fBQwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s)\fP, the scale can be drawn with the \fBQwtAbstractScaleDraw::draw()\fP member.
21
Definition at line 32 of file qwt_round_scale_draw.h.
22
.SS "Public Member Functions"
26
.RI "\fBQwtRoundScaleDraw\fP ()"
29
.RI "\fBQwtRoundScaleDraw\fP (const \fBQwtRoundScaleDraw\fP &)"
32
.RI "virtual \fB~QwtRoundScaleDraw\fP ()"
35
.RI "\fBQwtRoundScaleDraw\fP & \fBoperator=\fP (const \fBQwtRoundScaleDraw\fP &other)"
38
.RI "void \fBsetRadius\fP (int radius)"
41
.RI "int \fBradius\fP () const "
44
.RI "void \fBmoveCenter\fP (int x, int y)"
47
.RI "void \fBmoveCenter\fP (const QPoint &)"
50
.RI "QPoint \fBcenter\fP () const "
53
.RI "void \fBsetAngleRange\fP (double angle1, double angle2)"
56
.RI "virtual int \fBextent\fP (const QPen &, const QFont &) const "
59
.SS "Protected Member Functions"
63
.RI "virtual void \fBdrawTick\fP (QPainter *p, double val, int len) const "
66
.RI "virtual void \fBdrawBackbone\fP (QPainter *p) const "
69
.RI "virtual void \fBdrawLabel\fP (QPainter *p, double val) const "
72
.SH "Constructor & Destructor Documentation"
74
.SS "QwtRoundScaleDraw::QwtRoundScaleDraw ()"
78
The range of the scale is initialized to [0, 100], The center is set to (50, 50) with a radius of 50. The angle range is set to [-135, 135].
80
Definition at line 46 of file qwt_round_scale_draw.cpp.
82
References QwtAbstractScaleDraw::scaleMap(), QwtScaleMap::setPaintInterval(), and setRadius().
83
.SS "QwtRoundScaleDraw::QwtRoundScaleDraw (const \fBQwtRoundScaleDraw\fP &)"
87
Definition at line 55 of file qwt_round_scale_draw.cpp.
90
.SS "QwtRoundScaleDraw::~QwtRoundScaleDraw ()\fC [virtual]\fP"
94
Definition at line 63 of file qwt_round_scale_draw.cpp.
95
.SH "Member Function Documentation"
97
.SS "QPoint QwtRoundScaleDraw::center () const"
99
Get the center of the scale.
101
Definition at line 113 of file qwt_round_scale_draw.cpp.
102
.SS "void QwtRoundScaleDraw::drawBackbone (QPainter * painter) const\fC [protected, virtual]\fP"
104
Draws the baseline of the scale
108
\fIpainter\fP Painter
113
\fBdrawTick()\fP, \fBdrawLabel()\fP
118
Implements \fBQwtAbstractScaleDraw\fP.
120
Definition at line 241 of file qwt_round_scale_draw.cpp.
122
References QwtAbstractScaleDraw::map(), and radius().
123
.SS "void QwtRoundScaleDraw::drawLabel (QPainter * painter, double value) const\fC [protected, virtual]\fP"
125
Draws the label for a major scale tick
129
\fIpainter\fP Painter
136
\fBdrawTick()\fP, \fBdrawBackbone()\fP
141
Implements \fBQwtAbstractScaleDraw\fP.
143
Definition at line 162 of file qwt_round_scale_draw.cpp.
145
References QwtText::draw(), QwtAbstractScaleDraw::hasComponent(), QwtText::isEmpty(), QwtAbstractScaleDraw::label(), QwtAbstractScaleDraw::majTickLength(), QwtAbstractScaleDraw::map(), radius(), QwtAbstractScaleDraw::spacing(), QwtText::textSize(), QwtAbstractScaleDraw::tickLabel(), and QwtScaleMap::transform().
146
.SS "void QwtRoundScaleDraw::drawTick (QPainter * painter, double value, int len) const\fC [protected, virtual]\fP"
152
\fIpainter\fP Painter
154
\fIvalue\fP Value of the tick
156
\fIlen\fP Lenght of the tick
161
\fBdrawBackbone()\fP, \fBdrawLabel()\fP
166
Implements \fBQwtAbstractScaleDraw\fP.
168
Definition at line 207 of file qwt_round_scale_draw.cpp.
170
References QwtPainter::drawLine(), QwtAbstractScaleDraw::map(), radius(), and QwtScaleMap::transform().
171
.SS "int QwtRoundScaleDraw::extent (const QPen & pen, const QFont & font) const\fC [virtual]\fP"
173
Calculate the extent of the scale
175
The extent is the distcance between the baseline to the outermost pixel of the scale draw. \fBradius()\fP + \fBextent()\fP is an upper limit for the radius of the bounding circle.
179
\fIpen\fP Pen that is used for painting backbone and ticks
181
\fIfont\fP Font used for painting the labels
186
\fBsetMinimumExtent()\fP, \fBminimumExtent()\fP
191
The implemented algo is not too smart and calculates only an upper limit, that might be a few pixels too large
196
Implements \fBQwtAbstractScaleDraw\fP.
198
Definition at line 269 of file qwt_round_scale_draw.cpp.
200
References QwtScaleDiv::contains(), QwtAbstractScaleDraw::hasComponent(), QwtText::isEmpty(), QwtAbstractScaleDraw::label(), QwtAbstractScaleDraw::map(), QwtAbstractScaleDraw::scaleDiv(), QwtText::textSize(), QwtAbstractScaleDraw::tickLabel(), QwtScaleDiv::ticks(), and QwtScaleMap::transform().
202
Referenced by QwtKnob::minimumSizeHint().
203
.SS "void QwtRoundScaleDraw::moveCenter (const QPoint & center)"
205
Move the center of the scale draw, leaving the radius unchanged
209
\fIcenter\fP New center
219
Definition at line 107 of file qwt_round_scale_draw.cpp.
220
.SS "\fBQwtRoundScaleDraw\fP & QwtRoundScaleDraw::operator= (const \fBQwtRoundScaleDraw\fP & other)"
224
Definition at line 69 of file qwt_round_scale_draw.cpp.
227
.SS "int QwtRoundScaleDraw::radius () const"
231
Radius is the radius of the backbone without ticks and labels.
235
\fBsetRadius()\fP, \fBextent()\fP
240
Definition at line 96 of file qwt_round_scale_draw.cpp.
242
Referenced by drawBackbone(), drawLabel(), and drawTick().
243
.SS "void QwtRoundScaleDraw::setAngleRange (double angle1, double angle2)"
245
Adjust the baseline circle segment for round scales.
247
The baseline will be drawn from min(angle1,angle2) to max(angle1, angle2). The default setting is [ -135, 135 ]. An angle of 0 degrees corresponds to the 12 o'clock position, and positive angles count in a clockwise direction.
253
\fIangle2\fP boundaries of the angle interval in degrees.
260
The angle range is limited to [-360, 360] degrees. Angles exceeding this range will be clipped.
262
For angles more than 359 degrees above or below min(angle1, angle2), scale marks will not be drawn.
264
If you need a counterclockwise scale, use QwtScaleDiv::setRange
270
Definition at line 135 of file qwt_round_scale_draw.cpp.
272
References QwtAbstractScaleDraw::scaleMap(), and QwtScaleMap::setPaintInterval().
274
Referenced by QwtKnob::setTotalAngle().
275
.SS "void QwtRoundScaleDraw::setRadius (int radius)"
277
Change of radius the scale
279
Radius is the radius of the backbone without ticks and labels.
283
\fIradius\fP New Radius
293
Definition at line 84 of file qwt_round_scale_draw.cpp.
295
Referenced by QwtRoundScaleDraw().
299
Generated automatically by Doxygen for Qwt User's Guide from the source code.