QwtScaleDiv Class Reference

List of all members.

Detailed Description

A class representing a scale division.

A scale division consists of its limits and 3 list of tick values qualified as major, medium and minor ticks.

In most cases scale divisions are calculated by a QwtScaleEngine.

See also:
QwtScaleEngine::subDivideInto, QwtScaleEngine::subDivide

Definition at line 29 of file qwt_scale_div.h.

Public Types

enum  TickType {
  NoTick = -1,
  MinorTick,
  MediumTick,
  MajorTick,
  NTickTypes
}

Public Member Functions

 QwtScaleDiv ()
 QwtScaleDiv (const QwtDoubleInterval &, QwtValueList[NTickTypes])
 QwtScaleDiv (double lBound, double rBound, QwtValueList[NTickTypes])
int operator== (const QwtScaleDiv &s) const
int operator!= (const QwtScaleDiv &s) const
double lBound () const
double hBound () const
double range () const
bool contains (double v) const
const QwtValueList & ticks (int type) const
void invalidate ()
bool isValid () const
void invert ()


Constructor & Destructor Documentation

QwtScaleDiv::QwtScaleDiv  )  [explicit]
 

Construct an invalid QwtScaleDiv instance.

Definition at line 15 of file qwt_scale_div.cpp.

QwtScaleDiv::QwtScaleDiv const QwtDoubleInterval interval,
QwtValueList  ticks[NTickTypes]
[explicit]
 

Construct QwtScaleDiv instance.

Parameters:
interval Interval
ticks List of major, medium and minor ticks

Definition at line 28 of file qwt_scale_div.cpp.

References ticks().

QwtScaleDiv::QwtScaleDiv double  lBound,
double  hBound,
QwtValueList  ticks[NTickTypes]
[explicit]
 

Construct QwtScaleDiv instance.

Parameters:
lBound First interval limit
hBound Second interval limit
ticks List of major, medium and minor ticks

Definition at line 46 of file qwt_scale_div.cpp.

References ticks().


Member Function Documentation

double QwtScaleDiv::hBound  )  const [inline]
 

Returns:
right bound
See also:
QwtScaleDiv::lBound

Definition at line 86 of file qwt_scale_div.h.

Referenced by QwtPlot::canvasMap(), QwtPlotPanner::moveCanvas(), QwtPlotZoomer::rescale(), and QwtAbstractScaleDraw::setScaleDiv().

void QwtScaleDiv::invalidate  ) 
 

Invalidate the scale division.

Definition at line 89 of file qwt_scale_div.cpp.

void QwtScaleDiv::invert  ) 
 

Invert the scale divison.

Definition at line 118 of file qwt_scale_div.cpp.

References ticks().

Referenced by QwtLog10ScaleEngine::divideScale().

bool QwtScaleDiv::isValid  )  const
 

Check if the scale division is valid.

Definition at line 101 of file qwt_scale_div.cpp.

double QwtScaleDiv::lBound  )  const [inline]
 

Returns:
left bound
See also:
QwtScaleDiv::hBound

Definition at line 77 of file qwt_scale_div.h.

Referenced by QwtPlot::canvasMap(), QwtPlotPanner::moveCanvas(), QwtPlotZoomer::rescale(), QwtPlotMagnifier::rescale(), QwtPlotPicker::scaleRect(), and QwtAbstractScaleDraw::setScaleDiv().

int QwtScaleDiv::operator!= const QwtScaleDiv s  )  const
 

Inequality.

Returns:
true if this instance is not equal to s

Definition at line 83 of file qwt_scale_div.cpp.

int QwtScaleDiv::operator== const QwtScaleDiv other  )  const
 

Equality operator.

Returns:
true if this instance is equal to other

Definition at line 61 of file qwt_scale_div.cpp.

References d_hBound, d_isValid, d_lBound, and d_ticks.

double QwtScaleDiv::range  )  const [inline]
 

Returns:
hBound() - lBound()

Definition at line 94 of file qwt_scale_div.h.

Referenced by QwtPlotPicker::scaleRect().

const QwtValueList & QwtScaleDiv::ticks int  type  )  const
 

Return a list of ticks

Parameters:
type MinorTick, MediumTick or MajorTick

Definition at line 139 of file qwt_scale_div.cpp.

Referenced by QwtRoundScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), invert(), QwtScaleDraw::maxLabelHeight(), QwtScaleDraw::maxLabelWidth(), QwtScaleDraw::minLabelDist(), QwtScaleDraw::minLength(), QwtScaleDiv(), and QwtPlot::sizeHint().


Generated on Mon Feb 26 21:25:47 2007 for Qwt User's Guide by  doxygen 1.4.6