~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2009-04-12 23:25:58 UTC
  • mfrom: (1.1.4 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090412232558-3bl06x785yr8xm8u
Tags: 5.1.2-1
* New upstream release.
* Bump compat/debhelper to 7.
* Bump Standards-Version to 3.8.1. No changes needed.
* Invert Maintainers and Uploaders field.
* Fix lintian warnings:
  - dh_clean _k deprecated.
  - missing dependency on libc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "QwtAbstractScaleDraw" 3 "24 May 2008" "Version 5.1.1" "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
 
Labels
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 55 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 61 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 67 of file qwt_abstract_scale_draw.cpp.
156
 
.SH "Member Function Documentation"
157
 
.PP 
158
 
.SS "\fBQwtAbstractScaleDraw\fP & QwtAbstractScaleDraw::operator= (const \fBQwtAbstractScaleDraw\fP &)"
159
 
.PP
160
 
Assignment operator. 
161
 
.PP
162
 
Definition at line 72 of file qwt_abstract_scale_draw.cpp.
163
 
.PP
164
 
References d_data.
165
 
.SS "void QwtAbstractScaleDraw::setScaleDiv (const \fBQwtScaleDiv\fP & sd)"
166
 
.PP
167
 
Change the scale division 
168
 
.PP
169
 
\fBParameters:\fP
170
 
.RS 4
171
 
\fIsd\fP New scale division 
172
 
.RE
173
 
.PP
174
 
 
175
 
.PP
176
 
Definition at line 108 of file qwt_abstract_scale_draw.cpp.
177
 
.PP
178
 
References QwtScaleDiv::hBound(), and QwtScaleDiv::lBound().
179
 
.PP
180
 
Referenced by QwtAbstractScale::setAbstractScaleDraw(), QwtScaleWidget::setScaleDiv(), and QwtPlotScaleItem::updateScaleDiv().
181
 
.SS "const \fBQwtScaleDiv\fP & QwtAbstractScaleDraw::scaleDiv () const"
182
 
.PP
183
 
\fBReturns:\fP
184
 
.RS 4
185
 
scale division 
186
 
.RE
187
 
.PP
188
 
 
189
 
.PP
190
 
Definition at line 138 of file qwt_abstract_scale_draw.cpp.
191
 
.PP
192
 
Referenced by QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::maxLabelHeight(), QwtScaleDraw::maxLabelWidth(), QwtScaleDraw::minLabelDist(), QwtScaleDraw::minLength(), QwtScaleWidget::setScaleDiv(), and QwtPlot::sizeHint().
193
 
.SS "void QwtAbstractScaleDraw::setTransformation (\fBQwtScaleTransformation\fP * transformation)"
194
 
.PP
195
 
Change the transformation of the scale 
196
 
.PP
197
 
\fBParameters:\fP
198
 
.RS 4
199
 
\fItransformation\fP New scale transformation 
200
 
.RE
201
 
.PP
202
 
 
203
 
.PP
204
 
Definition at line 119 of file qwt_abstract_scale_draw.cpp.
205
 
.PP
206
 
Referenced by QwtPlotScaleItem::draw(), and QwtScaleWidget::setScaleDiv().
207
 
.SS "const \fBQwtScaleMap\fP & QwtAbstractScaleDraw::map () const"
208
 
.PP
209
 
\fBReturns:\fP
210
 
.RS 4
211
 
Map how to translate between scale and pixel values 
212
 
.RE
213
 
.PP
214
 
 
215
 
.PP
216
 
Definition at line 126 of file qwt_abstract_scale_draw.cpp.
217
 
.PP
218
 
Referenced by QwtRoundScaleDraw::drawBackbone(), QwtScaleWidget::drawColorBar(), QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::drawTick(), QwtRoundScaleDraw::drawTick(), QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::labelPosition(), and QwtScaleWidget::setScaleDiv().
219
 
.SS "void QwtAbstractScaleDraw::enableComponent (\fBScaleComponent\fP component, bool enable = \fCtrue\fP)"
220
 
.PP
221
 
En/Disable a component of the scale
222
 
.PP
223
 
\fBParameters:\fP
224
 
.RS 4
225
 
\fIcomponent\fP Scale component 
226
 
.br
227
 
\fIenable\fP On/Off
228
 
.RE
229
 
.PP
230
 
\fBSee also:\fP
231
 
.RS 4
232
 
\fBQwtAbstractScaleDraw::hasComponent\fP 
233
 
.RE
234
 
.PP
235
 
 
236
 
.PP
237
 
Definition at line 86 of file qwt_abstract_scale_draw.cpp.
238
 
.PP
239
 
Referenced by QwtDial::setScaleOptions().
240
 
.SS "bool QwtAbstractScaleDraw::hasComponent (\fBScaleComponent\fP component) const"
241
 
.PP
242
 
Check if a component is enabled 
243
 
.PP
244
 
\fBSee also:\fP
245
 
.RS 4
246
 
\fBQwtAbstractScaleDraw::enableComponent\fP 
247
 
.RE
248
 
.PP
249
 
 
250
 
.PP
251
 
Definition at line 99 of file qwt_abstract_scale_draw.cpp.
252
 
.PP
253
 
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::labelPosition(), QwtScaleDraw::minLabelDist(), and QwtScaleDraw::minLength().
254
 
.SS "void QwtAbstractScaleDraw::setTickLength (\fBQwtScaleDiv::TickType\fP tickType, int length)"
255
 
.PP
256
 
Set the length of the ticks
257
 
.PP
258
 
\fBParameters:\fP
259
 
.RS 4
260
 
\fItickType\fP Tick type 
261
 
.br
262
 
\fIlength\fP New length
263
 
.RE
264
 
.PP
265
 
\fBWarning:\fP
266
 
.RS 4
267
 
the length is limited to [0..1000] 
268
 
.RE
269
 
.PP
270
 
 
271
 
.PP
272
 
Definition at line 306 of file qwt_abstract_scale_draw.cpp.
273
 
.PP
274
 
Referenced by QwtDial::setScaleTicks().
275
 
.SS "int QwtAbstractScaleDraw::tickLength (\fBQwtScaleDiv::TickType\fP tickType) const"
276
 
.PP
277
 
Return the length of the ticks
278
 
.PP
279
 
\fBSee also:\fP
280
 
.RS 4
281
 
\fBQwtAbstractScaleDraw::setTickLength\fP, \fBQwtAbstractScaleDraw::majTickLength\fP 
282
 
.RE
283
 
.PP
284
 
 
285
 
.PP
286
 
Definition at line 331 of file qwt_abstract_scale_draw.cpp.
287
 
.SS "int QwtAbstractScaleDraw::majTickLength () const"
288
 
.PP
289
 
The same as QwtAbstractScaleDraw::tickLength(QwtScaleDiv::MajorTick). 
290
 
.PP
291
 
Definition at line 345 of file qwt_abstract_scale_draw.cpp.
292
 
.PP
293
 
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), QwtRoundScaleDraw::extent(), and QwtScaleDraw::labelPosition().
294
 
