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


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

deprecated functions exchanged libs updated

File:
1 edited

Legend:

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

    r8127 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1010/*! \file */
    1111#ifndef QWT_POINT_3D_H
    12 #define QWT_POINT_3D_H 1
     12#define QWT_POINT_3D_H
    1313
    1414#include "qwt_global.h"
    1515#include <qpoint.h>
    16 #ifndef QT_NO_DEBUG_STREAM
    17 #include <qdebug.h>
    18 #endif
     16#include <qmetatype.h>
    1917
    2018/*!
    21   \brief QwtPoint3D class defines a 3D point in double coordinates
    22 */
     19   \brief QwtPoint3D class defines a 3D point in double coordinates
     20 */
    2321
    2422class QWT_EXPORT QwtPoint3D
    2523{
    26 public:
     24  public:
    2725    QwtPoint3D();
    2826    QwtPoint3D( double x, double y, double z );
    29     QwtPoint3D( const QwtPoint3D & );
    30     QwtPoint3D( const QPointF & );
     27    QwtPoint3D( const QPointF& );
    3128
    3229    bool isNull()    const;
    … …  
    3633    double z() const;
    3734
    38     double &rx();
    39     double &ry();
    40     double &rz();
     35    double& rx();
     36    double& ry();
     37    double& rz();
    4138
    4239    void setX( double x );
    … …  
    4643    QPointF toPoint() const;
    4744
    48     bool operator==( const QwtPoint3D & ) const;
    49     bool operator!=( const QwtPoint3D & ) const;
     45    bool operator==( const QwtPoint3D& ) const;
     46    bool operator!=( const QwtPoint3D& ) const;
    5047
    51 private:
    52     double d_x;
    53     double d_y;
    54     double d_z;
     48  private:
     49    double m_x;
     50    double m_y;
     51    double m_z;
    5552};
    5653
    57 Q_DECLARE_TYPEINFO(QwtPoint3D, Q_MOVABLE_TYPE);
     54Q_DECLARE_TYPEINFO( QwtPoint3D, Q_MOVABLE_TYPE );
     55Q_DECLARE_METATYPE( QwtPoint3D )
    5856
    5957#ifndef QT_NO_DEBUG_STREAM
    60 QWT_EXPORT QDebug operator<<( QDebug, const QwtPoint3D & );
     58QWT_EXPORT QDebug operator<<( QDebug, const QwtPoint3D& );
    6159#endif
    6260
    … …  
    6462    Constructs a null point.
    6563    \sa isNull()
    66 */
    67 inline QwtPoint3D::QwtPoint3D():
    68     d_x( 0.0 ),
    69     d_y( 0.0 ),
    70     d_z( 0.0 )
     64 */
     65inline QwtPoint3D::QwtPoint3D()
     66    : m_x( 0.0 )
     67    , m_y( 0.0 )
     68    , m_z( 0.0 )
    7169{
    7270}
    7371
    7472//! Constructs a point with coordinates specified by x, y and z.
    75 inline QwtPoint3D::QwtPoint3D( double x, double y, double z = 0.0 ):
    76     d_x( x ),
    77     d_y( y ),
    78     d_z( z )
    79 {
    80 }
    81 
    82 /*!
    83     Copy constructor.
    84     Constructs a point using the values of the point specified.
    85 */
    86 inline QwtPoint3D::QwtPoint3D( const QwtPoint3D &other ):
    87     d_x( other.d_x ),
    88     d_y( other.d_y ),
    89     d_z( other.d_z )
     73inline QwtPoint3D::QwtPoint3D( double x, double y, double z = 0.0 )
     74    : m_x( x )
     75    , m_y( y )
     76    , m_z( z )
    9077{
    9178}
    … …  
    9481    Constructs a point with x and y coordinates from a 2D point,
    9582    and a z coordinate of 0.
    96 */
    97 inline QwtPoint3D::QwtPoint3D( const QPointF &other ):
    98     d_x( other.x() ),
    99     d_y( other.y() ),
    100     d_z( 0.0 )
     83 */
     84inline QwtPoint3D::QwtPoint3D( const QPointF& other )
     85    : m_x( other.x() )
     86    , m_y( other.y() )
     87    , m_z( 0.0 )
    10188{
    10289}
    … …  
    10794    A point is considered to be null if x, y and z-coordinates
    10895    are equal to zero.
    109 */
     96 */
    11097inline bool QwtPoint3D::isNull() const
    11198{
    112     return d_x == 0.0 && d_y == 0.0 && d_z == 0.0;
     99    return m_x == 0.0 && m_y == 0.0 && m_z == 0.0;
    113100}
    114101
    … …  
    116103inline double QwtPoint3D::x() const
    117104{
    118     return d_x;
     105    return m_x;
    119106}
    120107
    … …  
    122109inline double QwtPoint3D::y() const
    123110{
    124     return d_y;
     111    return m_y;
    125112}
    126113
    … …  
    128115inline double QwtPoint3D::z() const
    129116{
    130     return d_z;
     117    return m_z;
    131118}
    132119
    133120//! \return A reference to the x-coordinate of the point.
    134 inline double &QwtPoint3D::rx()
     121inline double& QwtPoint3D::rx()
    135122{
    136     return d_x;
     123    return m_x;
    137124}
    138125
    139126//! \return A reference to the y-coordinate of the point.
    140 inline double &QwtPoint3D::ry()
     127inline double& QwtPoint3D::ry()
    141128{
    142     return d_y;
     129    return m_y;
    143130}
    144131
    145132//! \return A reference to the z-coordinate of the point.
    146 inline double &QwtPoint3D::rz()
     133inline double& QwtPoint3D::rz()
    147134{
    148     return d_z;
     135    return m_z;
    149136}
    150137
    … …  
    152139inline void QwtPoint3D::setX( double x )
    153140{
    154     d_x = x;
     141    m_x = x;
    155142}
    156143
    … …  
    158145inline void QwtPoint3D::setY( double y )
    159146{
    160     d_y = y;
     147    m_y = y;
    161148}
    162149
    … …  
    164151inline void QwtPoint3D::setZ( double z )
    165152{
    166     d_z = z;
     153    m_z = z;
    167154}
    168155
    169156/*!
    170157   \return 2D point, where the z coordinate is dropped.
    171 */
     158 */
    172159inline QPointF QwtPoint3D::toPoint() const
    173160{
    174     return QPointF( d_x, d_y );
     161    return QPointF( m_x, m_y );
    175162}
    176163
    177164//! \return True, if this point and other are equal; otherwise returns false.
    178 inline bool QwtPoint3D::operator==( const QwtPoint3D &other ) const
     165inline bool QwtPoint3D::operator==( const QwtPoint3D& other ) const
    179166{
    180     return ( d_x == other.d_x ) && ( d_y == other.d_y ) && ( d_z == other.d_z );
     167    return ( m_x == other.m_x ) && ( m_y == other.m_y ) && ( m_z == other.m_z );
    181168}
    182169
    183170//! \return True if this rect and other are different; otherwise returns false.
    184 inline bool QwtPoint3D::operator!=( const QwtPoint3D &other ) const
     171inline bool QwtPoint3D::operator!=( const QwtPoint3D& other ) const
    185172{
    186173    return !operator==( other );
Note: See TracChangeset for help on using the changeset viewer.