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 PROBABILITY_SCALE_ENGINE_H
00031 #define PROBABILITY_SCALE_ENGINE_H
00032
00033 #include <qwt_scale_engine.h>
00034 #include <qwt_scale_map.h>
00035 #include <ScaleEngine.h>
00036
00037 class ProbabilityScaleTransformation: public ScaleTransformation
00038 {
00039 public:
00040 ProbabilityScaleTransformation(const ScaleEngine *engine):ScaleTransformation(engine){};
00041 virtual double xForm(double x, double, double, double p1, double p2) const;
00042 virtual double invXForm(double x, double s1, double s2, double p1, double p2) const;
00043 QwtScaleTransformation* copy() const;
00044
00045 private:
00046 double func(double x) const;
00047 double invFunc(double x) const;
00048 };
00049
00050 class ProbabilityScaleEngine: public QwtScaleEngine
00051 {
00052 public:
00053 virtual void autoScale(int,
00054 double &x1, double &x2, double &stepSize) const;
00055
00056 virtual QwtScaleDiv divideScale(double x1, double x2,
00057 int numMajorSteps, int numMinorSteps,
00058 double stepSize = 0.0) const;
00059
00060 virtual QwtScaleTransformation *transformation() const;
00061
00062 private:
00063 void buildTicks(const QwtDoubleInterval &, int stepSize,
00064 QwtValueList ticks[QwtScaleDiv::NTickTypes]) const;
00065
00066 QwtValueList buildMajorTicks(
00067 const QwtDoubleInterval &interval, int stepSize) const;
00068 };
00069
00070 #endif