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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-05-26 10:26:31 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080526102631-bp95mfccnrb957nx
Tags: 5.1.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "QwtScaleDraw" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
 
2
.ad l
 
3
.nh
 
4
.SH NAME
 
5
QwtScaleDraw \- 
 
6
.SH SYNOPSIS
 
7
.br
 
8
.PP
 
9
Inherits \fBQwtAbstractScaleDraw\fP.
 
10
.PP
 
11
.SH "Detailed Description"
 
12
.PP 
 
13
A class for drawing scales. 
 
14
 
 
15
\fBQwtScaleDraw\fP can be used to draw linear or logarithmic scales. A scale has a position, an alignment and a length, which can be specified . The labels can be rotated and aligned to the ticks using \fBsetLabelRotation()\fP and \fBsetLabelAlignment()\fP.
 
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 30 of file qwt_scale_draw.h.
 
20
.SS "Public Types"
 
21
 
 
22
.in +1c
 
23
.ti -1c
 
24
.RI "enum \fBAlignment\fP { \fBBottomScale\fP, \fBTopScale\fP, \fBLeftScale\fP, \fBRightScale\fP }"
 
25
.br
 
26
.in -1c
 
27
.SS "Public Member Functions"
 
28
 
 
29
.in +1c
 
30
.ti -1c
 
31
.RI "\fBQwtScaleDraw\fP ()"
 
32
.br
 
33
.ti -1c
 
34
.RI "\fBQwtScaleDraw\fP (const \fBQwtScaleDraw\fP &)"
 
35
.br
 
36
.ti -1c
 
37
.RI "virtual \fB~QwtScaleDraw\fP ()"
 
38
.br
 
39
.ti -1c
 
40
.RI "\fBQwtScaleDraw\fP & \fBoperator=\fP (const \fBQwtScaleDraw\fP &other)"
 
41
.br
 
42
.ti -1c
 
43
.RI "void \fBgetBorderDistHint\fP (const QFont &, int &start, int &end) const"
 
44
.br
 
45
.ti -1c
 
46
.RI "int \fBminLabelDist\fP (const QFont &) const "
 
47
.br
 
48
.ti -1c
 
49
.RI "int \fBminLength\fP (const QPen &, const QFont &) const"
 
50
.br
 
51
.ti -1c
 
52
.RI "virtual int \fBextent\fP (const QPen &, const QFont &) const"
 
53
.br
 
54
.ti -1c
 
55
.RI "void \fBmove\fP (int x, int y)"
 
56
.br
 
57
.ti -1c
 
58
.RI "void \fBmove\fP (const QPoint &)"
 
59
.br
 
60
.ti -1c
 
61
.RI "void \fBsetLength\fP (int length)"
 
62
.br
 
63
.ti -1c
 
64
.RI "\fBAlignment\fP \fBalignment\fP () const"
 
65
.br
 
66
.ti -1c
 
67
.RI "void \fBsetAlignment\fP (\fBAlignment\fP)"
 
68
.br
 
69
.ti -1c
 
70
.RI "Qt::Orientation \fBorientation\fP () const"
 
71
.br
 
72
.ti -1c
 
73
.RI "QPoint \fBpos\fP () const"
 
74
.br
 
75
.ti -1c
 
76
.RI "int \fBlength\fP () const"
 
77
.br
 
78
.ti -1c
 
79
.RI "void \fBsetLabelAlignment\fP (\fBQt::Alignment\fP)"
 
80
.br
 
81
.ti -1c
 
82
.RI "\fBQt::Alignment\fP \fBlabelAlignment\fP () const"
 
83
.br
 
84
.ti -1c
 
85
.RI "void \fBsetLabelRotation\fP (double rotation)"
 
86
.br
 
87
.ti -1c
 
88
.RI "double \fBlabelRotation\fP () const"
 
89
.br
 
90
.ti -1c
 
91
.RI "int \fBmaxLabelHeight\fP (const QFont &) const "
 
