Skip to content
Snippets Groups Projects
Commit 94ac0feb authored by Matthew D Jones's avatar Matthew D Jones
Browse files

Re #11422 Added virtual destructors to ScaleEngine

parent dbb4f237
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ QwtScaleTransformation* ScaleEngine::transformation() const
return new ScaleTransformation(this);
}
ScaleTransformation::~ScaleTransformation() {}
double ScaleTransformation::invXForm(double p, double p1, double p2, double s1, double s2) const
{
if (!d_engine->hasBreak()){
......@@ -217,6 +219,8 @@ d_break_decoration(true),
d_nth_power(2.0)
{}
ScaleEngine::~ScaleEngine() {}
bool ScaleEngine::hasBreak() const
{
return (d_break_left == d_break_right || (d_break_left == -DBL_MAX && d_break_right == DBL_MAX))?false:true;
......
......@@ -44,6 +44,7 @@ public:
virtual double xForm(double x, double, double, double p1, double p2) const;
virtual double invXForm(double x, double s1, double s2, double p1, double p2) const;
QwtScaleTransformation* copy() const;
virtual ~ScaleTransformation();
protected:
QwtScaleTransformation* newScaleTransformation() const;
......@@ -56,6 +57,9 @@ class ScaleEngine: public QwtScaleEngine
public:
ScaleEngine(ScaleTransformation::Type type = ScaleTransformation::Linear,
double left_break = -DBL_MAX, double right_break = DBL_MAX);
virtual ~ScaleEngine();
QwtScaleTransformation* transformation() const;
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajSteps,
int maxMinSteps, double stepSize = 0.0) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment