10#ifndef QWT_SCALE_ENGINE_H
11#define QWT_SCALE_ENGINE_H
13#include "qwt_global.h"
14#include "qwt_scale_div.h"
25 static double ceilEps(
double value,
double intervalSize );
26 static double floorEps(
double value,
double intervalSize );
28 static double divideEps(
double intervalSize,
double numSteps );
30 static double divideInterval(
double intervalSize,
31 int numSteps, uint base );
60 IncludeReference = 0x01,
83 void setBase( uint base );
86 void setAttribute(
Attribute,
bool on =
true );
92 void setReference(
double );
93 double reference()
const;
95 void setMargins(
double lower,
double upper );
96 double lowerMargin()
const;
97 double upperMargin()
const;
108 double& x1,
double& x2,
double& stepSize )
const = 0;
123 int maxMajorSteps,
int maxMinorSteps,
124 double stepSize = 0.0 )
const = 0;
130 bool contains(
const QwtInterval&,
double value )
const;
133 double divideInterval(
double intervalSize,
int numSteps )
const;
157 virtual void autoScale(
int maxNumSteps,
158 double& x1,
double& x2,
double& stepSize )
const QWT_OVERRIDE;
160 virtual QwtScaleDiv divideScale(
double x1,
double x2,
161 int maxMajorSteps,
int maxMinorSteps,
162 double stepSize = 0.0 )
const QWT_OVERRIDE;
169 const QwtInterval&,
double stepSize,
int maxMinorSteps,
173 const QwtInterval& interval,
double stepSize )
const;
176 int maxMinorSteps,
double stepSize,
197 virtual void autoScale(
int maxNumSteps,
198 double& x1,
double& x2,
double& stepSize )
const QWT_OVERRIDE;
200 virtual QwtScaleDiv divideScale(
double x1,
double x2,
201 int maxMajorSteps,
int maxMinorSteps,
202 double stepSize = 0.0 )
const QWT_OVERRIDE;
208 const QwtInterval&,
double stepSize,
int maxMinorSteps,
212 const QwtInterval& interval,
double stepSize )
const;
215 int maxMinorSteps,
double stepSize,
A class representing an interval.
A scale engine for linear scales.
A scale engine for logarithmic scales.
Arithmetic including a tolerance.
A class representing a scale division.
@ NTickTypes
Number of valid tick types.
Base class for scale engines.
QFlags< Attribute > Attributes
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const =0
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const =0
Calculate a scale division.