Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_date_scale_engine.h
1 #ifndef _QWT_DATE_SCALE_ENGINE_H_
2 #define _QWT_DATE_SCALE_ENGINE_H_ 1
3
4 #include "qwt_date.h"
5 #include "qwt_scale_engine.h"
6
32 class QWT_EXPORT QwtDateScaleEngine: public QwtLinearScaleEngine
33 {
34 public:
35 QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime );
36 virtual ~QwtDateScaleEngine();
37
38 void setTimeSpec( Qt::TimeSpec );
39 Qt::TimeSpec timeSpec() const;
40
41 void setUtcOffset( int seconds );
42 int utcOffset() const;
43
44 void setWeek0Type( QwtDate::Week0Type );
45 QwtDate::Week0Type week0Type() const;
46
47 void setMaxWeeks( int );
48 int maxWeeks() const;
49
50 virtual void autoScale( int maxNumSteps,
51 double &x1, double &x2, double &stepSize ) const;
52
53 virtual QwtScaleDiv divideScale(
54 double x1, double x2,
55 int maxMajorSteps, int maxMinorSteps,
56 double stepSize = 0.0 ) const;
57
58 virtual QwtDate::IntervalType intervalType(
59 const QDateTime &, const QDateTime &, int maxSteps ) const;
60
61 QDateTime toDateTime( double ) const;
62
63 protected:
64 virtual QDateTime alignDate( const QDateTime &, double stepSize,
65 QwtDate::IntervalType, bool up ) const;
66
67 private:
68 QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime &,
69 int maxMajorSteps, int maxMinorSteps,
70 QwtDate::IntervalType ) const;
71
72 private:
73 class PrivateData;
74 PrivateData *d_data;
75 };
76
77 #endif