Qwt User's Guide 6.1.2

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_date_scale_engine.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef _QWT_DATE_SCALE_ENGINE_H_
11 #define _QWT_DATE_SCALE_ENGINE_H_ 1
12
13 #include "qwt_date.h"
14 #include "qwt_scale_engine.h"
15
41 class QWT_EXPORT QwtDateScaleEngine: public QwtLinearScaleEngine
42 {
43 public:
44 QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime );
45 virtual ~QwtDateScaleEngine();
46
47 void setTimeSpec( Qt::TimeSpec );
48 Qt::TimeSpec timeSpec() const;
49
50 void setUtcOffset( int seconds );
51 int utcOffset() const;
52
53 void setWeek0Type( QwtDate::Week0Type );
54 QwtDate::Week0Type week0Type() const;
55
56 void setMaxWeeks( int );
57 int maxWeeks() const;
58
59 virtual void autoScale( int maxNumSteps,
60 double &x1, double &x2, double &stepSize ) const;
61
62 virtual QwtScaleDiv divideScale(
63 double x1, double x2,
64 int maxMajorSteps, int maxMinorSteps,
65 double stepSize = 0.0 ) const;
66
67 virtual QwtDate::IntervalType intervalType(
68 const QDateTime &, const QDateTime &, int maxSteps ) const;
69
70 QDateTime toDateTime( double ) const;
71
72 protected:
73 virtual QDateTime alignDate( const QDateTime &, double stepSize,
74 QwtDate::IntervalType, bool up ) const;
75
76 private:
77 QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime &,
78 int maxMajorSteps, int maxMinorSteps,
79 QwtDate::IntervalType ) const;
80
81 private:
82 class PrivateData;
83 PrivateData *d_data;
84 };
85
86 #endif
QwtDate::IntervalType
IntervalType
Definition: qwt_date.h:75
QwtDateScaleEngine
A scale engine for date/time values.
Definition: qwt_date_scale_engine.h:41
QwtLinearScaleEngine::autoScale
virtual void autoScale(int maxSteps, double &x1, double &x2, double &stepSize) const
Definition: qwt_scale_engine.cpp:543
QwtLinearScaleEngine::divideScale
virtual QwtScaleDiv divideScale(double x1, double x2, int numMajorSteps, int numMinorSteps, double stepSize=0.0) const
Calculate a scale division for an interval.
Definition: qwt_scale_engine.cpp:589
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:36
QwtLinearScaleEngine
A scale engine for linear scales.
Definition: qwt_scale_engine.h:150
QwtDate::Week0Type
Week0Type
Definition: qwt_date.h:49