#include <qwt3d_scale.h>
Inheritance diagram for Scale:
Protected Member Functions | |
virtual QString | ticLabel (unsigned int idx) const |
virtual void | setLimits (double start, double stop) |
virtual void | setMajors (int val) |
virtual void | setMinors (int val) |
virtual void | setMajorLimits (double start, double stop) |
int | majors () const |
int | minors () const |
virtual Scale * | clone () const=0 |
virtual void | calculate ()=0 |
virtual int | autoscale (double &a, double &b, double start, double stop, int ivals) |
Protected Attributes | |
std::vector< double > | majors_p |
std::vector< double > | minors_p |
double | start_p |
double | stop_p |
int | majorintervals_p |
int | minorintervals_p |
double | mstart_p |
double | mstop_p |
QString ticLabel | ( | unsigned int | idx | ) | const [protected, virtual] |
The function maps the double value at tic-position idx to a final representation. 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. LogScale::ticLabel.
idx | the current major tic index |
Reimplemented in LogScale.
void setLimits | ( | double | start, | |
double | stop | |||
) | [protected, virtual] |
Sets start and stop value for the scale;.
virtual void setMajors | ( | int | val | ) | [inline, protected, virtual] |
Sets number of major intervals.
virtual void setMinors | ( | int | val | ) | [inline, protected, virtual] |
void setMajorLimits | ( | double | start, | |
double | stop | |||
) | [protected, virtual] |
Sets value of first major tic.
int majors | ( | ) | const [inline, protected] |
Returns major intervals.
int minors | ( | ) | const [inline, protected] |
Returns minor intervals.
virtual Scale* clone | ( | ) | const [protected, pure virtual] |
Derived classes should return a new heap based object here.
Implemented in LinearScale, and LogScale.
virtual void calculate | ( | ) | [protected, pure virtual] |
This function should setup the 2 vectors for major and minor positions;.
Implemented in LinearScale, and LogScale.
int autoscale | ( | double & | a, | |
double & | b, | |||
double | start, | |||
double | stop, | |||
int | ivals | |||
) | [protected, virtual] |
a | First major tic after applying autoscaling | |
b | Last major tic after applying autoscaling | |
start | Scale begin | |
stop | Scale end | |
ivals | Requested number of major intervals |
Reimplemented in LinearScale.