qwt_date_scale_engine.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
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


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56