slsDetectorPackage/libs/qwt-6.1.5/include/qwt_date_scale_engine.h
Dhanya Thattil 38cd10d4e6
Qt5 built in qwt (#570)
- qt4->qt5
- in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake
- made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions for qrect constr.
- qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms
 - docking option enabled by default, removed option to disable docking feature from "Mode"
- added qVersionResolve utility functions to handle compatibility before and after qt5.12
- qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks
- ensure gain plots have no zooming of z axis in 2d and y axis in 1d
- removed placeholder text in qpalette in main window form as its not supportd until 5.12 (so using qt5.9 designer insted of qt5.15 to cope)
- tab order
Servers:
- fixed some error messages that were empty for fail in funcs (mostly minor as if this error, major issues)
2022-11-11 15:15:10 +01:00

87 lines
2.6 KiB
C++

/* -*- 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"
/*!
\brief 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().
\sa QwtDate, QwtPlot::setAxisScaleEngine(),
QwtAbstractScale::setScaleEngine()
*/
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