Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_date_scale_engine.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_date_scale_engine.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_date_scale_engine.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 8 8 *****************************************************************************/ 9 9 10 #ifndef _QWT_DATE_SCALE_ENGINE_H_11 #define _QWT_DATE_SCALE_ENGINE_H_ 110 #ifndef QWT_DATE_SCALE_ENGINE_H 11 #define QWT_DATE_SCALE_ENGINE_H 12 12 13 #include "qwt_global.h" 13 14 #include "qwt_date.h" 14 15 #include "qwt_scale_engine.h" 15 16 16 17 /*! 17 \brief A scale engine for date/time values 18 \brief A scale engine for date/time values 18 19 19 QwtDateScaleEngine builds scales from a time intervals. 20 Together with QwtDateScaleDraw it can be used for 21 axes according to date/time values. 20 QwtDateScaleEngine builds scales from a time intervals. 21 Together with QwtDateScaleDraw it can be used for 22 axes according to date/time values. 22 23 23 Years, months, weeks, days, hours and minutes are organized 24 in steps with non constant intervals. QwtDateScaleEngine 25 classifies intervals and aligns the boundaries and tick positions 26 according to this classification. 24 Years, months, weeks, days, hours and minutes are organized 25 in steps with non constant intervals. QwtDateScaleEngine 26 classifies intervals and aligns the boundaries and tick positions 27 according to this classification. 27 28 28 QwtDateScaleEngine supports representations depending 29 on Qt::TimeSpec specifications. The valid range for scales 30 is limited by the range of QDateTime, that differs 31 between Qt4 and Qt5. 29 QwtDateScaleEngine supports representations depending 30 on Qt::TimeSpec specifications. The valid range for scales 31 is limited by the range of QDateTime, that differs 32 between Qt4 and Qt5. 32 33 33 Datetime values are expected as the number of milliseconds since 34 1970-01-01T00:00:00 Universal Coordinated Time - also known 35 as "The Epoch", that can be converted to QDateTime using 36 QwtDate::toDateTime(). 34 Datetime values are expected as the number of milliseconds since 35 1970-01-01T00:00:00 Universal Coordinated Time - also known 36 as "The Epoch", that can be converted to QDateTime using 37 QwtDate::toDateTime(). 37 38 38 \sa QwtDate, QwtPlot::setAxisScaleEngine(), 39 \sa QwtDate, QwtPlot::setAxisScaleEngine(), 39 40 QwtAbstractScale::setScaleEngine() 40 */ 41 class QWT_EXPORT QwtDateScaleEngine: public QwtLinearScaleEngine 41 */ 42 class QWT_EXPORT QwtDateScaleEngine : public QwtLinearScaleEngine 42 43 { 43 public: 44 QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime ); 44 public: 45 explicit QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime ); 45 46 virtual ~QwtDateScaleEngine(); 46 47 … … 57 58 int maxWeeks() const; 58 59 59 virtual void autoScale( int maxNumSteps, 60 double &x1, double &x2, double &stepSize ) const; 60 virtual void autoScale( 61 int maxNumSteps, double& x1, double& x2, 62 double& stepSize ) const QWT_OVERRIDE; 61 63 62 64 virtual QwtScaleDiv divideScale( 63 65 double x1, double x2, 64 66 int maxMajorSteps, int maxMinorSteps, 65 double stepSize = 0.0 ) const; 67 double stepSize = 0.0 ) const QWT_OVERRIDE; 66 68 67 69 virtual QwtDate::IntervalType intervalType( 68 const QDateTime &, const QDateTime&, int maxSteps ) const;70 const QDateTime&, const QDateTime&, int maxSteps ) const; 69 71 70 72 QDateTime toDateTime( double ) const; 71 73 72 protected: 73 virtual QDateTime alignDate( const QDateTime &, double stepSize,74 protected: 75 virtual QDateTime alignDate( const QDateTime&, double stepSize, 74 76 QwtDate::IntervalType, bool up ) const; 75 77 76 private: 77 QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime&,78 private: 79 QwtScaleDiv buildScaleDiv( const QDateTime&, const QDateTime&, 78 80 int maxMajorSteps, int maxMinorSteps, 79 81 QwtDate::IntervalType ) const; 80 82 81 private: 83 private: 82 84 class PrivateData; 83 PrivateData *d_data;85 PrivateData* m_data; 84 86 }; 85 87
Note:
See TracChangeset
for help on using the changeset viewer.
