ScaleEngine Class Reference

`#include <ScaleEngine.h>`

Inheritance diagram for ScaleEngine:

## Public Member Functions

virtual void | autoScale (int maxNumSteps, double &x1, double &x2, double &stepSize) const
double | axisBreakLeft () const
double | axisBreakRight () const
int | breakPosition () const
int | breakWidth () const
void | clone (const ScaleEngine *engine)
virtual QwtScaleDiv | divideScale (double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize=0.0) const
void | drawBreakDecoration (bool draw)
bool | hasBreak () const
bool | hasBreakDecoration () const
bool | log10ScaleAfterBreak () const
int | minTicksAfterBreak () const
int | minTicksBeforeBreak () const
| ScaleEngine (ScaleTransformation::Type type=ScaleTransformation::Linear, double left_break=-DBL_MAX, double right_break=DBL_MAX)
void | setBreakPosition (int pos)
void | setBreakRegion (double from, double to)
void | setBreakWidth (int width)
void | setLog10ScaleAfterBreak (bool on)
void | setMinTicksAfterBreak (int ticks)
void | setMinTicksBeforeBreak (int ticks)
void | setStepAfterBreak (double step)
void | setStepBeforeBreak (double step)
void | setType (ScaleTransformation::Type type)
double | stepAfterBreak () const
double | stepBeforeBreak () const
QwtScaleTransformation * | transformation () const
ScaleTransformation::Type | type () const

## Private Member Functions

QwtScaleEngine * | newScaleEngine () const

## Private Attributes

bool | d_break_decoration
| If true draw the break decoration. More...
double | d_break_left
int | d_break_pos
| Position of axis break (% of axis length) More...
double | d_break_right
int | d_break_width
| Width of the axis break in pixels. More...
bool | d_log10_scale_after
| Log10 scale after break. More...
int | d_minor_ticks_after
int | d_minor_ticks_before
| Minor ticks before and after break. More...
double | d_step_after
double | d_step_before
| Scale increment before and after break. More...
ScaleTransformation::Type | d_type

## Constructor & Destructor Documentation

ScaleEngine::ScaleEngine | ( | ScaleTransformation::Type | type = `ScaleTransformation::Linear`,
|  | double | left_break = `-DBL_MAX`,
|  | double | right_break = `DBL_MAX`
| ) |  |

## Member Function Documentation

void ScaleEngine::autoScale | ( | int | maxNumSteps,
|  | double & | x1,
|  | double & | x2,
|  | double & | stepSize
| ) |  | const

virtual

References d_break_left, d_break_right, hasBreak(), ScaleTransformation::Ln, ScaleTransformation::Log10, ScaleTransformation::Log2, newScaleEngine(), and type().

double ScaleEngine::axisBreakLeft | ( |  | ) | const

References d_break_left.

