File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
19
19
#include " qgspoint.h"
20
+ #include " qgspointv2.h"
20
21
21
22
#include < cmath>
22
23
#include < QTextStream>
@@ -30,6 +31,12 @@ QgsPoint::QgsPoint( const QgsPoint& p )
30
31
mY = p.y ();
31
32
}
32
33
34
+ QgsPoint::QgsPoint ( const QgsPointV2& point )
35
+ : mX( point.x() )
36
+ , mY( point.y() )
37
+ {
38
+ }
39
+
33
40
QPointF QgsPoint::toQPointF () const
34
41
{
35
42
return QPointF ( mX , mY );
Original file line number Diff line number Diff line change 27
27
#include < QPoint>
28
28
#include < QObject>
29
29
30
+ class QgsPointV2 ;
31
+
30
32
/* * \ingroup core
31
33
* A class to represent a point.
32
34
* For Z and M support prefer QgsPointV2.
@@ -75,6 +77,14 @@ class CORE_EXPORT QgsPoint
75
77
, mY ( point.y() )
76
78
{}
77
79
80
+ /* *
81
+ * Create a new point.
82
+ * Z and M values will be dropped.
83
+ *
84
+ * @note Added in QGIS 3.0
85
+ */
86
+ QgsPoint ( const QgsPointV2& point );
87
+
78
88
~QgsPoint ()
79
89
{}
80
90
You can’t perform that action at this time.
0 commit comments