QwtPlot3D API  0.2.7
Protected Member Functions | Protected Attributes | List of all members
Scale Class Referenceabstract

#include <qwt3d_scale.h>

Inheritance diagram for Scale:
LinearScale LogScale

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 Scaleclone () 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
 

Detailed Description

The class encapsulates non-visual scales. She is utilized by Axis and also collaborates closely with AutoScaler. A Scale 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 yet into the Axis interface. User-defined axes can be derived from Scale, LinearScale et al.

Member Function Documentation

QString ticLabel ( unsigned int  idx) const
protectedvirtual

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.

Parameters
idxthe current major tic index
Returns
The QString representation for the value corresponding to a valid index, an empty QString else.

Reimplemented in LogScale.

int autoscale ( double &  a,
double &  b,
double  start,
double  stop,
int  ivals 
)
protectedvirtual
Parameters
aFirst major tic after applying autoscaling
bLast major tic after applying autoscaling
startScale begin
stopScale end
ivalsRequested number of major intervals
Returns
Number of major intervals after autoscaling
The default implementation sets a=start, b=stop and returns ivals.

Reimplemented in LinearScale.


The documentation for this class was generated from the following files: