Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_date.h


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_date.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    88 *****************************************************************************/
    99
    10 #ifndef _QWT_DATE_H_
    11 #define _QWT_DATE_H_
     10#ifndef QWT_DATE_H
     11#define QWT_DATE_H
    1212
    1313#include "qwt_global.h"
    … …  
    1515
    1616/*!
    17   \brief A collection of methods around date/time values
     17   \brief A collection of methods around date/time values
    1818
    19   Qt offers convenient classes for dealing with date/time values,
    20   but Qwt uses coordinate systems that are based on doubles.
    21   QwtDate offers methods to translate from QDateTime to double and v.v.
     19   Qt offers convenient classes for dealing with date/time values,
     20   but Qwt uses coordinate systems that are based on doubles.
     21   QwtDate offers methods to translate from QDateTime to double and v.v.
    2222
    23   A double is interpreted as the number of milliseconds since
    24   1970-01-01T00:00:00 Universal Coordinated Time - also known
    25   as "The Epoch".
     23   A double is interpreted as the number of milliseconds since
     24   1970-01-01T00:00:00 Universal Coordinated Time - also known
     25   as "The Epoch".
    2626
    27   While the range of the Julian day in Qt4 is limited to [0, MAX_INT],
    28   Qt5 stores it as qint64 offering a huge range of valid dates.
    29   As the significance of a double is below this ( assuming a
    30   fraction of 52 bits ) the translation is not
    31   bijective with rounding errors for dates very far from Epoch.
    32   For a resolution of 1 ms those start to happen for dates above the
    33   year 144683.
     27   While the range of the Julian day in Qt4 is limited to [0, MAX_INT],
     28   Qt5 stores it as qint64 offering a huge range of valid dates.
     29   As the significance of a double is below this ( assuming a
     30   fraction of 52 bits ) the translation is not
     31   bijective with rounding errors for dates very far from Epoch.
     32   For a resolution of 1 ms those start to happen for dates above the
     33   year 144683.
    3434
    35   An axis for a date/time interval is expected to be aligned
    36   and divided in time/date units like seconds, minutes, ...
    37   QwtDate offers several algorithms that are needed to
    38   calculate these axes.
     35   An axis for a date/time interval is expected to be aligned
     36   and divided in time/date units like seconds, minutes, ...
     37   QwtDate offers several algorithms that are needed to
     38   calculate these axes.
    3939
    40   \sa QwtDateScaleEngine, QwtDateScaleDraw, QDate, QTime
    41 */
     40   \sa QwtDateScaleEngine, QwtDateScaleDraw, QDate, QTime
     41 */
    4242class QWT_EXPORT QwtDate
    4343{
    44 public:
     44  public:
    4545    /*!
    4646       How to identify the first week of year differs between
    … …  
    5555           FirstThursday corresponds to the numbering that is
    5656           implemented in QDate::weekNumber().
    57         */
     57         */
    5858        FirstThursday,
    5959
    … …  
    6363            In the U.S. this definition is more common than
    6464            FirstThursday.
    65         */
     65         */
    6666        FirstDay
    6767    };
    6868
    6969    /*!
    70       Classification of an time interval
     70       Classification of an time interval
    7171
    72       Time intervals needs to be classified to decide how to
    73       align and divide it.
     72       Time intervals needs to be classified to decide how to
     73       align and divide it.
    7474     */
    7575    enum IntervalType
    … …  
    112112        Qt::TimeSpec = Qt::UTC );
    113113
    114     static double toDouble( const QDateTime & );
     114    static double toDouble( const QDateTime& );
    115115
    116     static QDateTime ceil( const QDateTime &, IntervalType );
    117     static QDateTime floor( const QDateTime &, IntervalType );
     116    static QDateTime ceil( const QDateTime&, IntervalType );
     117    static QDateTime floor( const QDateTime&, IntervalType );
    118118
    119119    static QDate dateOfWeek0( int year, Week0Type );
    120     static int weekNumber( const QDate &, Week0Type );
     120    static int weekNumber( const QDate&, Week0Type );
    121121
    122     static int utcOffset( const QDateTime & );
     122    static int utcOffset( const QDateTime& );
    123123
    124     static QString toString( const QDateTime &,
    125         const QString & format, Week0Type );
     124    static QString toString( const QDateTime&,
     125        const QString& format, Week0Type );
    126126};
    127127
Note: See TracChangeset for help on using the changeset viewer.