.SS "void QwtAbstractScaleDraw::setSpacing (int spacing)"
295
 
.PP
296
 
Set the spacing between tick and labels. 
297
 
.PP
298
 
The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
299
 
.PP
300
 
\fBParameters:\fP
301
 
.RS 4
302
 
\fIspacing\fP Spacing
303
 
.RE
304
 
.PP
305
 
\fBSee also:\fP
306
 
.RS 4
307
 
\fBQwtAbstractScaleDraw::spacing\fP 
308
 
.RE
309
 
.PP
310
 
 
311
 
.PP
312
 
Definition at line 247 of file qwt_abstract_scale_draw.cpp.
313
 
.SS "int QwtAbstractScaleDraw::spacing () const"
314
 
.PP
315
 
Get the spacing. 
316
 
.PP
317
 
The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
318
 
.PP
319
 
\fBSee also:\fP
320
 
.RS 4
321
 
\fBQwtAbstractScaleDraw::setSpacing\fP 
322
 
.RE
323
 
.PP
324
 
 
325
 
.PP
326
 
Definition at line 263 of file qwt_abstract_scale_draw.cpp.
327
 
.PP
328
 
Referenced by QwtRoundScaleDraw::drawLabel(), QwtScaleDraw::extent(), QwtRoundScaleDraw::extent(), and QwtScaleDraw::labelPosition().
329
 
