File: qwt_point_polar.sip

package info (click to toggle)
pyqt-qwt 1.02.02-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 796 kB
  • sloc: python: 5,663; cpp: 273; makefile: 16; sh: 13
file content (101 lines) | stat: -rw-r--r-- 3,189 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
 * Qwt Widget Library
 * Copyright (C) 1997   Josef Wilgen
 * Copyright (C) 2002   Uwe Rathmann
 * Copyright (C) 2018   Gudjon I. Gudjonsson
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the Qwt License, Version 1.0
 *****************************************************************************/


/*!
  \brief A point in polar coordinates

  In polar coordinates a point is determined by an angle and a distance.
  See http://en.wikipedia.org/wiki/Polar_coordinate_system
*/

class QwtPointPolar
{
%TypeHeaderCode
#include <qwt_point_polar.h>
%End

public:
    QwtPointPolar();
    QwtPointPolar( double azimuth, double radius );
    QwtPointPolar( const QwtPointPolar & );
    QwtPointPolar( const QPointF & );

    void setPoint( const QPointF & );
    QPointF toPoint() const;

    bool isValid() const;
    bool isNull() const;

    double radius() const;
    double azimuth() const;

    //double &rRadius();
    //double &rAzimuth();

    void setRadius( double );
    void setAzimuth( double );

    bool operator==( const QwtPointPolar & ) const;
    bool operator!=( const QwtPointPolar & ) const;

    QwtPointPolar normalized() const;

/*private:
    double d_azimuth;
    double d_radius;*/
};

/*!
    Constructs a null point, with a radius and azimuth set to 0.0.
    \sa QPointF::isNull()
*/
//inline QwtPointPolar::QwtPointPolar();
/*!
   Constructs a point with coordinates specified by radius and azimuth.

   \param azimuth Azimuth
   \param radius Radius
*/
/*inline QwtPointPolar::QwtPointPolar( double azimuth, double radius ):
    d_azimuth( azimuth ),
    d_radius( radius );
/*!
    Constructs a point using the values of the point specified.
    \param other Other point
*/
//inline QwtPointPolar::QwtPointPolar( const QwtPointPolar &other );
//! Returns true if radius() >= 0.0
//inline bool QwtPointPolar::isValid() const;
//! Returns true if radius() >= 0.0
//inline bool QwtPointPolar::isNull() const;
//! Returns the radius.
//inline double QwtPointPolar::radius() const;
//! Returns the azimuth.
//inline double QwtPointPolar::azimuth() const;
//! Returns the radius.
//inline double &QwtPointPolar::rRadius();
//! Returns the azimuth.
//inline double &QwtPointPolar::rAzimuth();
//! Sets the radius to radius.
//inline void QwtPointPolar::setRadius( double radius );
//! Sets the atimuth to atimuth.
//inline void QwtPointPolar::setAzimuth( double azimuth );
//#ifndef QT_NO_DEBUG_STREAM
//QWT_EXPORT QDebug operator<<( QDebug, const QwtPointPolar & );
//#endif
/*inline QPoint qwtPolar2Pos( const QPoint &pole, double radius, double angle );
inline QPoint qwtDegree2Pos( const QPoint &pole, double radius, double angle );
inline QPointF qwtPolar2Pos( const QPointF &pole, double radius, double angle );
inline QPointF qwtDegree2Pos( const QPointF &pole, double radius, double angle );
inline QPointF qwtFastPolar2Pos( const QPointF &pole, double radius, double angle );
inline QPointF qwtFastDegree2Pos( const QPointF &pole, double radius, double angle );
inline QwtPointPolar qwtFastPos2Polar( const QPointF &pos );
*/