qwt_date_scale_engine.h
Go to the documentation of this file.
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
12 
13 #include "qwt_global.h"
14 #include "qwt_date.h"
15 #include "qwt_scale_engine.h"
16 
43 {
44 public:
45  explicit QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime );
46  virtual ~QwtDateScaleEngine();
47 
48  void setTimeSpec( Qt::TimeSpec );
49  Qt::TimeSpec timeSpec() const;
50 
51  void setUtcOffset( int seconds );
52  int utcOffset() const;
53 
54  void setWeek0Type( QwtDate::Week0Type );
55  QwtDate::Week0Type week0Type() const;
56 
57  void setMaxWeeks( int );
58  int maxWeeks() const;
59 
60  virtual void autoScale(
61  int maxNumSteps, double &x1, double &x2,
62  double &stepSize ) const QWT_OVERRIDE;
63 
64  virtual QwtScaleDiv divideScale(
65  double x1, double x2,
66  int maxMajorSteps, int maxMinorSteps,
67  double stepSize = 0.0 ) const QWT_OVERRIDE;
68 
69  virtual QwtDate::IntervalType intervalType(
70  const QDateTime &, const QDateTime &, int maxSteps ) const;
71 
72  QDateTime toDateTime( double ) const;
73 
74 protected:
75  virtual QDateTime alignDate( const QDateTime &, double stepSize,
76  QwtDate::IntervalType, bool up ) const;
77 
78 private:
79  QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime &,
80  int maxMajorSteps, int maxMinorSteps,
81  QwtDate::IntervalType ) const;
82 
83 private:
84  class PrivateData;
86 };
87 
88 #endif
A scale engine for date/time values.
#define QWT_EXPORT
Definition: qwt_global.h:38
A class representing a scale division.
Definition: qwt_scale_div.h:33
IntervalType
Definition: qwt_date.h:75
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const QWT_OVERRIDE
Week0Type
Definition: qwt_date.h:49
A scale engine for linear scales.
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const QWT_OVERRIDE
Calculate a scale division for an interval.
#define QWT_OVERRIDE
Definition: qwt_global.h:53


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10