File: QwtAbstractScale.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 (549 lines) | stat: -rw-r--r-- 11,647 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
.TH "QwtAbstractScale" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtAbstractScale \- 
.PP
An abstract base class for widgets having a scale\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_abstract_scale\&.h>\fP
.PP
Inherits QWidget\&.
.PP
Inherited by \fBQwtAbstractSlider\fP, and \fBQwtThermo\fP\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtAbstractScale\fP (QWidget *parent=NULL)"
.br
.ti -1c
.RI "virtual \fB~QwtAbstractScale\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetScale\fP (double \fBlowerBound\fP, double \fBupperBound\fP)"
.br
.RI "\fISpecify a scale\&. \fP"
.ti -1c
.RI "void \fBsetScale\fP (const \fBQwtInterval\fP &)"
.br
.RI "\fISpecify a scale\&. \fP"
.ti -1c
.RI "void \fBsetScale\fP (const \fBQwtScaleDiv\fP &)"
.br
.RI "\fISpecify a scale\&. \fP"
.ti -1c
.RI "const \fBQwtScaleDiv\fP & \fBscaleDiv\fP () const "
.br
.ti -1c
.RI "void \fBsetLowerBound\fP (double value)"
.br
.ti -1c
.RI "double \fBlowerBound\fP () const "
.br
.ti -1c
.RI "void \fBsetUpperBound\fP (double value)"
.br
.ti -1c
.RI "double \fBupperBound\fP () const "
.br
.ti -1c
.RI "void \fBsetScaleStepSize\fP (double stepSize)"
.br
.RI "\fISet the step size used for calculating a scale division\&. \fP"
.ti -1c
.RI "double \fBscaleStepSize\fP () const "
.br
.ti -1c
.RI "void \fBsetScaleMaxMajor\fP (int ticks)"
.br
.RI "\fISet the maximum number of major tick intervals\&. \fP"
.ti -1c
.RI "int \fBscaleMaxMinor\fP () const "
.br
.ti -1c
.RI "void \fBsetScaleMaxMinor\fP (int ticks)"
.br
.RI "\fISet the maximum number of minor tick intervals\&. \fP"
.ti -1c
.RI "int \fBscaleMaxMajor\fP () const "
.br
.ti -1c
.RI "void \fBsetScaleEngine\fP (\fBQwtScaleEngine\fP *)"
.br
.RI "\fISet a scale engine\&. \fP"
.ti -1c
.RI "const \fBQwtScaleEngine\fP * \fBscaleEngine\fP () const "
.br
.ti -1c
.RI "\fBQwtScaleEngine\fP * \fBscaleEngine\fP ()"
.br
.ti -1c
.RI "int \fBtransform\fP (double) const "
.br
.ti -1c
.RI "double \fBinvTransform\fP (int) const "
.br
.ti -1c
.RI "bool \fBisInverted\fP () const "
.br
.ti -1c
.RI "double \fBminimum\fP () const "
.br
.ti -1c
.RI "double \fBmaximum\fP () const "
.br
.ti -1c
.RI "const \fBQwtScaleMap\fP & \fBscaleMap\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBrescale\fP (double \fBlowerBound\fP, double \fBupperBound\fP, double stepSize)"
.br
.ti -1c
.RI "void \fBsetAbstractScaleDraw\fP (\fBQwtAbstractScaleDraw\fP *)"
.br
.RI "\fISet a scale draw\&. \fP"
.ti -1c
.RI "const \fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP () const "
.br
.ti -1c
.RI "\fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP ()"
.br
.ti -1c
.RI "virtual void \fBscaleChange\fP ()"
.br
.RI "\fINotify changed scale\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
An abstract base class for widgets having a scale\&. 

The scale of an \fBQwtAbstractScale\fP is determined by a \fBQwtScaleDiv\fP definition, that contains the boundaries and the ticks of the scale\&. The scale is painted using a \fBQwtScaleDraw\fP object\&.
.PP
The scale division might be assigned explicitly - but usually it is calculated from the boundaries using a \fBQwtScaleEngine\fP\&.
.PP
The scale engine also decides the type of transformation of the scale ( linear, logarithmic \&.\&.\&. )\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtAbstractScale::QwtAbstractScale (QWidget *parent = \fCNULL\fP)"
Constructor
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP Parent widget
.RE
.PP
Creates a default \fBQwtScaleDraw\fP and a \fBQwtLinearScaleEngine\fP\&. The initial scale boundaries are set to [ 0\&.0, 100\&.0 ]
.PP
The \fBscaleStepSize()\fP is initialized to 0\&.0, \fBscaleMaxMajor()\fP to 5 and scaleMaxMajor to 3\&. 
.SH "Member Function Documentation"
.PP 
.SS "const \fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw () const\fC [protected]\fP"

.PP
\fBReturns:\fP
.RS 4
Scale draw 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetAbstractScaleDraw()\fP 
.RE
.PP

.SS "\fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw ()\fC [protected]\fP"

.PP
\fBReturns:\fP
.RS 4
Scale draw 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetAbstractScaleDraw()\fP 
.RE
.PP

.SS "double QwtAbstractScale::invTransform (intvalue) const"
Translate a widget coordinate into a scale value
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Widget coordinate 
.RE
.PP
\fBReturns:\fP
.RS 4
Corresponding scale coordinate for value 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleMap()\fP, \fBtransform()\fP 
.RE
.PP

.SS "bool QwtAbstractScale::isInverted () const"

.PP
\fBReturns:\fP
.RS 4
True, when the scale is increasing in opposite direction to the widget coordinates 
.RE
.PP

.SS "double QwtAbstractScale::lowerBound () const"

.PP
\fBReturns:\fP
.RS 4
Lower bound of the scale 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetLowerBound()\fP, \fBsetScale()\fP, \fBupperBound()\fP 
.RE
.PP

.SS "double QwtAbstractScale::maximum () const"

.PP
\fBReturns:\fP
.RS 4
The boundary with the larger value 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBminimum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP 
.RE
.PP

.SS "double QwtAbstractScale::minimum () const"

.PP
\fBReturns:\fP
.RS 4
The boundary with the smaller value 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBmaximum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP 
.RE
.PP

.SS "void QwtAbstractScale::rescale (doublelowerBound, doubleupperBound, doublestepSize)\fC [protected]\fP"
Recalculate the scale division and update the scale\&.
.PP
\fBParameters:\fP
.RS 4
\fIlowerBound\fP Lower limit of the scale interval 
.br
\fIupperBound\fP Upper limit of the scale interval 
.br
\fIstepSize\fP Major step size
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleChange()\fP 
.RE
.PP

.SS "const \fBQwtScaleDiv\fP & QwtAbstractScale::scaleDiv () const"

.PP
\fBReturns:\fP
.RS 4
Scale boundaries and positions of the ticks
.RE
.PP
The scale division might have been assigned explicitly or calculated implicitly by \fBrescale()\fP\&. 
.SS "const \fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine () const"

.PP
\fBReturns:\fP
.RS 4
Scale engine 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetScaleEngine()\fP 
.RE
.PP

.SS "\fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine ()"

.PP
\fBReturns:\fP
.RS 4
Scale engine 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetScaleEngine()\fP 
.RE
.PP

.SS "const \fBQwtScaleMap\fP & QwtAbstractScale::scaleMap () const"

.PP
\fBReturns:\fP
.RS 4
Map to translate between scale and widget coordinates 
.RE
.PP

.SS "int QwtAbstractScale::scaleMaxMajor () const"

.PP
\fBReturns:\fP
.RS 4
Maximal number of major tick intervals 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetScaleMaxMajor()\fP, \fBscaleMaxMinor()\fP 
.RE
.PP

.SS "int QwtAbstractScale::scaleMaxMinor () const"

.PP
\fBReturns:\fP
.RS 4
Maximal number of minor tick intervals 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetScaleMaxMinor()\fP, \fBscaleMaxMajor()\fP 
.RE
.PP

.SS "double QwtAbstractScale::scaleStepSize () const"

.PP
\fBReturns:\fP
.RS 4
Hint for the step size of the scale 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP 
.RE
.PP

.SS "void QwtAbstractScale::setAbstractScaleDraw (\fBQwtAbstractScaleDraw\fP *scaleDraw)\fC [protected]\fP"