92
.br
 
93
.ti -1c
 
94
.RI "int \fBmaxLabelWidth\fP (const QFont &) const "
 
95
.br
 
96
.ti -1c
 
97
.RI "QPoint \fBlabelPosition\fP (double val) const"
 
98
.br
 
99
.ti -1c
 
100
.RI "QRect \fBlabelRect\fP (const QFont &, double val) const"
 
101
.br
 
102
.ti -1c
 
103
.RI "QSize \fBlabelSize\fP (const QFont &, double val) const"
 
104
.br
 
105
.ti -1c
 
106
.RI "QRect \fBboundingLabelRect\fP (const QFont &, double val) const"
 
107
.br
 
108
.in -1c
 
109
.SS "Protected Member Functions"
 
110
 
 
111
.in +1c
 
112
.ti -1c
 
113
.RI "QMatrix \fBlabelMatrix\fP (const QPoint &, const QSize &) const "
 
114
.br
 
115
.ti -1c
 
116
.RI "virtual void \fBdrawTick\fP (QPainter *p, double val, int len) const"
 
117
.br
 
118
.ti -1c
 
119
.RI "virtual void \fBdrawBackbone\fP (QPainter *p) const "
 
120
.br
 
121
.ti -1c
 
122
.RI "virtual void \fBdrawLabel\fP (QPainter *p, double val) const"
 
123
.br
 
124
.in -1c
 
125
.SH "Member Enumeration Documentation"
 
126
.PP 
 
127
.SS "enum \fBQwtScaleDraw::Alignment\fP"
 
128
.PP
 
129
Alignment of the scale draw 
 
130
.PP
 
131
\fBSee also:\fP
 
132
.RS 4
 
133
\fBsetAlignment()\fP, \fBalignment()\fP 
 
134
.RE
 
135
.PP
 
136
 
 
137
.PP
 
138
Definition at line 37 of file qwt_scale_draw.h.
 
139
.SH "Constructor & Destructor Documentation"
 
140
.PP 
 
141
.SS "QwtScaleDraw::QwtScaleDraw ()"
 
142
.PP
 
143
Constructor. 
 
144
.PP
 
145
The range of the scale is initialized to [0, 100], The position is at (0, 0) with a length of 100. The orientation is QwtAbstractScaleDraw::Bottom. 
 
146
.PP
 
147
Definition at line 60 of file qwt_scale_draw.cpp.
 
148
.PP
 
149
References setLength().
 
150
.SS "QwtScaleDraw::QwtScaleDraw (const \fBQwtScaleDraw\fP &)"
 
151
.PP
 
152
Copy constructor. 
 
153
.PP
 
154
Definition at line 67 of file qwt_scale_draw.cpp.
 
155
.PP
 
156
References d_data.
 
157
.SS "QwtScaleDraw::~QwtScaleDraw ()\fC [virtual]\fP"
 
158
.PP
 
159
Destructor. 
 
160
.PP
 
161
Definition at line 74 of file qwt_scale_draw.cpp.
 
162
.SH "Member Function Documentation"
 
163
.PP 
 
164
.SS "\fBQwtScaleDraw\fP & QwtScaleDraw::operator= (const \fBQwtScaleDraw\fP & other)"
 
165
.PP
 
166
Assignment operator. 
 
167
.PP
 
168
Definition at line 80 of file qwt_scale_draw.cpp.
 
169
.PP
 
170
References d_data.
 
171
.SS "void QwtScaleDraw::getBorderDistHint (const QFont & font, int & start, int & end) const"
 
172
.PP
 
173
Determine the minimum border distance. 
 
174
.PP
 
175
This member function returns the minimum space needed to draw the mark labels at the scale's endpoints.
 
176
.PP
 
177
\fBParameters:\fP
 
178
.RS 4
 
179
\fIfont\fP Font 
 
180
.br
 
181
\fIstart\fP Start border distance 
 
