10 #ifndef QWT_SCALE_ENGINE_H 11 #define QWT_SCALE_ENGINE_H 25 static double ceilEps(
double value,
double intervalSize );
26 static double floorEps(
double value,
double intervalSize );
28 static double divideEps(
double interval,
double steps );
30 static double divideInterval(
double interval,
31 int numSteps, uint base );
60 IncludeReference = 0x01,
84 void setBase( uint base );
87 void setAttribute(
Attribute,
bool on =
true );
90 void setAttributes( Attributes );
91 Attributes attributes()
const;
93 void setReference(
double reference );
94 double reference()
const;
96 void setMargins(
double lower,
double upper );
97 double lowerMargin()
const;
98 double upperMargin()
const;
108 virtual void autoScale(
int maxNumSteps,
109 double &x1,
double &x2,
double &stepSize )
const = 0;
123 virtual QwtScaleDiv divideScale(
double x1,
double x2,
124 int maxMajorSteps,
int maxMinorSteps,
125 double stepSize = 0.0 )
const = 0;
131 bool contains(
const QwtInterval &,
double val )
const;
132 QList<double> strip(
const QList<double>&,
const QwtInterval & )
const;
134 double divideInterval(
double interval,
int numSteps )
const;
158 virtual void autoScale(
int maxSteps,
159 double &x1,
double &x2,
double &stepSize )
const;
161 virtual QwtScaleDiv divideScale(
double x1,
double x2,
162 int numMajorSteps,
int numMinorSteps,
163 double stepSize = 0.0 )
const;
170 const QwtInterval &,
double stepSize,
int maxMinSteps,
173 QList<double> buildMajorTicks(
174 const QwtInterval &interval,
double stepSize )
const;
176 void buildMinorTicks(
const QList<double>& majorTicks,
177 int maxMinorSteps,
double stepSize,
178 QList<double> &minorTicks, QList<double> &mediumTicks )
const;
199 double &x1,
double &x2,
double &stepSize )
const;
202 int numMajorSteps,
int numMinorSteps,
203 double stepSize = 0.0 )
const;
209 const QwtInterval &,
double stepSize,
int maxMinSteps,
212 QList<double> buildMajorTicks(
213 const QwtInterval &interval,
double stepSize )
const;
215 void buildMinorTicks(
const QList<double>& majorTicks,
216 int maxMinorSteps,
double stepSize,
217 QList<double> &minorTicks, QList<double> &mediumTicks )
const;
A scale engine for logarithmic scales.
A class representing an interval.
Arithmetic including a tolerance.
A class representing a scale division.
CONSTEXPR_F fields align(second_tag, fields f) noexcept
Number of valid tick types.
QFlags< Attribute > Attributes
Layout attributes.
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const =0
A scale engine for linear scales.
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const =0
Calculate a scale division.
Base class for scale engines.