1
.TH "QwtScaleEngine" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherited by \fBQwtLinearScaleEngine\fP, and \fBQwtLog10ScaleEngine\fP.
11
.SH "Detailed Description"
13
Base class for scale engines.
15
A scale engine trys to find 'reasonable' ranges and step sizes for scales.
17
The layout of the scale can be varied with \fBsetAttribute()\fP.
19
Qwt offers implementations for logarithmic (log10) and linear scales. Contributions for other types of scale engines (date/time, log2 ... ) are welcome.
21
Definition at line 50 of file qwt_scale_engine.h.
26
.RI "enum \fBAttribute\fP { \fBNoAttribute\fP = 0, \fBIncludeReference\fP = 1, \fBSymmetric\fP = 2, \fBFloating\fP = 4, \fBInverted\fP = 8 }"
29
.SS "Public Member Functions"
33
.RI "\fBQwtScaleEngine\fP ()"
36
.RI "virtual \fB~QwtScaleEngine\fP ()"
39
.RI "void \fBsetAttribute\fP (\fBAttribute\fP, bool on=true)"
42
.RI "bool \fBtestAttribute\fP (\fBAttribute\fP) const"
45
.RI "void \fBsetAttributes\fP (int)"
48
.RI "int \fBattributes\fP () const"
51
.RI "void \fBsetReference\fP (double reference)"
54
.RI "double \fBreference\fP () const"
57
.RI "void \fBsetMargins\fP (double m1, double m2)"
60
.RI "double \fBloMargin\fP () const"
63
.RI "double \fBhiMargin\fP () const"
66
.RI "virtual void \fBautoScale\fP (int maxNumSteps, double &x1, double &x2, double &stepSize) const =0"
69
.RI "virtual \fBQwtScaleDiv\fP \fBdivideScale\fP (double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize=0.0) const=0"
72
.RI "virtual \fBQwtScaleTransformation\fP * \fBtransformation\fP () const=0"
75
.SS "Protected Member Functions"
79
.RI "bool \fBcontains\fP (const \fBQwtDoubleInterval\fP &, double val) const"
82
.RI "QwtValueList \fBstrip\fP (const QwtValueList &, const \fBQwtDoubleInterval\fP &) const"
85
.RI "double \fBdivideInterval\fP (double interval, int numSteps) const "
88
.RI "\fBQwtDoubleInterval\fP \fBbuildInterval\fP (double v) const"
91
.SH "Member Enumeration Documentation"
93
.SS "enum \fBQwtScaleEngine::Attribute\fP"
95
see \fBQwtScaleEngine::setAttribute\fP, testAttribute
97
Definition at line 54 of file qwt_scale_engine.h.
98
.SH "Constructor & Destructor Documentation"
100
.SS "QwtScaleEngine::QwtScaleEngine ()\fC [explicit]\fP"
104
Definition at line 169 of file qwt_scale_engine.cpp.
105
.SS "QwtScaleEngine::~QwtScaleEngine ()\fC [virtual]\fP"
109
Definition at line 176 of file qwt_scale_engine.cpp.
110
.SH "Member Function Documentation"
112
.SS "void QwtScaleEngine::setAttribute (\fBAttribute\fP attribute, bool on = \fCtrue\fP)"
114
Change a scale attribute
118
\fIattribute\fP Attribute to change
123
The behaviour of the scale engine can be changed with the following attributes:
124
.IP "\fBQwtScaleEngine::IncludeReference \fP" 1c
125
Build a scale which includes the reference value.
126
.IP "\fBQwtScaleEngine::Symmetric \fP" 1c
127
Build a scale which is symmetric to the reference value.
128
.IP "\fBQwtScaleEngine::Floating \fP" 1c
129
The endpoints of the scale are supposed to be equal the outmost included values plus the specified margins (see \fBsetMargins()\fP). If this attribute is not* set, the endpoints of the scale will be integer multiples of the step size.
130
.IP "\fBQwtScaleEngine::Inverted \fP" 1c
131
Turn the scale upside down.
136
\fBQwtScaleEngine::testAttribute()\fP
141
Definition at line 339 of file qwt_scale_engine.cpp.
142
.SS "bool QwtScaleEngine::testAttribute (\fBAttribute\fP attribute) const"
144
Check if a attribute is set.
148
\fIattribute\fP Attribute to be tested
153
\fBQwtScaleEngine::setAttribute()\fP for a description of the possible options.
158
Definition at line 353 of file qwt_scale_engine.cpp.
160
Referenced by QwtLog10ScaleEngine::autoScale(), and QwtLinearScaleEngine::autoScale().
161
.SS "void QwtScaleEngine::setAttributes (int attributes)"
163
Change the scale attribute
167
\fIattributes\fP Set scale attributes
172
\fBQwtScaleEngine::attributes()\fP
177
Definition at line 364 of file qwt_scale_engine.cpp.
179
Referenced by QwtLog10ScaleEngine::divideScale().
180
.SS "int QwtScaleEngine::attributes () const"
182
Return the scale attributes
184
Definition at line 372 of file qwt_scale_engine.cpp.
186
Referenced by QwtLog10ScaleEngine::divideScale().
187
.SS "void QwtScaleEngine::setReference (double r)"
189
Specify a reference point.
193
\fIr\fP new reference value
196
The reference point is needed if options IncludeRef or Symmetric are active. Its default value is 0.0.
198
Definition at line 384 of file qwt_scale_engine.cpp.
200
Referenced by QwtLog10ScaleEngine::divideScale().
201
.SS "double QwtScaleEngine::reference () const"
210
\fBQwtScaleEngine::setReference()\fP, QwtScaleEngine::setOptions()
215
Definition at line 393 of file qwt_scale_engine.cpp.
217
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), and QwtLog10ScaleEngine::divideScale().
218
.SS "void QwtScaleEngine::setMargins (double mlo, double mhi)"
220
Specify margins at the scale's endpoints.
224
\fImlo\fP minimum distance between the scale's lower boundary and the smallest enclosed value
226
\fImhi\fP minimum distance between the scale's upper boundary and the greatest enclosed value
229
Margins can be used to leave a minimum amount of space between the enclosed intervals and the boundaries of the scale.
235
\fBQwtLog10ScaleEngine\fP measures the margins in decades.
241
\fBQwtScaleEngine::hiMargin\fP, \fBQwtScaleEngine::loMargin\fP
246
Definition at line 219 of file qwt_scale_engine.cpp.
248
Referenced by QwtLog10ScaleEngine::divideScale().
249
.SS "double QwtScaleEngine::loMargin () const"
253
the margin at the lower end of the scale The default margin is 0.
258
\fBQwtScaleEngine::setMargins()\fP
263
Definition at line 187 of file qwt_scale_engine.cpp.
265
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), and QwtLog10ScaleEngine::divideScale().
266
.SS "double QwtScaleEngine::hiMargin () const"
270
the margin at the upper end of the scale The default margin is 0.
275
\fBQwtScaleEngine::setMargins()\fP
280
Definition at line 198 of file qwt_scale_engine.cpp.
282
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), and QwtLog10ScaleEngine::divideScale().
283
.SS "virtual void QwtScaleEngine::autoScale (int maxNumSteps, double & x1, double & x2, double & stepSize) const\fC [pure virtual]\fP"
285
Align and divide an interval
289
\fImaxNumSteps\fP Max. number of steps
291
\fIx1\fP First limit of the interval (In/Out)
293
\fIx2\fP Second limit of the interval (In/Out)
295
\fIstepSize\fP Step size (Return value)
300
Implemented in \fBQwtLinearScaleEngine\fP, and \fBQwtLog10ScaleEngine\fP.
301
.SS "virtual \fBQwtScaleDiv\fP QwtScaleEngine::divideScale (double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize = \fC0.0\fP) const\fC [pure virtual]\fP"
303
Calculate a scale division.
307
\fIx1\fP First interval limit
309
\fIx2\fP Second interval limit
311
\fImaxMajSteps\fP Maximum for the number of major steps
313
\fImaxMinSteps\fP Maximum number of minor steps
315
\fIstepSize\fP Step size. If stepSize == 0.0, the scaleEngine calculates one.
320
Implemented in \fBQwtLinearScaleEngine\fP, and \fBQwtLog10ScaleEngine\fP.
321
.SS "virtual \fBQwtScaleTransformation\fP* QwtScaleEngine::transformation () const\fC [pure virtual]\fP"
330
Implemented in \fBQwtLinearScaleEngine\fP, and \fBQwtLog10ScaleEngine\fP.
331
.SS "bool QwtScaleEngine::contains (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [protected]\fP"
333
Check if an interval 'contains' a value
337
\fIinterval\fP Interval
344
\fBQwtScaleArithmetic::compareEps\fP
349
Definition at line 251 of file qwt_scale_engine.cpp.
351
References QwtScaleArithmetic::compareEps(), QwtDoubleInterval::isValid(), QwtDoubleInterval::maxValue(), QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().
353
Referenced by strip().
354
.SS "QwtValueList QwtScaleEngine::strip (const QwtValueList & ticks, const \fBQwtDoubleInterval\fP & interval) const\fC [protected]\fP"
356
Remove ticks from a list, that are not inside an interval
360
\fIticks\fP Tick list
362
\fIinterval\fP Interval
372
Definition at line 280 of file qwt_scale_engine.cpp.
374
References contains(), and QwtDoubleInterval::isValid().
375
.SS "double QwtScaleEngine::divideInterval (double intervalSize, int numSteps) const\fC [protected]\fP"
377
Calculate a step size for an interval size
381
\fIintervalSize\fP Interval size
383
\fInumSteps\fP Number of steps
393
Definition at line 233 of file qwt_scale_engine.cpp.
395
References QwtScaleArithmetic::ceil125(), and QwtScaleArithmetic::divideEps().
397
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), QwtLog10ScaleEngine::divideScale(), and QwtLinearScaleEngine::divideScale().
398
.SS "\fBQwtDoubleInterval\fP QwtScaleEngine::buildInterval (double v) const\fC [protected]\fP"
400
Build an interval for a value.
402
In case of v == 0.0 the interval is [-0.5, 0.5], otherwide it is [0.5 * v, 1.5 * v]
404
Definition at line 309 of file qwt_scale_engine.cpp.
406
Referenced by QwtLog10ScaleEngine::autoScale(), and QwtLinearScaleEngine::autoScale().
410
Generated automatically by Doxygen for Qwt User's Guide from the source code.