182
.br
 
183
\fIend\fP End border distance 
 
184
.RE
 
185
.PP
 
186
 
 
187
.PP
 
188
Definition at line 139 of file qwt_scale_draw.cpp.
 
189
.PP
 
190
References QwtAbstractScaleDraw::hasComponent(), labelRect(), QwtAbstractScaleDraw::map(), orientation(), QwtAbstractScaleDraw::scaleDiv(), and QwtScaleDiv::ticks().
 
191
.PP
 
192
Referenced by QwtSlider::layoutSlider(), QwtThermo::layoutThermo(), QwtSlider::minimumSizeHint(), and minLength().
 
193
.SS "int QwtScaleDraw::minLabelDist (const QFont & font) const"
 
194
.PP
 
195
Determine the minimum distance between two labels, that is necessary that the texts don't overlap.
 
196
.PP
 
197
\fBParameters:\fP
 
198
.RS 4
 
199
\fIfont\fP Font 
 
200
.RE
 
201
.PP
 
202
\fBReturns:\fP
 
203
.RS 4
 
204
The maximum width of a label
 
205
.RE
 
206
.PP
 
207
\fBSee also:\fP
 
208
.RS 4
 
209
\fBgetBorderDistHint()\fP 
 
210
.RE
 
211
.PP
 
212
 
 
213
.PP
 
214
Definition at line 192 of file qwt_scale_draw.cpp.
 
215
.PP
 
216
References QwtAbstractScaleDraw::hasComponent(), labelRect(), labelRotation(), orientation(), QwtAbstractScaleDraw::scaleDiv(), and QwtScaleDiv::ticks().
 
217
.PP
 
218
Referenced by minLength().
 
219
.SS "int QwtScaleDraw::minLength (const QPen & pen, const QFont & font) const"
 
220
.PP
 
221
Calculate the minimum length that is needed to draw the scale
 
222
.PP
 
223
\fBParameters:\fP
 
224
.RS 4
 
225
\fIpen\fP Pen that is used for painting backbone and ticks 
 
226
.br
 
227
\fIfont\fP Font used for painting the labels
 
228
.RE
 
229
.PP
 
230
\fBSee also:\fP
 
231
.RS 4
 
232
\fBextent()\fP 
 
233
.RE
 
234
.PP
 
235
 
 
236
.PP
 
237
Definition at line 318 of file qwt_scale_draw.cpp.
 
238
.PP
 
239
References getBorderDistHint(), QwtAbstractScaleDraw::hasComponent(), minLabelDist(), QwtAbstractScaleDraw::scaleDiv(), and QwtScaleDiv::ticks().
 
240
.PP
 
241
Referenced by QwtThermo::minimumSizeHint(), and QwtSlider::minimumSizeHint().
 
242
.SS "int QwtScaleDraw::extent (const QPen & pen, const QFont & font) const\fC [virtual]\fP"
 
243
.PP
 
244
Calculate the width/height that is needed for a vertical/horizontal scale.
 
245
.PP
 
246
The extent is calculated from the pen width of the backbone, the major tick length, the spacing and the maximum width/height of the labels.
 
247
.PP
 
248
\fBParameters:\fP
 
249
.RS 4
 
250
\fIpen\fP Pen that is used for painting backbone and ticks 
 
251
.br
 
252
\fIfont\fP Font used for painting the labels
 
253
.RE
 
254
.PP
 
255
\fBSee also:\fP
 
256
.RS 4
 
257
\fBminLength()\fP 
 
258
.RE
 
259
.PP
 
260
 
 
261
.PP
 
262
Implements \fBQwtAbstractScaleDraw\fP.
 
263
.PP
 
264
Definition at line 280 of file qwt_scale_draw.cpp.
 
265
.PP
 
266
References QwtAbstractScaleDraw::hasComponent(), QwtAbstractScaleDraw::majTickLength(), maxLabelHeight(), maxLabelWidth(), QwtAbstractScaleDraw::minimumExtent(), orientation(), and QwtAbstractScaleDraw::spacing().
 
