qwt_date.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef _QWT_DATE_H_
00011 #define _QWT_DATE_H_
00012 
00013 #include "qwt_global.h"
00014 #include <qdatetime.h>
00015 
00042 class QWT_EXPORT QwtDate
00043 {
00044 public:
00049     enum Week0Type
00050     {
00058         FirstThursday,
00059 
00066         FirstDay
00067     };
00068 
00075     enum IntervalType
00076     {
00078         Millisecond,
00079 
00081         Second,
00082 
00084         Minute,
00085 
00087         Hour,
00088 
00090         Day,
00091 
00093         Week,
00094 
00096         Month,
00097 
00099         Year
00100     };
00101 
00102     enum
00103     {
00105         JulianDayForEpoch = 2440588
00106     };
00107 
00108     static QDate minDate();
00109     static QDate maxDate();
00110 
00111     static QDateTime toDateTime( double value, 
00112         Qt::TimeSpec = Qt::UTC );
00113 
00114     static double toDouble( const QDateTime & );
00115 
00116     static QDateTime ceil( const QDateTime &, IntervalType );
00117     static QDateTime floor( const QDateTime &, IntervalType );
00118 
00119     static QDate dateOfWeek0( int year, Week0Type );
00120     static int weekNumber( const QDate &, Week0Type );
00121 
00122     static int utcOffset( const QDateTime & );
00123 
00124     static QString toString( const QDateTime &, 
00125         const QString & format, Week0Type );
00126 };
00127 
00128 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56