~l3on/ubuntu/oneiric/qwt/fix-921430

« back to all changes in this revision

Viewing changes to qwt-5.0.2/doc/man/man3/QwtAbstractScaleDraw.3

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2007-10-05 15:20:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071005152041-qmybqh4fj9jejyo2
Tags: 5.0.2-2
* Handle nostrip build option. (Closes: #437877)
* Build libqwt5-doc package in binary-indep target. (Closes: #443110)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "QwtAbstractScaleDraw" 3 "11 Jun 2007" "Version 5.0.2" "Qwt User's Guide" \" -*- nroff -*-
 
2
.ad l
 
3
.nh
 
4
.SH NAME
 
5
QwtAbstractScaleDraw \- 
 
6
.SH SYNOPSIS
 
7
.br
 
8
.PP
 
9
Inherited by \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
 
10
.PP
 
11
.SH "Detailed Description"
 
12
.PP 
 
13
A abstract base class for drawing scales. 
 
14
 
 
15
\fBQwtAbstractScaleDraw\fP can be used to draw linear or logarithmic scales.
 
16
.PP
 
17
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. 
 
18
.PP
 
19
Definition at line 37 of file qwt_abstract_scale_draw.h.
 
20
.SS "Public Types"
 
21
 
 
22
.in +1c
 
23
.ti -1c
 
24
.RI "enum \fBScaleComponent\fP { \fBBackbone\fP =  1, \fBTicks\fP =  2, \fBLabels\fP =  4 }"
 
25
.br
 
26
.in -1c
 
27
.SS "Public Member Functions"
 
28
 
 
29
.in +1c
 
30
.ti -1c
 
31
.RI "\fBQwtAbstractScaleDraw\fP ()"
 
32
.br
 
33
.ti -1c
 
34
.RI "\fBQwtAbstractScaleDraw\fP (const \fBQwtAbstractScaleDraw\fP &)"
 
35
.br
 
36
.ti -1c
 
37
.RI "virtual \fB~QwtAbstractScaleDraw\fP ()"
 
38
.br
 
39
.ti -1c
 
40
.RI "\fBQwtAbstractScaleDraw\fP & \fBoperator=\fP (const \fBQwtAbstractScaleDraw\fP &)"
 
41
.br
 
42
.ti -1c
 
43
.RI "void \fBsetScaleDiv\fP (const \fBQwtScaleDiv\fP &s)"
 
44
.br
 
45
.ti -1c
 
46
.RI "const \fBQwtScaleDiv\fP & \fBscaleDiv\fP () const "
 
47
.br
 
48
.ti -1c
 
49
.RI "void \fBsetTransformation\fP (\fBQwtScaleTransformation\fP *)"
 
50
.br
 
51
.ti -1c
 
52
.RI "const \fBQwtScaleMap\fP & \fBmap\fP () const "
 
53
.br
 
54
.ti -1c
 
55
.RI "void \fBenableComponent\fP (\fBScaleComponent\fP, bool enable=true)"
 
56
.br
 
57
.ti -1c
 
58
.RI "bool \fBhasComponent\fP (\fBScaleComponent\fP) const "
 
59
.br
 
60
.ti -1c
 
61
.RI "void \fBsetTickLength\fP (\fBQwtScaleDiv::TickType\fP, int length)"
 
62
.br
 
63
.ti -1c
 
64
.RI "int \fBtickLength\fP (\fBQwtScaleDiv::TickType\fP) const "
 
65
.br
 
66
.ti -1c
 
67
.RI "int \fBmajTickLength\fP () const "
 
68
.br
 
69
.ti -1c
 
70
.RI "void \fBsetSpacing\fP (int margin)"
 
71
.br
 
72
.ti -1c
 
73
.RI "int \fBspacing\fP () const "
 
74
.br
 
75
.ti -1c
 
76
.RI "virtual void \fBdraw\fP (QPainter *, const QPalette &) const "
 
77
.br
 
78
.ti -1c
 
79
.RI "virtual \fBQwtText\fP \fBlabel\fP (double) const "
 
80
.br
 
81
.ti -1c
 
82
.RI "virtual int \fBextent\fP (const QPen &, const QFont &) const =0"
 
83
.br
 
84
.ti -1c
 
85
.RI "void \fBsetMinimumExtent\fP (int)"
 
86
.br
 
87
.ti -1c
 
88
.RI "int \fBminimumExtent\fP () const "
 
89
.br
 
90
.ti -1c
 
91
.RI "\fBQwtScaleMap\fP & \fBscaleMap\fP ()"
 
92
.br
 
93
.in -1c
 
94
.SS "Protected Member Functions"
 
95
 
 
96
.in +1c
 
97
.ti -1c
 
98
.RI "virtual void \fBdrawTick\fP (QPainter *painter, double value, int len) const =0"
 
99
.br
 
100
.ti -1c
 
101
.RI "virtual void \fBdrawBackbone\fP (QPainter *painter) const =0"
 
102
.br
 
103
.ti -1c
 
104
.RI "virtual void \fBdrawLabel\fP (QPainter *painter, double value) const =0"
 
105
.br
 
106
.ti -1c
 
107
.RI "void \fBinvalidateCache\fP ()"
 
108
.br
 
109
.ti -1c
 
110
.RI "const \fBQwtText\fP & \fBtickLabel\fP (const QFont &, double value) const "
 
111
.br
 
112
.in -1c
 
113
.SH "Member Enumeration Documentation"
 
114
.PP 
 
115
.SS "enum \fBQwtAbstractScaleDraw::ScaleComponent\fP"
 
116
.PP
 
117
Components of a scale
 
118
.PP
 
119
.IP "\(bu" 2
 
120
Backbone
 
121
.IP "\(bu" 2
 
122
Ticks
 
123
.IP "\(bu" 2
 
124
Label
 
125
.PP
 
126
.PP
 
127
\fBSee also:\fP
 
128
.RS 4
 
129
\fBQwtAbstractScaleDraw::enableComponent\fP, \fBQwtAbstractScaleDraw::hasComponent\fP 
 
130
.RE
 
131
.PP
 
132
 
 
133
.PP
 
134
Definition at line 52 of file qwt_abstract_scale_draw.h.
 
135
.SH "Constructor & Destructor Documentation"
 
136
.PP 
 
137
.SS "QwtAbstractScaleDraw::QwtAbstractScaleDraw ()"
 
138
.PP
 
139
Constructor. 
 
140
.PP
 
141
The range of the scale is initialized to [0, 100], The spacing (distance between ticks and labels) is set to 4, the tick lengths are set to 4,6 and 8 pixels 
 
142
.PP
 
143
Definition at line 54 of file qwt_abstract_scale_draw.cpp.
 
144
.SS "QwtAbstractScaleDraw::QwtAbstractScaleDraw (const \fBQwtAbstractScaleDraw\fP &)"
 
145
.PP
 
146
Copy constructor. 
 
147
.PP
 
148
Definition at line 60 of file qwt_abstract_scale_draw.cpp.
 
149
.PP
 
150
References d_data.
 
151
.SS "QwtAbstractScaleDraw::~QwtAbstractScaleDraw ()\fC [virtual]\fP"
 
152
.PP
 
153
Destructor. 
 
154
.PP
 
155
Definition at line 66 of file qwt_abstract_scale_draw.cpp.
 
156
.SH "Member Function Documentation"
 
157
.PP 
 
158
.SS "void QwtAbstractScaleDraw::draw (QPainter * painter, const QPalette & palette) const\fC [virtual]\fP"
 
159
.PP
 
160
Draw the scale. 
 
161
.PP
 
162
\fBParameters:\fP
 
163
.RS 4
 
164
\fIpainter\fP The painter
 
165
.br
 
166
\fIpalette\fP Palette, text color is used for the labels, foreground color for ticks and backbone 
 
167
.RE
 
168
.PP
 
169
 
 
170
.PP
 
171
Definition at line 164 of file qwt_abstract_scale_draw.cpp.
 
172
.PP
 
173
Referenced by QwtThermo::draw(), QwtSlider::draw(), and QwtKnob::draw().
 
174
.SS "virtual void QwtAbstractScaleDraw::drawBackbone (QPainter * painter) const\fC [protected, pure virtual]\fP"
 
175
.PP
 
176
Draws the baseline of the scale 
 
177
.PP
 
178
\fBParameters:\fP
 
179
.RS 4
 
180
\fIpainter\fP Painter
 
181
.RE
 
182
.PP
 
183
\fBSee also:\fP
 
184
.RS 4
 
185
\fBdrawTick()\fP, \fBdrawLabel()\fP 
 
186
.RE
 
187
.PP
 
188
 
 
189
.PP
 
190
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
 
191
.SS "virtual void QwtAbstractScaleDraw::drawLabel (QPainter * painter, double value) const\fC [protected, pure virtual]\fP"
 
192
.PP
 
193
Draws the label for a major scale tick
 
194
.PP
 
195
\fBParameters:\fP
 
196
.RS 4
 
197
\fIpainter\fP Painter 
 
198
.br
 
199
\fIvalue\fP Value
 
200
.RE
 
201
.PP
 
202
\fBSee also:\fP
 
203
.RS 4
 
204
\fBdrawTick\fP, \fBdrawBackbone\fP 
 
205
.RE
 
206
.PP
 
207
 
 
208
.PP
 
209
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
 
210
.SS "virtual void QwtAbstractScaleDraw::drawTick (QPainter * painter, double value, int len) const\fC [protected, pure virtual]\fP"
 
211
.PP
 
212
Draw a tick
 
213
.PP
 
214
\fBParameters:\fP
 
215
.RS 4
 
216
\fIpainter\fP Painter 
 
217
.br
 
218
\fIvalue\fP Value of the tick 
 
219
.br
 
220
\fIlen\fP Lenght of the tick
 
221
.RE
 
222
.PP
 
223
\fBSee also:\fP
 
224
.RS 4
 
225
\fBdrawBackbone()\fP, \fBdrawLabel()\fP 
 
226
.RE
 
227
.PP
 
228
 
 
229
.PP
 
230
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
 
231
.SS "void QwtAbstractScaleDraw::enableComponent (\fBScaleComponent\fP component, bool enable = \fCtrue\fP)"
 
232
.PP
 
233
En/Disable a component of the scale
 
234
.PP
 
235
\fBParameters:\fP
 
236
.RS 4
 
237
\fIcomponent\fP Scale component 
 
238
.br
 
239
\fIenable\fP On/Off
 
240
.RE
 
241
.PP
 
242
\fBSee also:\fP
 
243
.RS 4
 
244
\fBQwtAbstractScaleDraw::hasComponent\fP 
 
245
.RE
 
246
.PP
 
247
 
 
248
.PP
 
249
Definition at line 85 of file qwt_abstract_scale_draw.cpp.
 
250
.PP
 
251
Referenced by QwtDial::setScaleOptions().
 
252
.SS "virtual int QwtAbstractScaleDraw::extent (const QPen &, const QFont &) const\fC [pure virtual]\fP"
 
253
.PP
 
254
Calculate the extent
 
255
.PP
 
256
The extent is the distcance from the baseline to the outermost pixel of the scale draw in opposite to its orientation. It is at least \fBminimumExtent()\fP pixels.
 
257
.PP
 
258
\fBSee also:\fP
 
259
.RS 4
 
260
\fBsetMinimumExtent()\fP, \fBminimumExtent()\fP 
 
261
.RE
 
262
.PP
 
263
 
 
264
.PP
 
265
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
 
266
.SS "bool QwtAbstractScaleDraw::hasComponent (\fBScaleComponent\fP component) const"
 
267
.PP
 
268
Check if a component is enabled 
 
269
.PP
 
270
\fBSee also:\fP
 
271
.RS 4
 
272
\fBQwtAbstractScaleDraw::enableComponent\fP 
 
273
.RE
 
274
.PP
 
275
 
 
276
.PP
 
277
Definition at line 98 of file qwt_abstract_scale_draw.cpp.
 
278
.PP
 
279
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::labelPosition(), QwtScaleDraw::minLabelDist(), and QwtScaleDraw::minLength().
 
280
.SS "void QwtAbstractScaleDraw::invalidateCache ()\fC [protected]\fP"
 
281
.PP
 
282
Invalidate the cache used by \fBQwtAbstractScaleDraw::tickLabel\fP
 
283
.PP
 
284
The cache is invalidated, when a new \fBQwtScaleDiv\fP is set. If the labels need to be changed. while the same \fBQwtScaleDiv\fP is set, \fBQwtAbstractScaleDraw::invalidateCache\fP needs to be called manually. 
 
285
.PP
 
286
Definition at line 402 of file qwt_abstract_scale_draw.cpp.
 
287
.SS "\fBQwtText\fP QwtAbstractScaleDraw::label (double value) const\fC [virtual]\fP"
 
288
.PP
 
289
Convert a value into its representing label. 
 
290
.PP
 
291
The value is converted to a plain text using QString::number(value). This method is often overloaded by applications to have individual labels.
 
292
.PP
 
293
\fBParameters:\fP
 
294
.RS 4
 
295
\fIvalue\fP Value 
 
296
.RE
 
297
.PP
 
298
\fBReturns:\fP
 
299
.RS 4
 
300
Label string. 
 
301
.RE
 
302
.PP
 
303
 
 
304
.PP
 
305
Reimplemented in \fBQwtDialScaleDraw\fP.
 
306
.PP
 
307
Definition at line 359 of file qwt_abstract_scale_draw.cpp.
 
308
.PP
 
309
Referenced by QwtRoundScaleDraw::drawLabel(), QwtRoundScaleDraw::extent(), QwtDialScaleDraw::label(), and tickLabel().
 
310
.SS "int QwtAbstractScaleDraw::majTickLength () const"
 
311
.PP
 
312
The same as QwtAbstractScaleDraw::tickLength(QwtScaleDiv::MajorTick). 
 
313
.PP
 
314
Definition at line 344 of file qwt_abstract_scale_draw.cpp.
 
315
.PP
 
316
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), and QwtScaleDraw::labelPosition().
 
317
.SS "const \fBQwtScaleMap\fP & QwtAbstractScaleDraw::map () const"
 
318
.PP
 
319
\fBReturns:\fP
 
320
.RS 4
 
321
Map how to translate between scale and pixel values 
 
322
.RE
 
323
.PP
 
324
 
 
325
.PP
 
326
Definition at line 125 of file qwt_abstract_scale_draw.cpp.
 
327
.PP
 
328
Referenced by QwtRoundScaleDraw::drawBackbone(), QwtScaleWidget::drawColorBar(), QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::drawTick(), QwtRoundScaleDraw::drawTick(), QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::labelPosition(), and QwtScaleWidget::setScaleDiv().
 
329
.SS "int QwtAbstractScaleDraw::minimumExtent () const"
 
330
.PP
 
331
Get the minimum extent 
 
332
.PP
 
333
\fBSee also:\fP
 
334
.RS 4
 
335
\fBextent()\fP, \fBsetMinimumExtent()\fP 
 
336
.RE
 
337
.PP
 
338
 
 
339
.PP
 
340
Definition at line 292 of file qwt_abstract_scale_draw.cpp.
 
341
.PP
 
342
Referenced by QwtScaleDraw::extent().
 
343
.SS "\fBQwtAbstractScaleDraw\fP & QwtAbstractScaleDraw::operator= (const \fBQwtAbstractScaleDraw\fP &)"
 
344
.PP
 
345
Assignment operator. 
 
346
.PP
 
347
Definition at line 71 of file qwt_abstract_scale_draw.cpp.
 
348
.PP
 
349
References d_data.
 
350
.SS "const \fBQwtScaleDiv\fP & QwtAbstractScaleDraw::scaleDiv () const"
 
351
.PP
 
352
\fBReturns:\fP
 
353
.RS 4
 
354
scale division 
 
355
.RE
 
356
.PP
 
357
 
 
358
.PP
 
359
Definition at line 137 of file qwt_abstract_scale_draw.cpp.
 
360
.PP
 
361
Referenced by QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::maxLabelHeight(), QwtScaleDraw::maxLabelWidth(), QwtScaleDraw::minLabelDist(), QwtScaleDraw::minLength(), QwtScaleWidget::setScaleDiv(), and QwtPlot::sizeHint().
 
362
.SS "\fBQwtScaleMap\fP & QwtAbstractScaleDraw::scaleMap ()"
 
363
.PP
 
364
\fBReturns:\fP
 
365
.RS 4
 
366
Map how to translate between scale and pixel values 
 
367
.RE
 
368
.PP
 
369
 
 
370
.PP
 
371
Definition at line 131 of file qwt_abstract_scale_draw.cpp.
 
372
.PP
 
373
Referenced by QwtScaleDraw::drawTick(), QwtRoundScaleDraw::QwtRoundScaleDraw(), and QwtRoundScaleDraw::setAngleRange().
 
374
.SS "void QwtAbstractScaleDraw::setMinimumExtent (int minExtent)"
 
375
.PP
 
376
Set a minimum for the extent. 
 
377
.PP
 
378
The extent is calculated from the coomponents of the scale draw. In situations, where the labels are changing and the layout depends on the extent (f.e scrolling a scale), setting an upper limit as minimum extent will avoid jumps of the layout.
 
379
.PP
 
380
\fBParameters:\fP
 
381
.RS 4
 
382
\fIminExtent\fP Minimum extent
 
383
.RE
 
384
.PP
 
385
\fBSee also:\fP
 
386
.RS 4
 
387
\fBextent()\fP, \fBminimumExtent()\fP 
 
388
.RE
 
389
.PP
 
390
 
 
391
.PP
 
392
Definition at line 280 of file qwt_abstract_scale_draw.cpp.
 
393
.SS "void QwtAbstractScaleDraw::setScaleDiv (const \fBQwtScaleDiv\fP & sd)"
 
394
.PP
 
395
Change the scale division 
 
396
.PP
 
397
\fBParameters:\fP
 
398
.RS 4
 
399
\fIsd\fP New scale division 
 
400
.RE
 
401
.PP
 
402
 
 
403
.PP
 
404
Definition at line 107 of file qwt_abstract_scale_draw.cpp.
 
405
.PP
 
406
References QwtScaleDiv::hBound(), and QwtScaleDiv::lBound().
 
407
.PP
 
408
Referenced by QwtScaleWidget::setScaleDiv().
 
409
.SS "void QwtAbstractScaleDraw::setSpacing (int spacing)"
 
410
.PP
 
411
Set the spacing between tick and labels. 
 
412
.PP
 
413
The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
 
414
.PP
 
415
\fBParameters:\fP
 
416
.RS 4
 
417
\fIspacing\fP Spacing
 
418
.RE
 
419
.PP
 
420
\fBSee also:\fP
 
421
.RS 4
 
422
\fBQwtAbstractScaleDraw::spacing\fP 
 
423
.RE
 
424
.PP
 
425
 
 
426
.PP
 
427
Definition at line 246 of file qwt_abstract_scale_draw.cpp.
 
428
.SS "void QwtAbstractScaleDraw::setTickLength (\fBQwtScaleDiv::TickType\fP tickType, int length)"
 
429
.PP
 
430
Set the length of the ticks
 
431
.PP
 
432
\fBParameters:\fP
 
433
.RS 4
 
434
\fItickType\fP Tick type 
 
435
.br
 
436
\fIlength\fP New length
 
437
.RE
 
438
.PP
 
439
\fBWarning:\fP
 
440
.RS 4
 
441
the length is limited to [0..1000] 
 
442
.RE
 
443
.PP
 
444
 
 
445
.PP
 
446
Definition at line 305 of file qwt_abstract_scale_draw.cpp.
 
447
.PP
 
448
Referenced by QwtDial::setScaleTicks().
 
449
.SS "void QwtAbstractScaleDraw::setTransformation (\fBQwtScaleTransformation\fP * transformation)"
 
450
.PP
 
451
Change the transformation of the scale 
 
452
.PP
 
453
\fBParameters:\fP
 
454
.RS 4
 
455
\fItransformation\fP New scale transformation 
 
456
.RE
 
457
.PP
 
458
 
 
459
.PP
 
460
Definition at line 118 of file qwt_abstract_scale_draw.cpp.
 
461
.PP
 
462
Referenced by QwtScaleWidget::setScaleDiv().
 
463
.SS "int QwtAbstractScaleDraw::spacing () const"
 
464
.PP
 
465
Get the spacing. 
 
466
.PP
 
467
The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
 
468
.PP
 
469
\fBSee also:\fP
 
470
.RS 4
 
471
\fBQwtAbstractScaleDraw::setSpacing\fP 
 
472
.RE
 
473
.PP
 
474
 
 
475
.PP
 
476
Definition at line 262 of file qwt_abstract_scale_draw.cpp.
 
477
.PP
 
478
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), and QwtScaleDraw::labelPosition().
 
479
.SS "const \fBQwtText\fP & QwtAbstractScaleDraw::tickLabel (const QFont & font, double value) const\fC [protected]\fP"
 
480
.PP
 
481
Convert a value into its representing label and cache it. 
 
482
.PP
 
483
The conversion between value and label is called very often in the layout and painting code. Unfortunately the calculation of the label sizes might be slow (really slow for rich text in Qt4), so it's necessary to cache the labels.
 
484
.PP
 
485
\fBParameters:\fP
 
486
.RS 4
 
487
\fIfont\fP Font 
 
488
.br
 
489
\fIvalue\fP Value
 
490
.RE
 
491
.PP
 
492
\fBReturns:\fP
 
493
.RS 4
 
494
Tick label 
 
495
.RE
 
496
.PP
 
497
 
 
498
.PP
 
499
Definition at line 377 of file qwt_abstract_scale_draw.cpp.
 
500
.PP
 
501
References label(), and QwtText::setRenderFlags().
 
502
.PP
 
503
Referenced by QwtScaleDraw::drawLabel(), QwtRoundScaleDraw::drawLabel(), QwtRoundScaleDraw::extent(), and QwtScaleDraw::labelRect().
 
504
.SS "int QwtAbstractScaleDraw::tickLength (\fBQwtScaleDiv::TickType\fP tickType) const"
 
505
.PP
 
506
Return the length of the ticks
 
507
.PP
 
508
\fBSee also:\fP
 
509
.RS 4
 
510
\fBQwtAbstractScaleDraw::setTickLength\fP, \fBQwtAbstractScaleDraw::majTickLength\fP 
 
511
.RE
 
512
.PP
 
513
 
 
514
.PP
 
515
Definition at line 330 of file qwt_abstract_scale_draw.cpp.
 
516
 
 
517
.SH "Author"
 
518
.PP 
 
519
Generated automatically by Doxygen for Qwt User's Guide from the source code.