267
.PP
 
268
Referenced by QwtThermo::minimumSizeHint(), and QwtSlider::minimumSizeHint().
 
269
.SS "void QwtScaleDraw::move (const QPoint & pos)"
 
270
.PP
 
271
Move the position of the scale. 
 
272
.PP
 
273
The meaning of the parameter pos depends on the alignment: 
 
274
.IP "\fBQwtScaleDraw::LeftScale \fP" 1c
 
275
The origin is the topmost point of the backbone. The backbone is a vertical line. Scale marks and labels are drawn at the left of the backbone. 
 
276
.IP "\fBQwtScaleDraw::RightScale \fP" 1c
 
277
The origin is the topmost point of the backbone. The backbone is a vertical line. Scale marks and labels are drawn at the right of the backbone. 
 
278
.IP "\fBQwtScaleDraw::TopScale \fP" 1c
 
279
The origin is the leftmost point of the backbone. The backbone is a horizontal line. Scale marks and labels are drawn above the backbone. 
 
280
.IP "\fBQwtScaleDraw::BottomScale \fP" 1c
 
281
The origin is the leftmost point of the backbone. The backbone is a horizontal line Scale marks and labels are drawn below the backbone. 
 
282
.PP
 
283
.PP
 
284
\fBParameters:\fP
 
285
.RS 4
 
286
\fIpos\fP Origin of the scale
 
287
.RE
 
288
.PP
 
289
\fBSee also:\fP
 
290
.RS 4
 
291
\fBpos()\fP, \fBsetLength()\fP 
 
292
.RE
 
293
.PP
 
294
 
 
295
.PP
 
296
Definition at line 566 of file qwt_scale_draw.cpp.
 
297
.SS "void QwtScaleDraw::setLength (int length)"
 
298
.PP
 
299
Set the length of the backbone.
 
300
.PP
 
301
The length doesn't include the space needed for overlapping labels.
 
302
.PP
 
303
\fBSee also:\fP
 
304
.RS 4
 
305
\fBmove()\fP, \fBminLabelDist()\fP 
 
306
.RE
 
307
.PP
 
308
 
 
309
.PP
 
310
Definition at line 589 of file qwt_scale_draw.cpp.
 
311
.PP
 
312
Referenced by QwtPlotScaleItem::draw(), QwtSlider::layoutSlider(), QwtThermo::layoutThermo(), QwtPlot::printScale(), and QwtScaleDraw().
 
313
.SS "\fBQwtScaleDraw::Alignment\fP QwtScaleDraw::alignment () const"
 
314
.PP
 
315
Return alignment of the scale 
 
316
.PP
 
317
\fBSee also:\fP
 
318
.RS 4
 
319
\fBsetAlignment()\fP 
 
320
.RE
 
321
.PP
 
322
 
 
323
.PP
 
324
Definition at line 91 of file qwt_scale_draw.cpp.
 
325
.PP
 
326
Referenced by QwtScaleWidget::alignment(), QwtPlotScaleItem::draw(), drawBackbone(), drawTick(), labelMatrix(), labelPosition(), QwtPlotScaleItem::setAlignment(), and QwtSlider::setScaleDraw().
 
327
.SS "void QwtScaleDraw::setAlignment (\fBAlignment\fP align)"
 
328
.PP
 
329
Set the alignment of the scale
 
330
.PP
 
331
The default alignment is QwtScaleDraw::BottomScale 
 
332
.PP
 
333
\fBSee also:\fP
 
334
.RS 4
 
335
\fBalignment()\fP 
 
336
.RE
 
337
.PP
 
338
 
 
339
.PP
 
340
Definition at line 102 of file qwt_scale_draw.cpp.
 
341
.PP
 