.SS "void QwtAbstractScaleDraw::draw (QPainter * painter, const QPalette & palette) const\fC [virtual]\fP"
330
 
.PP
331
 
Draw the scale. 
332
 
.PP
333
 
\fBParameters:\fP
334
 
.RS 4
335
 
\fIpainter\fP The painter
336
 
.br
337
 
\fIpalette\fP Palette, text color is used for the labels, foreground color for ticks and backbone 
338
 
.RE
339
 
.PP
340
 
 
341
 
.PP
342
 
Definition at line 165 of file qwt_abstract_scale_draw.cpp.
343
 
.PP
344
 
Referenced by QwtThermo::draw(), QwtSlider::draw(), QwtPlotScaleItem::draw(), QwtKnob::draw(), and QwtPlot::printScale().
345
 
.SS "\fBQwtText\fP QwtAbstractScaleDraw::label (double value) const\fC [virtual]\fP"
346
 
.PP
347
 
Convert a value into its representing label. 
348
 
.PP
349
 
The value is converted to a plain text using QLocale::system().toString(value). This method is often overloaded by applications to have individual labels.
350
 
.PP
351
 
\fBParameters:\fP
352
 
.RS 4
353
 
\fIvalue\fP Value 
354
 
.RE
355
 
.PP
356
 
\fBReturns:\fP
357
 
.RS 4
358
 
Label string. 
359
 
.RE
360
 
.PP
361
 
 
362
 
.PP
363
 
Reimplemented in \fBQwtDialScaleDraw\fP.
364
 
.PP
365
 
Definition at line 361 of file qwt_abstract_scale_draw.cpp.
366
 
.PP
367
 
Referenced by QwtRoundScaleDraw::drawLabel(), QwtRoundScaleDraw::extent(), QwtDialScaleDraw::label(), and tickLabel().
368
 
.SS "virtual int QwtAbstractScaleDraw::extent (const QPen &, const QFont &) const\fC [pure virtual]\fP"
369
 
.PP
370
 
Calculate the extent
371
 
.PP
372
 
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.
373
 
.PP
374
 
\fBSee also:\fP
375
 
.RS 4
376
 
\fBsetMinimumExtent()\fP, \fBminimumExtent()\fP 
377
 
.RE
378
 
.PP
379
 
 
380
 
.PP
381
 
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
382
 
.SS "void QwtAbstractScaleDraw::setMinimumExtent (int minExtent)"
383
 
.PP
384
 
Set a minimum for the extent. 
385
 
.PP
386
 
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.
387
 
.PP
388
 
\fBParameters:\fP
389
 
.RS 4
390
 
\fIminExtent\fP Minimum extent
391
 
.RE
392
 
.PP
393
 
\fBSee also:\fP
394
 
.RS 4
395
 
\fBextent()\fP, \fBminimumExtent()\fP 
396
 
.RE
397
 
.PP
398
 
 
399
 
.PP
400
 
Definition at line 281 of file qwt_abstract_scale_draw.cpp.
401
 
.SS "int QwtAbstractScaleDraw::minimumExtent () const"
402
 
.PP
403
 
Get the minimum extent 
404
 
.PP
405
 
\fBSee also:\fP
406
 
.RS 4
407
 
\fBextent()\fP, \fBsetMinimumExtent()\fP 
408
 
.RE
409
 
.PP
410
 
 
411
 
.PP
412
 
Definition at line 293 of file qwt_abstract_scale_draw.cpp.
413
 
.PP
414
 
Referenced by QwtScaleDraw::extent(), and QwtRoundScaleDraw::extent().
415
 
.SS "\fBQwtScaleMap\fP & QwtAbstractScaleDraw::scaleMap ()"
416
 
.PP
417
 
\fBReturns:\fP
418
 
.RS 4
419
 
Map how to translate between scale and pixel values 
420
 
