Qwt User's Guide
6.0.1
|
#include <qwt_abstract_scale.h>
Public Member Functions | |
bool | autoScale () const |
QwtAbstractScale () | |
const QwtScaleEngine * | scaleEngine () const |
QwtScaleEngine * | scaleEngine () |
const QwtScaleMap & | scaleMap () const |
int | scaleMaxMajor () const |
int | scaleMaxMinor () const |
void | setAutoScale () |
void | setScale (double vmin, double vmax, double step=0.0) |
void | setScale (const QwtInterval &, double step=0.0) |
void | setScale (const QwtScaleDiv &) |
void | setScaleEngine (QwtScaleEngine *) |
void | setScaleMaxMajor (int ticks) |
void | setScaleMaxMinor (int ticks) |
virtual | ~QwtAbstractScale () |
Protected Member Functions | |
const QwtAbstractScaleDraw * | abstractScaleDraw () const |
QwtAbstractScaleDraw * | abstractScaleDraw () |
void | rescale (double vmin, double vmax, double step=0.0) |
virtual void | scaleChange () |
void | setAbstractScaleDraw (QwtAbstractScaleDraw *) |
An abstract base class for classes containing a scale.
QwtAbstractScale is used to provide classes with a QwtScaleDraw, and a QwtScaleDiv. The QwtScaleDiv might be set explicitely or calculated by a QwtScaleEngine.
Constructor
Creates a default QwtScaleDraw and a QwtLinearScaleEngine. Autoscaling is enabled, and the stepSize is initialized by 0.0.
QwtAbstractScale::~QwtAbstractScale | ( | ) | [virtual] |
Destructor.
const QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw | ( | ) | const [protected] |
QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw | ( | ) | [protected] |
bool QwtAbstractScale::autoScale | ( | ) | const |
true
if autoscaling is enabled void QwtAbstractScale::rescale | ( | double | vmin, |
double | vmax, | ||
double | stepSize = 0.0 |
||
) | [protected] |
Recalculate the scale division and update the scale draw.
vmin | Lower limit of the scale interval |
vmax | Upper limit of the scale interval |
stepSize | Major step size |
void QwtAbstractScale::scaleChange | ( | ) | [protected, virtual] |
const QwtScaleEngine * QwtAbstractScale::scaleEngine | ( | ) | const |
const QwtScaleMap & QwtAbstractScale::scaleMap | ( | ) | const |
int QwtAbstractScale::scaleMaxMajor | ( | ) | const |
int QwtAbstractScale::scaleMaxMinor | ( | ) | const |
void QwtAbstractScale::setAbstractScaleDraw | ( | QwtAbstractScaleDraw * | scaleDraw | ) | [protected] |
Set a scale draw.
scaleDraw has to be created with new and will be deleted in ~QwtAbstractScale or the next call of setAbstractScaleDraw.
void QwtAbstractScale::setAutoScale | ( | ) |
Advise the widget to control the scale range internally.
Autoscaling is on by default.
void QwtAbstractScale::setScale | ( | double | vmin, |
double | vmax, | ||
double | stepSize = 0.0 |
||
) |
Specify a scale.
Disable autoscaling and define a scale by an interval and a step size
vmin | lower limit of the scale interval |
vmax | upper limit of the scale interval |
stepSize | major step size |
void QwtAbstractScale::setScale | ( | const QwtInterval & | interval, |
double | stepSize = 0.0 |
||
) |
Specify a scale.
Disable autoscaling and define a scale by an interval and a step size
interval | Interval |
stepSize | major step size |
void QwtAbstractScale::setScale | ( | const QwtScaleDiv & | scaleDiv | ) |
Specify a scale.
Disable autoscaling and define a scale by a scale division
scaleDiv | Scale division |
void QwtAbstractScale::setScaleEngine | ( | QwtScaleEngine * | scaleEngine | ) |
Set a scale engine.
The scale engine is responsible for calculating the scale division, and in case of auto scaling how to align the scale.
scaleEngine has to be created with new and will be deleted in ~QwtAbstractScale or the next call of setScaleEngine.
void QwtAbstractScale::setScaleMaxMajor | ( | int | ticks | ) |
Set the maximum number of major tick intervals.
The scale's major ticks are calculated automatically such that the number of major intervals does not exceed ticks. The default value is 5.
ticks | maximal number of major ticks. |
void QwtAbstractScale::setScaleMaxMinor | ( | int | ticks | ) |
Set the maximum number of minor tick intervals.
The scale's minor ticks are calculated automatically such that the number of minor intervals does not exceed ticks. The default value is 3.
ticks |