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 1717
1818
1919#include " qgspoint.h"
20+ #include " qgspointv2.h"
2021
2122#include < cmath>
2223#include < QTextStream>
@@ -30,6 +31,12 @@ QgsPoint::QgsPoint( const QgsPoint& p )
3031 mY = p.y ();
3132}
3233
34+ QgsPoint::QgsPoint ( const QgsPointV2& point )
35+ : mX( point.x() )
36+ , mY( point.y() )
37+ {
38+ }
39+
3340QPointF QgsPoint::toQPointF () const
3441{
3542 return QPointF ( mX , mY );
Original file line number Diff line number Diff line change 2727#include < QPoint>
2828#include < QObject>
2929
30+ class QgsPointV2 ;
31+
3032/* * \ingroup core
3133 * A class to represent a point.
3234 * For Z and M support prefer QgsPointV2.
@@ -75,6 +77,14 @@ class CORE_EXPORT QgsPoint
7577 , mY ( point.y() )
7678 {}
7779
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+
7888 ~QgsPoint ()
7989 {}
8090
You can’t perform that action at this time.
0 commit comments