Go to the documentation of this file.00001 #ifndef PLOT_DATE_TIME_SCALE_ENGINE_H
00002 #define PLOT_DATE_TIME_SCALE_ENGINE_H
00003
00004 #include <qwt_scale_engine.h>
00005
00006 class PlotDateTimeScaleEngine : public QwtScaleEngine
00007 {
00008
00009
00010
00011 public:
00012 PlotDateTimeScaleEngine();
00013 virtual ~PlotDateTimeScaleEngine();
00014
00015
00016
00017
00018 public:
00019 virtual void autoScale( int maxSteps, double &x1, double &x2, double &stepSize ) const;
00020 virtual double divideInterval( double intervalSize, int numSteps ) const;
00021 virtual QwtScaleDiv divideScale( double x1, double x2, int numMajorSteps, int numMinorSteps, double stepSize = 0.0 ) const;
00022 virtual QwtScaleTransformation *transformation() const;
00023
00024 protected:
00025 QwtDoubleInterval align( const QwtDoubleInterval&, double stepSize ) const;
00026
00027 private:
00028 void buildTicks( const QwtDoubleInterval &, double stepSize, int maxMinSteps, QwtValueList ticks[ QwtScaleDiv::NTickTypes ] ) const;
00029 void buildMinorTicks( const QwtValueList& majorTicks, int maxMinMark, double step, QwtValueList &, QwtValueList & ) const;
00030 QwtValueList buildMajorTicks( const QwtDoubleInterval &interval, double stepSize ) const;
00031
00032
00033
00034
00035 };
00036
00037 #endif