.RE
421
 
.PP
422
 
 
423
 
.PP
424
 
Definition at line 132 of file qwt_abstract_scale_draw.cpp.
425
 
.PP
426
 
Referenced by QwtScaleDraw::drawTick(), QwtRoundScaleDraw::QwtRoundScaleDraw(), and QwtRoundScaleDraw::setAngleRange().
427
 
.SS "virtual void QwtAbstractScaleDraw::drawTick (QPainter * painter, double value, int len) const\fC [protected, pure virtual]\fP"
428
 
.PP
429
 
Draw a tick
430
 
.PP
431
 
\fBParameters:\fP
432
 
.RS 4
433
 
\fIpainter\fP Painter 
434
 
.br
435
 
\fIvalue\fP Value of the tick 
436
 
.br
437
 
\fIlen\fP Lenght of the tick
438
 
.RE
439
 
.PP
440
 
\fBSee also:\fP
441
 
.RS 4
442
 
\fBdrawBackbone()\fP, \fBdrawLabel()\fP 
443
 
.RE
444
 
.PP
445
 
 
446
 
.PP
447
 
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
448
 
.SS "virtual void QwtAbstractScaleDraw::drawBackbone (QPainter * painter) const\fC [protected, pure virtual]\fP"
449
 
.PP
450
 
Draws the baseline of the scale 
451
 
.PP
452
 
\fBParameters:\fP
453
 
.RS 4
454
 
\fIpainter\fP Painter
455
 
.RE
456
 
.PP
457
 
\fBSee also:\fP
458
 
.RS 4
459
 
\fBdrawTick()\fP, \fBdrawLabel()\fP 
460
 
.RE
461
 
.PP
462
 
 
463
 
.PP
464
 
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
465
 
.SS "virtual void QwtAbstractScaleDraw::drawLabel (QPainter * painter, double value) const\fC [protected, pure virtual]\fP"
466
 
.PP
467
 
Draws the label for a major scale tick
468
 
.PP
469
 
\fBParameters:\fP
470
 
.RS 4
471
 
\fIpainter\fP Painter 
472
 
.br
473
 
\fIvalue\fP Value
474
 
.RE
475
 
.PP
476
 
\fBSee also:\fP
477
 
.RS 4
478
 
\fBdrawTick\fP, \fBdrawBackbone\fP 
479
 
.RE
480
 
.PP
481
 
 
482
 
.PP
483
 
Implemented in \fBQwtRoundScaleDraw\fP, and \fBQwtScaleDraw\fP.
484
 
.SS "void QwtAbstractScaleDraw::invalidateCache ()\fC [protected]\fP"
485
 
.PP
486
 
Invalidate the cache used by \fBQwtAbstractScaleDraw::tickLabel\fP
487
 
.PP
488
 
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. 
489
 
.PP
490
 
Definition at line 404 of file qwt_abstract_scale_draw.cpp.
491
 
.SS "const \fBQwtText\fP & QwtAbstractScaleDraw::tickLabel (const QFont & font, double value) const\fC [protected]\fP"
492
 
.PP
493
 
Convert a value into its representing label and cache it. 
494
 
.PP
495
 
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.
496
 
.PP
497
 
\fBParameters:\fP
498
 
.RS 4
499
 
\fIfont\fP Font 
500
 
.br
501
 
\fIvalue\fP Value
502
 
.RE
503
 
.PP
504
 
\fBReturns:\fP
505
 
.RS 4
506
 
Tick label 
507
 
.RE
508
 
.PP
509
 
 
510
 
.PP
511
 
Definition at line 379 of file qwt_abstract_scale_draw.cpp.
512
 
.PP
513
 
References label(), and QwtText::setRenderFlags().
514
 
.PP
515
 
Referenced by QwtScaleDraw::boundingLabelRect(), QwtScaleDraw::drawLabel(), QwtRoundScaleDraw::drawLabel(), QwtRoundScaleDraw::extent(), and QwtScaleDraw::labelRect().
516
 
 
517
 
.SH "Author"
518
 
.PP 
519
 
Generated automatically by Doxygen for Qwt User's Guide from the source code.