Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _QWT_DATE_SCALE_ENGINE_H_
00011 #define _QWT_DATE_SCALE_ENGINE_H_ 1
00012
00013 #include "qwt_date.h"
00014 #include "qwt_scale_engine.h"
00015
00041 class QWT_EXPORT QwtDateScaleEngine: public QwtLinearScaleEngine
00042 {
00043 public:
00044 explicit QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime );
00045 virtual ~QwtDateScaleEngine();
00046
00047 void setTimeSpec( Qt::TimeSpec );
00048 Qt::TimeSpec timeSpec() const;
00049
00050 void setUtcOffset( int seconds );
00051 int utcOffset() const;
00052
00053 void setWeek0Type( QwtDate::Week0Type );
00054 QwtDate::Week0Type week0Type() const;
00055
00056 void setMaxWeeks( int );
00057 int maxWeeks() const;
00058
00059 virtual void autoScale( int maxNumSteps,
00060 double &x1, double &x2, double &stepSize ) const;
00061
00062 virtual QwtScaleDiv divideScale(
00063 double x1, double x2,
00064 int maxMajorSteps, int maxMinorSteps,
00065 double stepSize = 0.0 ) const;
00066
00067 virtual QwtDate::IntervalType intervalType(
00068 const QDateTime &, const QDateTime &, int maxSteps ) const;
00069
00070 QDateTime toDateTime( double ) const;
00071
00072 protected:
00073 virtual QDateTime alignDate( const QDateTime &, double stepSize,
00074 QwtDate::IntervalType, bool up ) const;
00075
00076 private:
00077 QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime &,
00078 int maxMajorSteps, int maxMinorSteps,
00079 QwtDate::IntervalType ) const;
00080
00081 private:
00082 class PrivateData;
00083 PrivateData *d_data;
00084 };
00085
00086 #endif