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_ 1
12 
13 #include "qwt_date.h"
14 #include "qwt_scale_engine.h"
15 
42 {
43 public:
44  explicit 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;
84 };
85 
86 #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:36
std::chrono::duration< std::int_fast64_t > seconds
IntervalType
Definition: qwt_date.h:75
virtual void autoScale(int maxSteps, double &x1, double &x2, double &stepSize) const
virtual QwtScaleDiv divideScale(double x1, double x2, int numMajorSteps, int numMinorSteps, double stepSize=0.0) const
Calculate a scale division for an interval.
Week0Type
Definition: qwt_date.h:49
A scale engine for linear scales.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17