QwtDateScaleEngine(3) | Qwt User's Guide | QwtDateScaleEngine(3) |
QwtDateScaleEngine - A scale engine for date/time values.
#include <qwt_date_scale_engine.h>
Inherits QwtLinearScaleEngine.
QwtDateScaleEngine (Qt::TimeSpec=Qt::LocalTime)
Constructor. virtual ~QwtDateScaleEngine ()
Destructor. void setTimeSpec (Qt::TimeSpec)
Qt::TimeSpec timeSpec () const
void setUtcOffset (int seconds)
int utcOffset () const
void setWeek0Type (QwtDate::Week0Type)
QwtDate::Week0Type week0Type () const
void setMaxWeeks (int)
int maxWeeks () const
virtual void autoScale (int maxNumSteps, double &x1, double
&x2, double &stepSize) const
virtual QwtScaleDiv divideScale (double x1, double x2, int
maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const
Calculate a scale division for a date/time interval. virtual
QwtDate::IntervalType intervalType (const QDateTime &,
const QDateTime &, int maxSteps) const
QDateTime toDateTime (double) const
virtual QDateTime alignDate (const QDateTime &, double
stepSize, QwtDate::IntervalType, bool up) const
A scale engine for date/time values.
QwtDateScaleEngine builds scales from a time intervals. Together with QwtDateScaleDraw it can be used for axes according to date/time values.
Years, months, weeks, days, hours and minutes are organized in steps with non constant intervals. QwtDateScaleEngine classifies intervals and aligns the boundaries and tick positions according to this classification.
QwtDateScaleEngine supports representations depending on Qt::TimeSpec specifications. The valid range for scales is limited by the range of QDateTime, that differs between Qt4 and Qt5.
Datetime values are expected as the number of milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time - also known as 'The Epoch', that can be converted to QDateTime using QwtDate::toDateTime().
See also:
Constructor. The engine is initialized to build scales for the given time specification. It classifies intervals > 4 weeks as >= Qt::Month. The first week of a year is defined like for QwtDate::FirstThursday.
Parameters:
See also:
Align a date/time value for a step size
For Qt::Day alignments there is no 'natural day 0' - instead the first day of the year is used to avoid jumping major ticks positions when panning a scale. For other alignments ( f.e according to the first day of the month ) alignDate() has to be overloaded.
Parameters:
Returns:
Align and divide an interval
The algorithm aligns and divides the interval into steps.
Datetime interval divisions are usually not equidistant and the calculated stepSize can only be used as an approximation for the steps calculated by divideScale().
Parameters:
See also:
Reimplemented from QwtLinearScaleEngine.
Calculate a scale division for a date/time interval.
Parameters:
Returns:
Reimplemented from QwtLinearScaleEngine.
Classification of a date/time interval division
Parameters:
Returns:
Returns:
See also:
Set a upper limit for the number of weeks, when an interval can be classified as Qt::Week.
The default setting is 4 weeks.
Parameters:
Note:
See also:
Set the time specification used by the engine
Parameters:
See also:
Set the offset in seconds from Coordinated Universal Time
Parameters:
Note:
See also:
Sets how to identify the first week of a year.
Parameters:
See also:
Note:
Returns:
See also:
Translate a double value into a QDateTime object.
For QDateTime result is bounded by QwtDate::minDate() and QwtDate::maxDate()
Returns:
See also:
Returns:
Note:
See also:
Returns:
See also:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |