Non-visual scale class encapsulating tic generation.
More...
#include <qwt3d_scale.h>
|
| virtual QString | ticLabel (unsigned int idx) const |
| | Maps the double value at tic-position idx to a final representation.
|
| |
| virtual void | setLimits (double start, double stop) |
| | Sets start and stop value for the scale.
|
| |
| virtual void | setMajors (int val) |
| | Sets number of major intervals.
|
| |
| virtual void | setMinors (int val) |
| | Sets number of minor intervals per major interval.
|
| |
| virtual void | setMajorLimits (double start, double stop) |
| | Sets value of first and last major tic.
|
| |
| int | majors () const |
| | Returns major intervals.
|
| |
| int | minors () const |
| | Returns minor intervals.
|
| |
| virtual Qwt3DScale * | clone () const =0 |
| |
| virtual void | calculate ()=0 |
| |
| virtual int | autoscale (double &a, double &b, double start, double stop, int ivals) |
| | Autoscales the axis.
|
| |
| const std::vector< double > & | majorTicks () const |
| | Returns const reference to major tic positions.
|
| |
| const std::vector< double > & | minorTicks () const |
| | Returns const reference to minor tic positions.
|
| |
| void | copyFrom (const Qwt3DScale &other) |
| | Copies Qwt3DScale base state from another Qwt3DScale.
|
| |
|
|
class | Qwt3DAxis |
| |
|
class | Qwt3DClonePtr< Qwt3DScale > |
| |
Non-visual scale class encapsulating tic generation.
The class encapsulates non-visual scales. It is utilized by Qwt3DAxis and also collaborates closely with Qwt3DAutoScaler. A Qwt3DScale allows control over all aspects of tic generation including arbitrary transformations of tic values into corresponding strings. The strings contain what eventually will be shown as tic labels. Standard linear and logarithmic scales have been integrated into the Qwt3DAxis interface. User-defined axes can be derived from Qwt3DScale, Qwt3DLinearScale et al.
◆ autoscale()
| int Qwt3DScale::autoscale |
( |
double & |
a, |
|
|
double & |
b, |
|
|
double |
start, |
|
|
double |
stop, |
|
|
int |
ivals |
|
) |
| |
|
protectedvirtual |
Autoscales the axis.
- Parameters
-
| [out] | a | First major tic after applying autoscaling |
| [out] | b | Last major tic after applying autoscaling |
| start | Scale begin |
| stop | Scale end |
| ivals | Requested number of major intervals |
- Returns
- Number of major intervals after autoscaling
The default implementation sets a=start, b=stop and returns ivals.
Reimplemented in Qwt3DLinearScale.
◆ calculate()
| virtual void Qwt3DScale::calculate |
( |
| ) |
|
|
protectedpure virtual |
◆ clone()
◆ copyFrom()
| void Qwt3DScale::copyFrom |
( |
const Qwt3DScale & |
other | ) |
|
|
protected |
Copies Qwt3DScale base state from another Qwt3DScale.
- Parameters
-
Used by derived class clone() implementations to copy the Qwt3DScale base data without requiring a copy constructor.
◆ majors()
| int Qwt3DScale::majors |
( |
| ) |
const |
|
protected |
Returns major intervals.
- Returns
- Number of major intervals
◆ majorTicks()
| const std::vector< double > & Qwt3DScale::majorTicks |
( |
| ) |
const |
|
protected |
Returns const reference to major tic positions.
- Returns
- Const reference to the vector of major tic positions
◆ minors()
| int Qwt3DScale::minors |
( |
| ) |
const |
|
protected |
Returns minor intervals.
- Returns
- Number of minor intervals
◆ minorTicks()
| const std::vector< double > & Qwt3DScale::minorTicks |
( |
| ) |
const |
|
protected |
Returns const reference to minor tic positions.
- Returns
- Const reference to the vector of minor tic positions
◆ setLimits()
| void Qwt3DScale::setLimits |
( |
double |
start, |
|
|
double |
stop |
|
) |
| |
|
protectedvirtual |
Sets start and stop value for the scale.
- Parameters
-
| start | Scale start value |
| stop | Scale stop value |
◆ setMajorLimits()
| void Qwt3DScale::setMajorLimits |
( |
double |
start, |
|
|
double |
stop |
|
) |
| |
|
protectedvirtual |
Sets value of first and last major tic.
- Parameters
-
| start | First major tic value |
| stop | Last major tic value |
◆ setMajors()
| void Qwt3DScale::setMajors |
( |
int |
val | ) |
|
|
protectedvirtual |
Sets number of major intervals.
- Parameters
-
| val | Number of major intervals |
◆ setMinors()
| void Qwt3DScale::setMinors |
( |
int |
val | ) |
|
|
protectedvirtual |
Sets number of minor intervals per major interval.
- Parameters
-
| val | Number of minor intervals |
Reimplemented in Qwt3DLogScale.
◆ ticLabel()
| QString Qwt3DScale::ticLabel |
( |
unsigned int |
idx | ) |
const |
|
protectedvirtual |
Maps the double value at tic-position idx to a final representation.
- Parameters
-
| idx | The current major tic index |
- Returns
- The QString representation for the value corresponding to a valid index, an empty QString else.
The default return value is simply the tic values QString representation. Overwrite this function, if you plan to transform the value in some way. See e.g. Qwt3DLogScale::ticLabel.
Reimplemented in Qwt3DLogScale.
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot3d/qwt3d_scale.h
- /home/runner/work/QWT/QWT/src/plot3d/qwt3d_scale.cpp