Loading...
Searching...
No Matches
qwt_date_scale_engine.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_DATE_SCALE_ENGINE_H
#define QWT_DATE_SCALE_ENGINE_H
#include "qwt_global.h"
#include "qwt_date.h"
#include "qwt_scale_engine.h"
class QWT_EXPORT QwtDateScaleEngine : public QwtLinearScaleEngine
{
public:
explicit QwtDateScaleEngine( Qt::TimeSpec = Qt::LocalTime );
virtual ~QwtDateScaleEngine();
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 QWT_OVERRIDE;
virtual QwtScaleDiv divideScale(
double x1, double x2,
int maxMajorSteps, int maxMinorSteps,
double stepSize = 0.0 ) const QWT_OVERRIDE;
virtual QwtDate::IntervalType intervalType(
const QDateTime&, const QDateTime&, int maxSteps ) const;
QDateTime toDateTime( double ) const;
protected:
virtual QDateTime alignDate( const QDateTime&, double stepSize,
QwtDate::IntervalType, bool up ) const;
private:
QwtScaleDiv buildScaleDiv( const QDateTime&, const QDateTime&,
int maxMajorSteps, int maxMinorSteps,
QwtDate::IntervalType ) const;
private:
class PrivateData;
PrivateData* m_data;
};
#endif
QwtDate::Week0Type
Week0Type
Definition qwt_date.h:50
QwtDate::IntervalType
IntervalType
Definition qwt_date.h:76
QwtDateScaleEngine
A scale engine for date/time values.
Definition qwt_date_scale_engine.h:43
QwtLinearScaleEngine
A scale engine for linear scales.
Definition qwt_scale_engine.h:152
QwtLinearScaleEngine::autoScale
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const override
Definition qwt_scale_engine.cpp:531
QwtLinearScaleEngine::divideScale
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const override
Calculate a scale division for an interval.
Definition qwt_scale_engine.cpp:577
QwtScaleDiv
A class representing a scale division.
Definition qwt_scale_div.h:34