Referenced by clone(), ScaleDraw::drawBackbone(), ScaleDraw::drawBreak(), Graph::drawBreak(), ScaleDraw::drawInwardTick(), Graph::drawInwardTicks(), Graph::drawItems(), ScaleDraw::drawLabel(), ScaleDraw::drawTick(), ScaleTransformation::invXForm(), ScaleDraw::labelString(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

double ScaleEngine::axisBreakRight | ( |  | ) | const

References d_break_right.

Referenced by clone(), ScaleDraw::drawBackbone(), ScaleDraw::drawBreak(), Graph::drawBreak(), ScaleDraw::drawInwardTick(), Graph::drawInwardTicks(), Graph::drawItems(), ScaleDraw::drawLabel(), ScaleDraw::drawTick(), ScaleTransformation::invXForm(), ScaleDraw::labelString(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

int ScaleEngine::breakPosition | ( |  | ) | const

References d_break_pos.

Referenced by clone(), ScaleTransformation::invXForm(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

int ScaleEngine::breakWidth | ( |  | ) | const

References d_break_width.

Referenced by clone(), ScaleTransformation::invXForm(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

void ScaleEngine::clone | ( | const ScaleEngine * | engine | ) |

References axisBreakLeft(), axisBreakRight(), breakPosition(), breakWidth(), d_break_decoration, d_break_left, d_break_pos, d_break_right, d_break_width, d_log10_scale_after, d_minor_ticks_after, d_minor_ticks_before, d_step_after, d_step_before, d_type, hasBreakDecoration(), log10ScaleAfterBreak(), minTicksAfterBreak(), minTicksBeforeBreak(), stepAfterBreak(), stepBeforeBreak(), and type().

Referenced by Graph::updateOppositeScaleDiv().

QwtScaleDiv ScaleEngine::divideScale | ( | double | x1,
|  | double | x2,
|  | int | maxMajSteps,
|  | int | maxMinSteps,
|  | double | stepSize = `0.0`
| ) |  | const

virtual

References d_break_left, d_break_right, d_log10_scale_after, d_minor_ticks_after, d_minor_ticks_before, d_step_after, d_step_before, hasBreak(), and newScaleEngine().

Referenced by Graph::setScale().

void ScaleEngine::drawBreakDecoration | ( | bool | draw | ) |

inline

References d_break_decoration.

Referenced by Graph::setScale().

bool ScaleEngine::hasBreak | ( |  | ) | const

References d_break_left, and d_break_right.

Referenced by autoScale(), divideScale(), ScaleDraw::drawBackbone(), ScaleDraw::drawBreak(), Graph::drawBreak(), ScaleDraw::drawInwardTick(), Graph::drawInwardTicks(), Graph::drawItems(), ScaleDraw::drawLabel(), ScaleDraw::drawTick(), ScaleTransformation::invXForm(), ScaleDraw::labelString(), and ScaleTransformation::xForm().

bool ScaleEngine::hasBreakDecoration | ( |  | ) | const

References d_break_decoration.

Referenced by clone(), ScaleDraw::drawBreak(), Graph::drawBreak(), and MultiLayer::updateLayerAxes().

bool ScaleEngine::log10ScaleAfterBreak | ( |  | ) | const

References d_log10_scale_after.

Referenced by clone(), ScaleTransformation::invXForm(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

int ScaleEngine::minTicksAfterBreak | ( |  | ) | const

References d_minor_ticks_after.

Referenced by clone(), and MultiLayer::updateLayerAxes().

int ScaleEngine::minTicksBeforeBreak | ( |  | ) | const

References d_minor_ticks_before.

Referenced by clone(), and MultiLayer::updateLayerAxes().

QwtScaleEngine * ScaleEngine::newScaleEngine | ( |  | ) | const

private

References d_type, ScaleTransformation::Linear, ScaleTransformation::Ln, ScaleTransformation::Log10, ScaleTransformation::Log2, ScaleTransformation::Logit, ScaleTransformation::Probability, and ScaleTransformation::Reciprocal.

Referenced by autoScale(), and divideScale().

void ScaleEngine::setBreakPosition | ( | int | pos | ) |

inline

References d_break_pos.

Referenced by Graph::setScale().

void ScaleEngine::setBreakRegion | ( | double | from,
|  | double | to
| ) |  |

inline

References d_break_left, and d_break_right.

Referenced by Graph::setScale().

void ScaleEngine::setBreakWidth | ( | int | width | ) |

inline

References d_break_width.

Referenced by Graph::setScale().

void ScaleEngine::setLog10ScaleAfterBreak | ( | bool | on | ) |

inline

References d_log10_scale_after.

Referenced by Graph::setScale().

void ScaleEngine::setMinTicksAfterBreak | ( | int | ticks | ) |

inline

References d_minor_ticks_after.

Referenced by Graph::setScale().

void ScaleEngine::setMinTicksBeforeBreak | ( | int | ticks | ) |

inline

References d_minor_ticks_before.

Referenced by Graph::setScale().

void ScaleEngine::setStepAfterBreak | ( | double | step | ) |

inline

References d_step_after.

Referenced by Graph::setScale().

void ScaleEngine::setStepBeforeBreak | ( | double | step | ) |

inline

References d_step_before.

Referenced by Graph::setScale().

void ScaleEngine::setType | ( | ScaleTransformation::Type | type | ) |

inline

References d_type, and type().

Referenced by Graph::setScale().

double ScaleEngine::stepAfterBreak | ( |  | ) | const

References d_step_after.

Referenced by clone(), and MultiLayer::updateLayerAxes().

double ScaleEngine::stepBeforeBreak | ( |  | ) | const

References d_step_before.

Referenced by clone(), and MultiLayer::updateLayerAxes().

QwtScaleTransformation * ScaleEngine::transformation | ( |  | ) | const

ScaleTransformation::Type ScaleEngine::type | ( |  | ) | const

References d_type.

Referenced by ApplicationWindow::analyzeCurve(), autoScale(), PlotCurve::boundingRect(), clone(), ErrorBarsCurve::drawErrorBars(), ScaleTransformation::invXForm(), FunctionCurve::loadData(), ScaleTransformation::newScaleTransformation(), Graph::saveScale(), FunctionCurve::saveToString(), setType(), MultiLayer::updateLayerAxes(), and ScaleTransformation::xForm().

## Member Data Documentation

bool ScaleEngine::d_break_decoration

private

If true draw the break decoration.

Referenced by clone(), drawBreakDecoration(), and hasBreakDecoration().

double ScaleEngine::d_break_left

private

Referenced by autoScale(), axisBreakLeft(), clone(), divideScale(), hasBreak(), and setBreakRegion().

int ScaleEngine::d_break_pos

private

Position of axis break (% of axis length)

Referenced by breakPosition(), clone(), and setBreakPosition().

double ScaleEngine::d_break_right

private

Referenced by autoScale(), axisBreakRight(), clone(), divideScale(), hasBreak(), and setBreakRegion().

int ScaleEngine::d_break_width

private

Width of the axis break in pixels.

Referenced by breakWidth(), clone(), and setBreakWidth().

bool ScaleEngine::d_log10_scale_after

private

Log10 scale after break.

Referenced by clone(), divideScale(), log10ScaleAfterBreak(), and setLog10ScaleAfterBreak().

int ScaleEngine::d_minor_ticks_after

private

Referenced by clone(), divideScale(), minTicksAfterBreak(), and setMinTicksAfterBreak().

int ScaleEngine::d_minor_ticks_before

private

Minor ticks before and after break.

Referenced by clone(), divideScale(), minTicksBeforeBreak(), and setMinTicksBeforeBreak().

double ScaleEngine::d_step_after

private

Referenced by clone(), divideScale(), setStepAfterBreak(), and stepAfterBreak().

double ScaleEngine::d_step_before

private

Scale increment before and after break.

Referenced by clone(), divideScale(), setStepBeforeBreak(), and stepBeforeBreak().

ScaleTransformation::Type ScaleEngine::d_type

private

Referenced by clone(), newScaleEngine(), setType(), and type().

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

- qtiplot/src/plot2D/ScaleEngine.h
- qtiplot/src/plot2D/ScaleEngine.cpp