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
|
.TH "QwtScaleEngine" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtScaleEngine \-
.PP
Base class for scale engines\&.
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_scale_engine\&.h>\fP
.PP
Inherited by \fBQwtLinearScaleEngine\fP, and \fBQwtLogScaleEngine\fP\&.
.SS "Public Types"
.in +1c
.ti -1c
.RI "enum \fBAttribute\fP { \fBNoAttribute\fP = 0x00, \fBIncludeReference\fP = 0x01, \fBSymmetric\fP = 0x02, \fBFloating\fP = 0x04, \fBInverted\fP = 0x08 }"
.br
.ti -1c
.RI "typedef QFlags< \fBAttribute\fP > \fBAttributes\fP"
.br
.RI "\fILayout attributes\&. \fP"
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBQwtScaleEngine\fP (uint \fBbase\fP=10)"
.br
.ti -1c
.RI "virtual \fB~QwtScaleEngine\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetBase\fP (uint \fBbase\fP)"
.br
.ti -1c
.RI "uint \fBbase\fP () const "
.br
.ti -1c
.RI "void \fBsetAttribute\fP (\fBAttribute\fP, bool on=true)"
.br
.ti -1c
.RI "bool \fBtestAttribute\fP (\fBAttribute\fP) const "
.br
.ti -1c
.RI "void \fBsetAttributes\fP (\fBAttributes\fP)"
.br
.ti -1c
.RI "\fBAttributes\fP \fBattributes\fP () const "
.br
.ti -1c
.RI "void \fBsetReference\fP (double \fBreference\fP)"
.br
.RI "\fISpecify a reference point\&. \fP"
.ti -1c
.RI "double \fBreference\fP () const "
.br
.ti -1c
.RI "void \fBsetMargins\fP (double lower, double upper)"
.br
.RI "\fISpecify margins at the scale's endpoints\&. \fP"
.ti -1c
.RI "double \fBlowerMargin\fP () const "
.br
.ti -1c
.RI "double \fBupperMargin\fP () const "
.br
.ti -1c
.RI "virtual void \fBautoScale\fP (int maxNumSteps, double &x1, double &x2, double &stepSize) const =0"
.br
.ti -1c
.RI "virtual \fBQwtScaleDiv\fP \fBdivideScale\fP (double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0\&.0) const =0"
.br
.RI "\fICalculate a scale division\&. \fP"
.ti -1c
.RI "void \fBsetTransformation\fP (\fBQwtTransform\fP *)"
.br
.ti -1c
.RI "\fBQwtTransform\fP * \fBtransformation\fP () const "
.br
.in -1c
.SS "Protected Member Functions"
.in +1c
.ti -1c
.RI "bool \fBcontains\fP (const \fBQwtInterval\fP &, double val) const "
.br
.ti -1c
.RI "QList< double > \fBstrip\fP (const QList< double > &, const \fBQwtInterval\fP &) const "
.br
.ti -1c
.RI "double \fBdivideInterval\fP (double interval, int numSteps) const "
.br
.ti -1c
.RI "\fBQwtInterval\fP \fBbuildInterval\fP (double v) const "
.br
.RI "\fIBuild an interval around a value\&. \fP"
.in -1c
.SH "Detailed Description"
.PP
Base class for scale engines\&.
A scale engine tries to find 'reasonable' ranges and step sizes for scales\&.
.PP
The layout of the scale can be varied with \fBsetAttribute()\fP\&.
.PP
Qwt offers implementations for logarithmic and linear scales\&.
.SH "Member Enumeration Documentation"
.PP
.SS "enum \fBQwtScaleEngine::Attribute\fP"
Layout attributes
.PP
\fBSee Also:\fP
.RS 4
\fBsetAttribute()\fP, \fBtestAttribute()\fP, \fBreference()\fP, \fBlowerMargin()\fP, \fBupperMargin()\fP
.RE
.PP
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fINoAttribute \fP\fP
No attributes\&.
.TP
\fB\fIIncludeReference \fP\fP
Build a scale which includes the \fBreference()\fP value\&.
.TP
\fB\fISymmetric \fP\fP
Build a scale which is symmetric to the \fBreference()\fP value\&.
.TP
\fB\fIFloating \fP\fP
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 \fInot\fP set, the endpoints of the scale will be integer multiples of the step size\&.
.TP
\fB\fIInverted \fP\fP
Turn the scale upside down\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "QwtScaleEngine::QwtScaleEngine (uintbase = \fC10\fP)\fC [explicit]\fP"
Constructor
.PP
\fBParameters:\fP
.RS 4
\fIbase\fP Base of the scale engine
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetBase()\fP
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "\fBQwtScaleEngine::Attributes\fP QwtScaleEngine::attributes () const"
.PP
\fBReturns:\fP
.RS 4
Scale attributes
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBAttribute\fP, \fBsetAttributes()\fP, \fBtestAttribute()\fP
.RE
.PP
.SS "virtual void QwtScaleEngine::autoScale (intmaxNumSteps, double &x1, double &x2, double &stepSize) const\fC [pure virtual]\fP"
Align and divide an interval
.PP
\fBParameters:\fP
.RS 4
\fImaxNumSteps\fP Max\&. number of steps
.br
\fIx1\fP First limit of the interval (In/Out)
.br
\fIx2\fP Second limit of the interval (In/Out)
.br
\fIstepSize\fP Step size (Return value)
.RE
.PP
.PP
Implemented in \fBQwtLogScaleEngine\fP, \fBQwtLinearScaleEngine\fP, and \fBQwtDateScaleEngine\fP\&.
.SS "uint QwtScaleEngine::base () const"
.PP
\fBReturns:\fP
.RS 4
base Base of the scale engine
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetBase()\fP
.RE
.PP
.SS "\fBQwtInterval\fP QwtScaleEngine::buildInterval (doublevalue) const\fC [protected]\fP"
.PP
Build an interval around a value\&. In case of v == 0\&.0 the interval is [-0\&.5, 0\&.5], otherwide it is [0\&.5 * v, 1\&.5 * v]
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Initial value
.RE
.PP
\fBReturns:\fP
.RS 4
Calculated interval
.RE
.PP
.SS "bool QwtScaleEngine::contains (const \fBQwtInterval\fP &interval, doublevalue) const\fC [protected]\fP"
Check if an interval 'contains' a value
.PP
\fBParameters:\fP
.RS 4
\fIinterval\fP Interval
.br
\fIvalue\fP Value
.RE
.PP
\fBReturns:\fP
.RS 4
True, when the value is inside the interval
.RE
.PP
.SS "double QwtScaleEngine::divideInterval (doubleintervalSize, intnumSteps) const\fC [protected]\fP"
Calculate a step size for an interval size
.PP
\fBParameters:\fP
.RS 4
\fIintervalSize\fP Interval size
.br
\fInumSteps\fP Number of steps
.RE
.PP
\fBReturns:\fP
.RS 4
Step size
.RE
.PP
.SS "virtual \fBQwtScaleDiv\fP QwtScaleEngine::divideScale (doublex1, doublex2, intmaxMajorSteps, intmaxMinorSteps, doublestepSize = \fC0\&.0\fP) const\fC [pure virtual]\fP"
.PP
Calculate a scale division\&.
.PP
\fBParameters:\fP
.RS 4
\fIx1\fP First interval limit
.br
\fIx2\fP Second interval limit
.br
\fImaxMajorSteps\fP Maximum for the number of major steps
.br
\fImaxMinorSteps\fP Maximum number of minor steps
.br
\fIstepSize\fP Step size\&. If stepSize == 0\&.0, the scaleEngine calculates one\&.
.RE
.PP
\fBReturns:\fP
.RS 4
Calculated scale division
.RE
.PP
.PP
Implemented in \fBQwtLogScaleEngine\fP, \fBQwtLinearScaleEngine\fP, and \fBQwtDateScaleEngine\fP\&.
.SS "double QwtScaleEngine::lowerMargin () const"
.PP
\fBReturns:\fP
.RS 4
the margin at the lower end of the scale The default margin is 0\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetMargins()\fP
.RE
.PP
.SS "double QwtScaleEngine::reference () const"
.PP
\fBReturns:\fP
.RS 4
the reference value
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetReference()\fP, \fBsetAttribute()\fP
.RE
.PP
.SS "void QwtScaleEngine::setAttribute (\fBAttribute\fPattribute, boolon = \fCtrue\fP)"
Change a scale attribute
.PP
\fBParameters:\fP
.RS 4
\fIattribute\fP Attribute to change
.br
\fIon\fP On/Off
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBAttribute\fP, \fBtestAttribute()\fP
.RE
.PP
.SS "void QwtScaleEngine::setAttributes (\fBAttributes\fPattributes)"
Change the scale attribute
.PP
\fBParameters:\fP
.RS 4
\fIattributes\fP Set scale attributes
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBAttribute\fP, \fBattributes()\fP
.RE
.PP
.SS "void QwtScaleEngine::setBase (uintbase)"
Set the base of the scale engine
.PP
While a base of 10 is what 99\&.9% of all applications need certain scales might need a different base: f\&.e 2
.PP
The default setting is 10
.PP
\fBParameters:\fP
.RS 4
\fIbase\fP Base of the engine
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBbase()\fP
.RE
.PP
.SS "void QwtScaleEngine::setMargins (doublelower, doubleupper)"
.PP
Specify margins at the scale's endpoints\&.
.PP
\fBParameters:\fP
.RS 4
\fIlower\fP minimum distance between the scale's lower boundary and the smallest enclosed value
.br
\fIupper\fP minimum distance between the scale's upper boundary and the greatest enclosed value
.RE
.PP
Margins can be used to leave a minimum amount of space between the enclosed intervals and the boundaries of the scale\&.
.PP
\fBWarning:\fP
.RS 4
.PD 0
.IP "\(bu" 2
\fBQwtLogScaleEngine\fP measures the margins in decades\&.
.PP
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBupperMargin()\fP, \fBlowerMargin()\fP
.RE
.PP
.SS "void QwtScaleEngine::setReference (doubler)"
.PP
Specify a reference point\&.
.PP
\fBParameters:\fP
.RS 4
\fIr\fP new reference value
.RE
.PP
The reference point is needed if options IncludeReference or Symmetric are active\&. Its default value is 0\&.0\&.
.PP
\fBSee Also:\fP
.RS 4
\fBAttribute\fP
.RE
.PP
.SS "void QwtScaleEngine::setTransformation (\fBQwtTransform\fP *transform)"
Assign a transformation
.PP
\fBParameters:\fP
.RS 4
\fItransform\fP Transformation
.RE
.PP
The transformation object is used as factory for clones that are returned by \fBtransformation()\fP
.PP
The scale engine takes ownership of the transformation\&.
.PP
\fBSee Also:\fP
.RS 4
\fBQwtTransform::copy()\fP, \fBtransformation()\fP
.RE
.PP
.SS "QList< double > QwtScaleEngine::strip (const QList< double > &ticks, const \fBQwtInterval\fP &interval) const\fC [protected]\fP"
Remove ticks from a list, that are not inside an interval
.PP
\fBParameters:\fP
.RS 4
\fIticks\fP Tick list
.br
\fIinterval\fP Interval
.RE
.PP
\fBReturns:\fP
.RS 4
Stripped tick list
.RE
.PP
.SS "bool QwtScaleEngine::testAttribute (\fBAttribute\fPattribute) const"
.PP
\fBReturns:\fP
.RS 4
True, if attribute is enabled\&.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIattribute\fP Attribute to be tested
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBAttribute\fP, \fBsetAttribute()\fP
.RE
.PP
.SS "\fBQwtTransform\fP * QwtScaleEngine::transformation () const"
Create and return a clone of the transformation of the engine\&. When the engine has no special transformation NULL is returned, indicating no transformation\&.
.PP
\fBReturns:\fP
.RS 4
A clone of the transfomation
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetTransformation()\fP
.RE
.PP
.SS "double QwtScaleEngine::upperMargin () const"
.PP
\fBReturns:\fP
.RS 4
the margin at the upper end of the scale The default margin is 0\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetMargins()\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
|