QwtRoundScaleDraw can be used to draw round scales. The circle segment can be adjusted by QwtRoundScaleDraw::setAngleRange(). The geometry of the scale can be specified with QwtRoundScaleDraw::moveCenter() and QwtRoundScaleDraw::setRadius().
After a scale division has been specified as a QwtScaleDiv object using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), the scale can be drawn with the QwtAbstractScaleDraw::draw() member.
Constructor & Destructor Documentation
QwtRoundScaleDraw::QwtRoundScaleDraw ()
Constructor.
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].
The extent is the distcance between the baseline to the outermost pixel of the scale draw. radius() + extent() is an upper limit for the radius of the bounding circle.
Parameters:
pen Pen that is used for painting backbone and ticks
font Font used for painting the labels
See also:
setMinimumExtent(), minimumExtent()
Warning:
The implemented algo is not too smart and calculates only an upper limit, that might be a few pixels too large
Adjust the baseline circle segment for round scales.
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.
Parameters:
angle1 angle2 boundaries of the angle interval in degrees.
Warning:
•
The angle range is limited to [-360, 360] degrees. Angles exceeding this range will be clipped.
•
For angles more than 359 degrees above or below min(angle1, angle2), scale marks will not be drawn.
•
If you need a counterclockwise scale, use QwtScaleDiv::setRange
void QwtRoundScaleDraw::setRadius (int radius)
Change of radius the scale
Radius is the radius of the backbone without ticks and labels.
Parameters:
radius New Radius
See also:
moveCenter()
Author
Generated automatically by Doxygen for Qwt User's Guide from the source code.