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.
Definition at line 30 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 |
void | setInterval (double lBound, double rBound) |
void | setInterval (const QwtDoubleInterval &) |
QwtDoubleInterval | interval () const |
double | lBound () const |
double | hBound () const |
double | range () const |
bool | contains (double v) const |
void | setTicks (int type, const QwtValueList &) |
const QwtValueList & | ticks (int type) const |
void | invalidate () |
bool | isValid () const |
void | invert () |
QwtScaleDiv::QwtScaleDiv | ( | ) | [explicit] |
QwtScaleDiv::QwtScaleDiv | ( | const QwtDoubleInterval & | interval, | |
QwtValueList | ticks[NTickTypes] | |||
) | [explicit] |
Construct QwtScaleDiv instance.
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.
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().
int QwtScaleDiv::operator== | ( | const QwtScaleDiv & | other | ) | const |
int QwtScaleDiv::operator!= | ( | const QwtScaleDiv & | s | ) | const |
Inequality.
Definition at line 92 of file qwt_scale_div.cpp.
void QwtScaleDiv::setInterval | ( | double | lBound, | |
double | hBound | |||
) | [inline] |
Change the interval left bound right bound
Definition at line 84 of file qwt_scale_div.h.
Referenced by setInterval().
void QwtScaleDiv::setInterval | ( | const QwtDoubleInterval & | interval | ) |
Change the interval Interval
Definition at line 61 of file qwt_scale_div.cpp.
References interval(), QwtDoubleInterval::maxValue(), QwtDoubleInterval::minValue(), and setInterval().
QwtDoubleInterval QwtScaleDiv::interval | ( | ) | const [inline] |
Definition at line 93 of file qwt_scale_div.h.
Referenced by setInterval().
double QwtScaleDiv::lBound | ( | ) | const [inline] |
Definition at line 102 of file qwt_scale_div.h.
Referenced by QwtPlot::canvasMap(), QwtPlotPanner::moveCanvas(), QwtPlot::print(), QwtPlotZoomer::rescale(), QwtPlotMagnifier::rescale(), QwtPlotPicker::scaleRect(), and QwtAbstractScaleDraw::setScaleDiv().
double QwtScaleDiv::hBound | ( | ) | const [inline] |
Definition at line 111 of file qwt_scale_div.h.
Referenced by QwtPlot::canvasMap(), QwtPlotPanner::moveCanvas(), QwtPlot::print(), QwtPlotZoomer::rescale(), and QwtAbstractScaleDraw::setScaleDiv().
double QwtScaleDiv::range | ( | ) | const [inline] |
void QwtScaleDiv::setTicks | ( | int | type, | |
const QwtValueList & | ticks | |||
) |
Assign ticks
type | MinorTick, MediumTick or MajorTick | |
ticks | Values of the tick positions |
Definition at line 149 of file qwt_scale_div.cpp.
const QwtValueList & QwtScaleDiv::ticks | ( | int | type | ) | const |
Return a list of ticks
type | MinorTick, MediumTick or MajorTick |
Definition at line 160 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().
void QwtScaleDiv::invalidate | ( | ) |
bool QwtScaleDiv::isValid | ( | ) | const |
void QwtScaleDiv::invert | ( | ) |
Invert the scale divison.
Definition at line 127 of file qwt_scale_div.cpp.
References ticks().
Referenced by QwtLog10ScaleEngine::divideScale().