.PP
Set a scale draw\&. scaleDraw has to be created with new and will be deleted in the destructor or the next call of \fBsetAbstractScaleDraw()\fP\&.
.PP
\fBSee Also:\fP
.RS 4
\fBabstractScaleDraw()\fP 
.RE
.PP

.SS "void QwtAbstractScale::setLowerBound (doublevalue)"
Set the lower bound of the scale
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Lower bound
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBlowerBound()\fP, \fBsetScale()\fP, \fBsetUpperBound()\fP 
.RE
.PP
\fBNote:\fP
.RS 4
For inverted scales the lower bound is greater than the upper bound 
.RE
.PP

.SS "void QwtAbstractScale::setScale (doublelowerBound, doubleupperBound)"

.PP
Specify a scale\&. Define a scale by an interval
.PP
The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
.PP
\fBParameters:\fP
.RS 4
\fIlowerBound\fP lower limit of the scale interval 
.br
\fIupperBound\fP upper limit of the scale interval
.RE
.PP
\fBNote:\fP
.RS 4
For inverted scales the lower bound is greater than the upper bound 
.RE
.PP

.SS "void QwtAbstractScale::setScale (const \fBQwtInterval\fP &interval)"

.PP
Specify a scale\&. Define a scale by an interval
.PP
The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
.PP
\fBParameters:\fP
.RS 4
\fIinterval\fP Interval 
.RE
.PP

.SS "void QwtAbstractScale::setScale (const \fBQwtScaleDiv\fP &scaleDiv)"

.PP
Specify a scale\&. \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP and have no effect\&.
.PP
\fBParameters:\fP
.RS 4
\fIscaleDiv\fP Scale division 
.RE
.PP
\fBSee Also:\fP
.RS 4
setAutoScale() 
.RE
.PP

.SS "void QwtAbstractScale::setScaleEngine (\fBQwtScaleEngine\fP *scaleEngine)"

.PP
Set a scale engine\&. The scale engine is responsible for calculating the scale division and provides a transformation between scale and widget coordinates\&.
.PP
scaleEngine has to be created with new and will be deleted in the destructor or the next call of setScaleEngine\&. 
.SS "void QwtAbstractScale::setScaleMaxMajor (intticks)"

.PP
Set the maximum number of major tick intervals\&. The scale's major ticks are calculated automatically such that the number of major intervals does not exceed ticks\&.
.PP
The default value is 5\&.
.PP
\fBParameters:\fP
.RS 4
\fIticks\fP Maximal number of major ticks\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP 
.RE
.PP

.SS "void QwtAbstractScale::setScaleMaxMinor (intticks)"

.PP
Set the maximum number of minor tick intervals\&. The scale's minor ticks are calculated automatically such that the number of minor intervals does not exceed ticks\&. The default value is 3\&.
.PP
\fBParameters:\fP
.RS 4
\fIticks\fP Maximal number of minor ticks\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP 
.RE
.PP

.SS "void QwtAbstractScale::setScaleStepSize (doublestepSize)"

.PP
Set the step size used for calculating a scale division\&. The step size is hint for calculating the intervals for the major ticks of the scale\&. A value of 0\&.0 is interpreted as no hint\&.
.PP
\fBParameters:\fP
.RS 4
\fIstepSize\fP Hint for the step size of the scale
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
.RE
.PP
\fBNote:\fP
.RS 4
Position and distance between the major ticks also depends on \fBscaleMaxMajor()\fP\&. 
.RE
.PP

.SS "void QwtAbstractScale::setUpperBound (doublevalue)"
Set the upper bound of the scale
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Upper bound
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBupperBound()\fP, \fBsetScale()\fP, \fBsetLowerBound()\fP 
.RE
.PP
\fBNote:\fP
.RS 4
For inverted scales the lower bound is greater than the upper bound 
.RE
.PP

.SS "int QwtAbstractScale::transform (doublevalue) const"
Translate a scale value into a widget coordinate
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Scale value 
.RE
.PP
\fBReturns:\fP
.RS 4
Corresponding widget coordinate for value 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBscaleMap()\fP, \fBinvTransform()\fP 
.RE
.PP

.SS "double QwtAbstractScale::upperBound () const"

.PP
\fBReturns:\fP
.RS 4
Upper bound of the scale 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetUpperBound()\fP, \fBsetScale()\fP, \fBlowerBound()\fP 
.RE
.PP


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