qwt_date_scale_engine.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* 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_ 1
#include "qwt_date.h"
#include "qwt_scale_engine.h"
class QWT_EXPORT QwtDateScaleEngine: public QwtLinearScaleEngine
{
public:
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;
virtual QwtScaleDiv divideScale(
double x1, double x2,
int maxMajorSteps, int maxMinorSteps,
double stepSize = 0.0 ) const;
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 *d_data;
};
#endif
QwtDate::IntervalType
IntervalType
Definition: qwt_date.h:75
QwtDateScaleEngine
A scale engine for date/time values.
Definition: qwt_date_scale_engine.h:41
QwtLinearScaleEngine::divideScale
virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const
Calculate a scale division for an interval.
Definition: qwt_scale_engine.cpp:589
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:36
QwtLinearScaleEngine
A scale engine for linear scales.
Definition: qwt_scale_engine.h:150
QwtLinearScaleEngine::autoScale
virtual void autoScale(int maxNumSteps, double &x1, double &x2, double &stepSize) const
Definition: qwt_scale_engine.cpp:543
QwtDate::Week0Type
Week0Type
Definition: qwt_date.h:49