342
Referenced by QwtThermo::layoutThermo(), QwtPlotScaleItem::setAlignment(), QwtSlider::setScaleDraw(), QwtScaleWidget::setScaleDraw(), and QwtSlider::setScalePosition().
 
343
.SS "Qt::Orientation QwtScaleDraw::orientation () const"
 
344
.PP
 
345
Return the orientation
 
346
.PP
 
347
TopScale, BottomScale are horizontal (Qt::Horizontal) scales, LeftScale, RightScale are vertical (Qt::Vertical) scales.
 
348
.PP
 
349
\fBSee also:\fP
 
350
.RS 4
 
351
\fBalignment()\fP 
 
352
.RE
 
353
.PP
 
354
 
 
355
.PP
 
356
Definition at line 115 of file qwt_scale_draw.cpp.
 
357
.PP
 
358
Referenced by QwtPlotScaleItem::draw(), QwtScaleWidget::drawColorBar(), drawTick(), extent(), getBorderDistHint(), minLabelDist(), QwtPlot::printScale(), and QwtPlotScaleItem::updateScaleDiv().
 
359
.SS "QPoint QwtScaleDraw::pos () const"
 
360
.PP
 
361
\fBReturns:\fP
 
362
.RS 4
 
363
Origin of the scale 
 
364
.RE
 
365
.PP
 
366
\fBSee also:\fP
 
367
.RS 4
 
368
\fBmove()\fP, \fBlength()\fP 
 
369
.RE
 
370
.PP
 
371
 
 
372
.PP
 
373
Definition at line 576 of file qwt_scale_draw.cpp.
 
374
.PP
 
375
Referenced by boundingLabelRect(), drawBackbone(), drawLabel(), drawTick(), labelRect(), and QwtPlot::printScale().
 
376
.SS "int QwtScaleDraw::length () const"
 
377
.PP
 
378
\fBReturns:\fP
 
379
.RS 4
 
380
the length of the backbone 
 
381
.RE
 
382
.PP
 
383
\fBSee also:\fP
 
384
.RS 4
 
385
\fBsetLength()\fP, \fBpos()\fP 
 
386
.RE
 
387
.PP
 
388
 
 
389
.PP
 
390
Definition at line 604 of file qwt_scale_draw.cpp.
 
391
.PP
 
392
Referenced by QwtPlot::printScale().
 
393
.SS "void QwtScaleDraw::setLabelAlignment (\fBQt::Alignment\fP alignment)"
 
394
.PP
 
395
Change the label flags. 
 
396
.PP
 
397
Labels are aligned to the point ticklength + spacing away from the backbone.
 
398
.PP
 
399
The alignment is relative to the orientation of the label text. In case of an flags of 0 the label will be aligned depending on the orientation of the scale:
 
400
.PP
 
401
QwtScaleDraw::TopScale: Qt::AlignHCenter | Qt::AlignTop
 
402
.br
 
403
 QwtScaleDraw::BottomScale: Qt::AlignHCenter | Qt::AlignBottom
 
404
.br
 
405
 QwtScaleDraw::LeftScale: Qt::AlignLeft | Qt::AlignVCenter
 
406
.br
 
407
 QwtScaleDraw::RightScale: Qt::AlignRight | Qt::AlignVCenter
 
408
.br
 
409
.PP
 
410
Changing the alignment is often necessary for rotated labels.
 
411
.PP
 
412
\fBParameters:\fP
 
413
.RS 4
 
414
\fIalignment\fP Or'd Qt::AlignmentFlags <see qnamespace.h>
 
415
.RE
 
416
.PP
 
417
\fBSee also:\fP
 
418
.RS 4
 
419
\fBsetLabelRotation()\fP, \fBlabelRotation()\fP, \fBlabelAlignment()\fP 
 
420
.RE
 
421
.PP
 
422
\fBWarning:\fP
 
423
.RS 4
 
424
The various alignments might be confusing. The alignment of the label is not the alignment of the scale and is not the alignment of the flags (QwtText::flags()) returned from \fBQwtAbstractScaleDraw::label()\fP. 
 
425
.RE
 
426
.PP
 
427
 
 
428
.PP
 
429
Definition at line 851 of file qwt_scale_draw.cpp.
 
430
.SS "\fBQt::Alignment\fP QwtScaleDraw::labelAlignment () const"
 
431
.PP
 
432
\fBReturns:\fP
 
433
.RS 4
 
434
the label flags 
 
435
.RE
 
436
.PP
 
437
\fBSee also:\fP
 
438
.RS 4
 
439
\fBsetLabelAlignment()\fP, \fBlabelRotation()\fP 
 
440
.RE
 
441
.PP
 
442
 
 
443
.PP
 
444
Definition at line 864 of file qwt_scale_draw.cpp.
 
445
.PP
 
446
Referenced by labelMatrix().
 
447
.SS "void QwtScaleDraw::setLabelRotation (double rotation)"
 
448
.PP
 
449
Rotate all labels.
 
450
.PP
 
451
When changing the rotation, it might be necessary to adjust the label flags too. Finding a useful combination is often the result of try and error.
 
452
.PP
 
453
\fBParameters:\fP
 
454
.RS 4
 
455
\fIrotation\fP Angle in degrees. When changing the label rotation, the label flags often needs to be adjusted too.
 
456
.RE
 
457
.PP
 
458
\fBSee also:\fP
 
459
.RS 4
 
460
\fBsetLabelAlignment()\fP, \fBlabelRotation()\fP, \fBlabelAlignment()\fP. 
 
461
.RE
 
462
.PP
 
463
 
 
464
.PP
 
465
Definition at line 809 of file qwt_scale_draw.cpp.
 
466
.SS "double QwtScaleDraw::labelRotation () const"
 
467
.PP
 
468
\fBReturns:\fP
 
469
.RS 4
 
470
the label rotation 
 
471
.RE
 
472
.PP
 
473
\fBSee also:\fP
 
474
.RS 4
 
475
\fBsetLabelRotation()\fP, \fBlabelAlignment()\fP 
 
476
.RE
 
477
.PP
 
478
 
 
479
.PP
 
480
Definition at line 818 of file qwt_scale_draw.cpp.
 
481
.PP
 
482
Referenced by labelMatrix(), and minLabelDist().
 
483
.SS "int QwtScaleDraw::maxLabelHeight (const QFont & font) const"
 
484
.PP
 
485
\fBParameters:\fP
 
486
.RS 4
 
487
\fIfont\fP Font 
 
488
.RE
 
489
.PP
 
490
\fBReturns:\fP
 
491
.RS 4
 
492
the maximum height of a label 
 
493
.RE
 
494
.PP
 
495
 
 
496
.PP
 
497
Definition at line 897 of file qwt_scale_draw.cpp.
 
498
.PP
 
499
References labelSize(), QwtAbstractScaleDraw::scaleDiv(), and QwtScaleDiv::ticks().
 
500
.PP
 
501
Referenced by extent().
 
502
.SS "int QwtScaleDraw::maxLabelWidth (const QFont & font) const"
 
503
.PP
 
504
\fBParameters:\fP
 
505
.RS 4
 
506
\fIfont\fP Font 
 
507
.RE
 
508
.PP
 
509
\fBReturns:\fP
 
510
.RS 4
 
511
the maximum width of a label 
 
512
.RE
 
513
.PP
 
514
 
 
515
.PP
 
516
Definition at line 874 of file qwt_scale_draw.cpp.
 
517
.PP
 
518
References labelSize(), QwtAbstractScaleDraw::scaleDiv(), and QwtScaleDiv::ticks().
 
519
.PP
 
520
Referenced by extent().
 
521
.SS "QPoint QwtScaleDraw::labelPosition (double value) const"
 
522
.PP
 
523
Find the position, where to paint a label
 
524
.PP
 
