Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef LOG2_SCALE_ENGINE_H
00031 #define LOG2_SCALE_ENGINE_H
00032
00033 #include <qwt_scale_engine.h>
00034 #include <qwt_scale_map.h>
00035
00036 class Log2ScaleEngine: public QwtScaleEngine
00037 {
00038 public:
00039 virtual void autoScale(int maxSteps,
00040 double &x1, double &x2, double &stepSize) const;
00041
00042 virtual QwtScaleDiv divideScale(double x1, double x2,
00043 int numMajorSteps, int numMinorSteps,
00044 double stepSize = 0.0) const;
00045
00046 virtual QwtScaleTransformation *transformation() const;
00047
00048 protected:
00049 QwtDoubleInterval log2(const QwtDoubleInterval&) const;
00050
00051 private:
00052 QwtDoubleInterval align(const QwtDoubleInterval&,
00053 double stepSize) const;
00054
00055 void buildTicks(
00056 const QwtDoubleInterval &, double stepSize, int maxMinSteps,
00057 QwtValueList ticks[QwtScaleDiv::NTickTypes]) const;
00058
00059 QwtValueList buildMinorTicks(const QwtValueList& majorTicks,
00060 int maxMinMark, double step) const;
00061
00062 QwtValueList buildMajorTicks(
00063 const QwtDoubleInterval &interval, double stepSize) const;
00064 };
00065
00066 #endif