Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

QwtAbstractScale Class Reference

Inheritance diagram for QwtAbstractScale:

Inheritance graph
[legend]
List of all members.

Detailed Description

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.

Definition at line 28 of file qwt_abstract_scale.h.

Public Member Functions

 QwtAbstractScale ()
virtual ~QwtAbstractScale ()
void setScale (double vmin, double vmax, double step=0.0)
void setScale (const QwtDoubleInterval &, double step=0.0)
void setScale (const QwtScaleDiv &s)
void setAutoScale ()
bool autoScale () const
void setScaleMaxMajor (int ticks)
int scaleMaxMinor () const
void setScaleMaxMinor (int ticks)
int scaleMaxMajor () const
void setScaleDraw (QwtScaleDraw *)
const QwtScaleDrawscaleDraw () const
void setScaleEngine (QwtScaleEngine *)
const QwtScaleEnginescaleEngine () const
QwtScaleEnginescaleEngine ()

Protected Member Functions

void rescale (double vmin, double vmax, double step=0.0)
QwtScaleDrawscaleDraw ()
virtual void scaleChange ()


Constructor & Destructor Documentation

QwtAbstractScale::QwtAbstractScale  ) 
 

Constructor

Creates a default QwtScaleDraw and a QwtLinearScaleEngine. Autoscaling is enabled, and the stepSize is initialized by 0.0.

Definition at line 52 of file qwt_abstract_scale.cpp.

References rescale().

QwtAbstractScale::~QwtAbstractScale  )  [virtual]
 

Destructor.

Definition at line 59 of file qwt_abstract_scale.cpp.


Member Function Documentation

bool QwtAbstractScale::autoScale  )  const
 

Returns:
true if autoscaling is enabled

Definition at line 159 of file qwt_abstract_scale.cpp.

Referenced by QwtSlider::rangeChange(), and QwtThermo::setRange().

void QwtAbstractScale::rescale double  vmin,
double  vmax,
double  stepSize = 0.0
[protected]
 

Recalculate the scale division and update the scale draw.

Parameters:
vmin Lower limit of the scale interval
vmax Upper limit of the scale interval
stepSize Major step size
See also:
QwtAbstractScale::scaleChange

Definition at line 127 of file qwt_abstract_scale.cpp.

References scaleChange().

Referenced by QwtAbstractScale(), QwtSlider::rangeChange(), QwtThermo::setRange(), and setScale().

void QwtAbstractScale::scaleChange  )  [protected, virtual]
 

Notify changed scale.

Dummy empty implementation, intended to be overloaded by derived classes

Reimplemented in QwtSlider, and QwtThermo.

Definition at line 298 of file qwt_abstract_scale.cpp.

Referenced by rescale(), setAutoScale(), and setScale().

QwtScaleDraw * QwtAbstractScale::scaleDraw  )  [protected]
 

Returns:
Scale draw
See also:
QwtAbstractScale::setScaleDraw

Definition at line 237 of file qwt_abstract_scale.cpp.

const QwtScaleDraw * QwtAbstractScale::scaleDraw  )  const
 

Returns:
Scale draw
See also:
QwtAbstractScale::setScaleDraw

Definition at line 246 of file qwt_abstract_scale.cpp.

Referenced by QwtThermo::draw(), QwtSlider::draw(), QwtKnob::draw(), QwtSlider::getScrollMode(), QwtSlider::layoutSlider(), QwtThermo::layoutThermo(), QwtThermo::minimumSizeHint(), QwtSlider::minimumSizeHint(), QwtKnob::minimumSizeHint(), QwtKnob::QwtKnob(), QwtSlider::QwtSlider(), setScaleDraw(), and QwtKnob::setTotalAngle().

QwtScaleEngine * QwtAbstractScale::scaleEngine  ) 
 

Returns:
Scale engine
See also:
QwtAbstractScale::setScaleEngine

Definition at line 288 of file qwt_abstract_scale.cpp.

const QwtScaleEngine * QwtAbstractScale::scaleEngine  )  const
 

Returns:
Scale engine
See also:
QwtAbstractScale::setScaleEngine

Definition at line 279 of file qwt_abstract_scale.cpp.

Referenced by QwtThermo::setRange(), and setScaleEngine().

int QwtAbstractScale::scaleMaxMajor  )  const
 

Returns:
Max. number of major tick intervals The default value is 5.

Definition at line 213 of file qwt_abstract_scale.cpp.

int QwtAbstractScale::scaleMaxMinor  )  const
 

Returns:
Max. number of minor tick intervals The default value is 3.

Definition at line 204 of file qwt_abstract_scale.cpp.

void QwtAbstractScale::setAutoScale  ) 
 

Advise the widget to control the scale range internally.

Autoscaling is on by default.

See also:
QwtAbstractScale::setScale(), QwtAbstractScale::autoScale

Definition at line 147 of file qwt_abstract_scale.cpp.

References scaleChange().

void QwtAbstractScale::setScale const QwtScaleDiv scaleDiv  ) 
 

Specify a scale.

Disable autoscaling and define a scale by a scale division

Parameters:
interval Interval
s Scale division
See also:
QwtAbstractScale::setAutoScale()

Definition at line 107 of file qwt_abstract_scale.cpp.

References scaleChange().

void QwtAbstractScale::setScale const QwtDoubleInterval &  interval,
double  step = 0.0
 

Specify a scale.

Disable autoscaling and define a scale by an interval and a step size

Parameters:
interval Interval
stepSize major step size
See also:
QwtAbstractScale::setAutoScale()

Definition at line 91 of file qwt_abstract_scale.cpp.

References setScale().

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

Parameters:
vmin lower limit of the scale interval
vmax upper limit of the scale interval
stepSize major step size
See also:
QwtAbstractScale::setAutoScale()

Definition at line 74 of file qwt_abstract_scale.cpp.

References rescale().

Referenced by setScale().

void QwtAbstractScale::setScaleDraw QwtScaleDraw scaleDraw  ) 
 

Set a scale draw.

scaleDraw has to be created with new and will be deleted in ~QwtAbstractScale or the next call of setScaleDraw.

Definition at line 224 of file qwt_abstract_scale.cpp.

References scaleDraw().

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.

Definition at line 266 of file qwt_abstract_scale.cpp.

References scaleEngine().

Referenced by QwtThermo::setRange().

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.

Parameters:
ticks maximal number of major ticks.
See also:
QwtScaleDraw

Definition at line 173 of file qwt_abstract_scale.cpp.

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.

Parameters:
ticks 
See also:
QwtScaleDraw

Definition at line 191 of file qwt_abstract_scale.cpp.


Generated on Wed Aug 31 23:02:36 2005 for Qwt User's Guide by  doxygen 1.4.1