File: QwtRoundScaleDraw.3

package info (click to toggle)
qwt 6.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,848 kB
  • ctags: 15,811
  • sloc: cpp: 57,382; makefile: 41
file content (239 lines) | stat: -rw-r--r-- 5,760 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
.TH "QwtRoundScaleDraw" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtRoundScaleDraw \- 
.PP
A class for drawing round scales\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_round_scale_draw\&.h>\fP
.PP
Inherits \fBQwtAbstractScaleDraw\fP\&.
.PP
Inherited by QwtAnalogClockScaleDraw, and \fBQwtCompassScaleDraw\fP\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtRoundScaleDraw\fP ()"
.br
.RI "\fIConstructor\&. \fP"
.ti -1c
.RI "virtual \fB~QwtRoundScaleDraw\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetRadius\fP (double \fBradius\fP)"
.br
.ti -1c
.RI "double \fBradius\fP () const "
.br
.ti -1c
.RI "void \fBmoveCenter\fP (double x, double y)"
.br
.RI "\fIMove the center of the scale draw, leaving the radius unchanged\&. \fP"
.ti -1c
.RI "void \fBmoveCenter\fP (const QPointF &)"
.br
.ti -1c
.RI "QPointF \fBcenter\fP () const "
.br
.RI "\fIGet the center of the scale\&. \fP"
.ti -1c
.RI "void \fBsetAngleRange\fP (double angle1, double angle2)"
.br
.RI "\fIAdjust the baseline circle segment for round scales\&. \fP"
.ti -1c
.RI "virtual double \fBextent\fP (const QFont &) const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdrawTick\fP (QPainter *, double val, double len) const "
.br
.ti -1c
.RI "virtual void \fBdrawBackbone\fP (QPainter *) const "
.br
.ti -1c
.RI "virtual void \fBdrawLabel\fP (QPainter *, double val) const "
.br
.in -1c
.SS "Additional Inherited Members"
.SH "Detailed Description"
.PP 
A class for drawing round scales\&. 

\fBQwtRoundScaleDraw\fP can be used to draw round scales\&. The circle segment can be adjusted by \fBsetAngleRange()\fP\&. The geometry of the scale can be specified with \fBmoveCenter()\fP and \fBsetRadius()\fP\&.
.PP
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\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtRoundScaleDraw::QwtRoundScaleDraw ()"

.PP
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]\&. 
.SH "Member Function Documentation"
.PP 
.SS "void QwtRoundScaleDraw::drawBackbone (QPainter *painter) const\fC [protected]\fP, \fC [virtual]\fP"
Draws the baseline of the scale 
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdrawTick()\fP, \fBdrawLabel()\fP 
.RE
.PP

.PP
Implements \fBQwtAbstractScaleDraw\fP\&.
.SS "void QwtRoundScaleDraw::drawLabel (QPainter *painter, doublevalue) const\fC [protected]\fP, \fC [virtual]\fP"
Draws the label for a major scale tick
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIvalue\fP Value
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdrawTick()\fP, \fBdrawBackbone()\fP 
.RE
.PP

.PP
Implements \fBQwtAbstractScaleDraw\fP\&.
.SS "void QwtRoundScaleDraw::drawTick (QPainter *painter, doublevalue, doublelen) const\fC [protected]\fP, \fC [virtual]\fP"
Draw a tick
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIvalue\fP Value of the tick 
.br
\fIlen\fP Length of the tick
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdrawBackbone()\fP, \fBdrawLabel()\fP 
.RE
.PP

.PP
Implements \fBQwtAbstractScaleDraw\fP\&.
.SS "double QwtRoundScaleDraw::extent (const QFont &font) const\fC [virtual]\fP"
Calculate the extent of the scale
.PP
The extent is the distance 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\&.
.PP
\fBParameters:\fP
.RS 4
\fIfont\fP Font used for painting the labels 
.RE
.PP
\fBReturns:\fP
.RS 4
Calculated extent
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetMinimumExtent()\fP, \fBminimumExtent()\fP 
.RE
.PP
\fBWarning:\fP
.RS 4
The implemented algorithm is not too smart and calculates only an upper limit, that might be a few pixels too large 
.RE
.PP

.PP
Implements \fBQwtAbstractScaleDraw\fP\&.
.SS "void QwtRoundScaleDraw::moveCenter (const QPointF &center)"
Move the center of the scale draw, leaving the radius unchanged
.PP
\fBParameters:\fP
.RS 4
\fIcenter\fP New center 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetRadius()\fP 
.RE
.PP

.SS "double QwtRoundScaleDraw::radius () const"
Get the radius
.PP
Radius is the radius of the backbone without ticks and labels\&.
.PP
\fBReturns:\fP
.RS 4
Radius of the scale 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetRadius()\fP, \fBextent()\fP 
.RE
.PP

.SS "void QwtRoundScaleDraw::setAngleRange (doubleangle1, doubleangle2)"

.PP
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\&. 
.PP
\fBParameters:\fP
.RS 4
\fIangle1\fP 
.br
\fIangle2\fP boundaries of the angle interval in degrees\&. 
.RE
.PP
\fBWarning:\fP
.RS 4
.PD 0
.IP "\(bu" 2
The angle range is limited to [-360, 360] degrees\&. Angles exceeding this range will be clipped\&. 
.IP "\(bu" 2
For angles more or equal than 360 degrees above or below min(angle1, angle2), scale marks will not be drawn\&. 
.IP "\(bu" 2
If you need a counterclockwise scale, use \fBQwtScaleDiv::setInterval()\fP 
.PP
.RE
.PP

.SS "void QwtRoundScaleDraw::setRadius (doubleradius)"
Change of radius the scale
.PP
Radius is the radius of the backbone without ticks and labels\&.
.PP
\fBParameters:\fP
.RS 4
\fIradius\fP New Radius 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBmoveCenter()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.