525
The position has a distance of \fBmajTickLength()\fP + \fBspacing()\fP + 1 from the backbone. The direction depends on the \fBalignment()\fP
 
526
.PP
 
527
\fBParameters:\fP
 
528
.RS 4
 
529
\fIvalue\fP Value 
 
530
.RE
 
531
.PP
 
532
 
 
533
.PP
 
534
Definition at line 356 of file qwt_scale_draw.cpp.
 
535
.PP
 
536
References alignment(), QwtAbstractScaleDraw::hasComponent(), QwtAbstractScaleDraw::majTickLength(), QwtAbstractScaleDraw::map(), QwtAbstractScaleDraw::spacing(), and QwtScaleMap::transform().
 
537
.PP
 
538
Referenced by boundingLabelRect(), drawLabel(), and labelRect().
 
539
.SS "QRect QwtScaleDraw::labelRect (const QFont & font, double value) const"
 
540
.PP
 
541
Find the bounding rect for the label. The coordinates of the rect are relative to spacing + ticklength from the backbone in direction of the tick.
 
542
.PP
 
543
\fBParameters:\fP
 
544
.RS 4
 
545
\fIfont\fP Font used for painting 
 
546
.br
 
547
\fIvalue\fP Value 
 
548
.RE
 
549
.PP
 
550
 
 
551
.PP
 
552
Definition at line 747 of file qwt_scale_draw.cpp.
 
553
.PP
 
554
References QwtText::isEmpty(), labelMatrix(), labelPosition(), labelSize(), pos(), QwtText::textSize(), QwtAbstractScaleDraw::tickLabel(), and QwtMetricsMap::translate().
 
555
.PP
 
556
Referenced by getBorderDistHint(), labelSize(), and minLabelDist().
 
557
.SS "QSize QwtScaleDraw::labelSize (const QFont & font, double value) const"
 
558
.PP
 
559
Calculate the size that is needed to draw a label
 
560
.PP
 
561
\fBParameters:\fP
 
562
.RS 4
 
563
\fIfont\fP Label font 
 
564
.br
 
565
\fIvalue\fP Value 
 
566
.RE
 
567
.PP
 
568
 
 
569
.PP
 
570
Definition at line 791 of file qwt_scale_draw.cpp.
 
571
.PP
 
572
References labelRect().
 
573
.PP
 
574
Referenced by boundingLabelRect(), drawLabel(), labelRect(), maxLabelHeight(), and maxLabelWidth().
 
575
.SS "QRect QwtScaleDraw::boundingLabelRect (const QFont & font, double value) const"
 
576
.PP
 
577
Find the bounding rect for the label. The coordinates of the rect are absolute coordinates ( calculated from \fBpos()\fP ). in direction of the tick.
 
578
.PP
 
579
\fBParameters:\fP
 
580
.RS 4
 
581
\fIfont\fP Font used for painting 
 
582
.br
 
583
\fIvalue\fP Value
 
584
.RE
 
585
.PP
 
586
\fBSee also:\fP
 
587
.RS 4
 
588
\fBlabelRect()\fP 
 
589
.RE
 
590
.PP
 
591
 
 
592
.PP
 
593
Definition at line 652 of file qwt_scale_draw.cpp.
 
594
.PP
 
595
References QwtText::isEmpty(), labelMatrix(), labelPosition(), labelSize(), pos(), QwtText::textSize(), and QwtAbstractScaleDraw::tickLabel().
 
596
.SS "QMatrix QwtScaleDraw::labelMatrix (const QPoint & pos, const QSize & size) const\fC [protected]\fP"
 
597
.PP
 
598
Calculate the matrix that is needed to paint a label depending on its alignment and rotation.
 
599
.PP
 
600
\fBParameters:\fP
 
601
.RS 4
 
602
\fIpos\fP Position where to paint the label 
 
603
.br
 
604
\fIsize\fP Size of the label
 
605
.RE
 
606
.PP
 
607
\fBSee also:\fP
 
