Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_scale_map.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_scale_map.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1313#include "qwt_global.h"
    1414#include "qwt_transform.h"
    15 #include <qrect.h>
    1615
    17 #ifndef QT_NO_DEBUG_STREAM
    18 #include <qdebug.h>
    19 #endif
    20 
     16class QPointF;
    2117class QRectF;
    2218
    … …  
    2723   of a scale into the linear coordinate system of a paint device
    2824   and vice versa.
    29 */
     25 */
    3026class QWT_EXPORT QwtScaleMap
    3127{
    32 public:
     28  public:
    3329    QwtScaleMap();
    3430    QwtScaleMap( const QwtScaleMap& );
    … …  
    3632    ~QwtScaleMap();
    3733
    38     QwtScaleMap &operator=( const QwtScaleMap & );
     34    QwtScaleMap& operator=( const QwtScaleMap& );
    3935
    40     void setTransformation( QwtTransform * );
    41     const QwtTransform *transformation() const;
     36    void setTransformation( QwtTransform* );
     37    const QwtTransform* transformation() const;
    4238
    4339    void setPaintInterval( double p1, double p2 );
    … …  
    5652    double sDist() const;
    5753
    58     static QRectF transform( const QwtScaleMap &,
    59         const QwtScaleMap &, const QRectF & );
    60     static QRectF invTransform( const QwtScaleMap &,
    61         const QwtScaleMap &, const QRectF & );
     54    static QRectF transform( const QwtScaleMap&,
     55        const QwtScaleMap&, const QRectF& );
    6256
    63     static QPointF transform( const QwtScaleMap &,
    64         const QwtScaleMap &, const QPointF & );
    65     static QPointF invTransform( const QwtScaleMap &,
    66         const QwtScaleMap &, const QPointF & );
     57    static QRectF invTransform( const QwtScaleMap&,
     58        const QwtScaleMap&, const QRectF& );
     59
     60    static QPointF transform( const QwtScaleMap&,
     61        const QwtScaleMap&, const QPointF& );
     62
     63    static QPointF invTransform( const QwtScaleMap&,
     64        const QwtScaleMap&, const QPointF& );
    6765
    6866    bool isInverting() const;
    6967
    70 private:
     68  private:
    7169    void updateFactor();
    7270
    73     double d_s1, d_s2;     // scale interval boundaries
    74     double d_p1, d_p2;     // paint device interval boundaries
     71    double m_s1, m_s2;     // scale interval boundaries
     72    double m_p1, m_p2;     // paint device interval boundaries
    7573
    76     double d_cnv;       // conversion factor
    77     double d_ts1;
     74    double m_cnv;       // conversion factor
     75    double m_ts1;
    7876
    79     QwtTransform *d_transform;
     77    QwtTransform* m_transform;
    8078};
    8179
    8280/*!
    8381    \return First border of the scale interval
    84 */
     82 */
    8583inline double QwtScaleMap::s1() const
    8684{
    87     return d_s1;
     85    return m_s1;
    8886}
    8987
    9088/*!
    9189    \return Second border of the scale interval
    92 */
     90 */
    9391inline double QwtScaleMap::s2() const
    9492{
    95     return d_s2;
     93    return m_s2;
    9694}
    9795
    9896/*!
    9997    \return First border of the paint interval
    100 */
     98 */
    10199inline double QwtScaleMap::p1() const
    102100{
    103     return d_p1;
     101    return m_p1;
    104102}
    105103
    106104/*!
    107105    \return Second border of the paint interval
    108 */
     106 */
    109107inline double QwtScaleMap::p2() const
    110108{
    111     return d_p2;
     109    return m_p2;
    112110}
    113111
    114112/*!
    115113    \return qwtAbs(p2() - p1())
    116 */
     114 */
    117115inline double QwtScaleMap::pDist() const
    118116{
    119     return qAbs( d_p2 - d_p1 );
     117    return qAbs( m_p2 - m_p1 );
    120118}
    121119
    122120/*!
    123121    \return qwtAbs(s2() - s1())
    124 */
     122 */
    125123inline double QwtScaleMap::sDist() const
    126124{
    127     return qAbs( d_s2 - d_s1 );
     125    return qAbs( m_s2 - m_s1 );
    128126}
    129127
    130128/*!
    131   Transform a point related to the scale interval into an point
    132   related to the interval of the paint device
     129   Transform a point related to the scale interval into an point
     130   related to the interval of the paint device
    133131
    134   \param s Value relative to the coordinates of the scale
    135   \return Transformed value
     132   \param s Value relative to the coordinates of the scale
     133   \return Transformed value
    136134
    137   \sa invTransform()
    138 */
     135   \sa invTransform()
     136 */
    139137inline double QwtScaleMap::transform( double s ) const
    140138{
    141     if ( d_transform )
    142         s = d_transform->transform( s );
     139    if ( m_transform )
     140        s = m_transform->transform( s );
    143141
    144     return d_p1 + ( s - d_ts1 ) * d_cnv;
     142    return m_p1 + ( s - m_ts1 ) * m_cnv;
    145143}
    146144
    147145/*!
    148   Transform an paint device value into a value in the
    149   interval of the scale.
     146   Transform an paint device value into a value in the
     147   interval of the scale.
    150148
    151   \param p Value relative to the coordinates of the paint device
    152   \return Transformed value
     149   \param p Value relative to the coordinates of the paint device
     150   \return Transformed value
    153151
    154   \sa transform()
    155 */
     152   \sa transform()
     153 */
    156154inline double QwtScaleMap::invTransform( double p ) const
    157155{
    158     double s = d_ts1 + ( p - d_p1 ) / d_cnv;
    159     if ( d_transform )
    160         s = d_transform->invTransform( s );
     156    double s = m_ts1 + ( p - m_p1 ) / m_cnv;
     157    if ( m_transform )
     158        s = m_transform->invTransform( s );
    161159
    162160    return s;
    … …  
    166164inline bool QwtScaleMap::isInverting() const
    167165{
    168     return ( ( d_p1 < d_p2 ) != ( d_s1 < d_s2 ) );
     166    return ( ( m_p1 < m_p2 ) != ( m_s1 < m_s2 ) );
    169167}
    170168
    171169#ifndef QT_NO_DEBUG_STREAM
    172 QWT_EXPORT QDebug operator<<( QDebug, const QwtScaleMap & );
     170QWT_EXPORT QDebug operator<<( QDebug, const QwtScaleMap& );
    173171#endif
    174172
Note: See TracChangeset for help on using the changeset viewer.