608
.RS 4
 
609
\fBsetLabelAlignment()\fP, \fBsetLabelRotation()\fP 
 
610
.RE
 
611
.PP
 
612
 
 
613
.PP
 
614
Definition at line 676 of file qwt_scale_draw.cpp.
 
615
.PP
 
616
References alignment(), labelAlignment(), and labelRotation().
 
617
.PP
 
618
Referenced by boundingLabelRect(), drawLabel(), and labelRect().
 
619
.SS "void QwtScaleDraw::drawTick (QPainter * painter, double value, int len) const\fC [protected, virtual]\fP"
 
620
.PP
 
621
Draw a tick
 
622
.PP
 
623
\fBParameters:\fP
 
624
.RS 4
 
625
\fIpainter\fP Painter 
 
626
.br
 
627
\fIvalue\fP Value of the tick 
 
628
.br
 
629
\fIlen\fP Lenght of the tick
 
630
.RE
 
631
.PP
 
632
\fBSee also:\fP
 
633
.RS 4
 
634
\fBdrawBackbone()\fP, \fBdrawLabel()\fP 
 
635
.RE
 
636
.PP
 
637
 
 
638
.PP
 
639
Implements \fBQwtAbstractScaleDraw\fP.
 
640
.PP
 
641
Definition at line 406 of file qwt_scale_draw.cpp.
 
642
.PP
 
643
References alignment(), QwtPainter::drawLine(), QwtMetricsMap::isIdentity(), QwtMetricsMap::layoutToDevice(), QwtMetricsMap::layoutToDeviceX(), QwtMetricsMap::layoutToDeviceY(), QwtAbstractScaleDraw::map(), QwtPainter::metricsMap(), orientation(), pos(), QwtPainter::resetMetricsMap(), QwtAbstractScaleDraw::scaleMap(), and QwtPainter::setMetricsMap().
 
644
.SS "void QwtScaleDraw::drawBackbone (QPainter * painter) const\fC [protected, virtual]\fP"
 
645
.PP
 
646
Draws the baseline of the scale 
 
647
.PP
 
648
\fBParameters:\fP
 
649
.RS 4
 
650
\fIpainter\fP Painter
 
651
.RE
 
652
.PP
 
653
\fBSee also:\fP
 
654
.RS 4
 
655
\fBdrawTick()\fP, \fBdrawLabel()\fP 
 
656
.RE
 
657
.PP
 
658
 
 
659
.PP
 
660
Implements \fBQwtAbstractScaleDraw\fP.
 
661
.PP
 
662
Definition at line 507 of file qwt_scale_draw.cpp.
 
663
.PP
 
664
References alignment(), QwtPainter::drawLine(), and pos().
 
665
.SS "void QwtScaleDraw::drawLabel (QPainter * painter, double value) const\fC [protected, virtual]\fP"
 
666
.PP
 
667
Draws the label for a major scale tick
 
668
.PP
 
669
\fBParameters:\fP
 
670
.RS 4
 
671
\fIpainter\fP Painter 
 
672
.br
 
673
\fIvalue\fP Value
 
674
.RE
 
675
.PP
 
676
\fBSee also:\fP
 
677
.RS 4
 
678
\fBdrawTick()\fP, \fBdrawBackbone()\fP, \fBboundingLabelRect()\fP 
 
679
.RE
 
680
.PP
 
681
 
 
682
.PP
 
683
Implements \fBQwtAbstractScaleDraw\fP.
 
684
.PP
 
685
Definition at line 617 of file qwt_scale_draw.cpp.
 
686
.PP
 
687
References QwtText::draw(), QwtText::isEmpty(), labelMatrix(), labelPosition(), labelSize(), pos(), QwtText::textSize(), and QwtAbstractScaleDraw::tickLabel().
 
688
 
 
689
.SH "Author"
 
690
.PP 
 
691
Generated automatically by Doxygen for Qwt User's Guide from the source code.