Skip to content
Permalink
Browse files

Make QgsCoordinateUtils functions Q_INVOKABLE

  • Loading branch information
m-kuhn committed Nov 16, 2018
1 parent 3e14761 commit 98781da6b070a652acf87e8b946c26da98d42d85
Showing with 6 additions and 3 deletions.
  1. +1 −1 src/core/CMakeLists.txt
  2. +5 −2 src/core/qgscoordinateutils.h
@@ -593,6 +593,7 @@ SET(QGIS_CORE_MOC_HDRS
qgsbrowsermodel.h
qgsbrowserproxymodel.h
qgscoordinatereferencesystem.h
qgscoordinateutils.h
qgscredentials.h
qgsdataitem.h
qgsdataprovider.h
@@ -840,7 +841,6 @@ SET(QGIS_CORE_HDRS
qgscoordinateformatter.h
qgscoordinatetransform.h
qgscoordinatetransformcontext.h
qgscoordinateutils.h
qgsdartmeasurement.h
qgsdatadefinedsizelegend.h
qgsdataitemprovider.h
@@ -21,6 +21,7 @@
#define SIP_NO_FILE

#include <QString>
#include <QObject>

#include "qgis_core.h"

@@ -39,6 +40,8 @@ class QgsProject;
*/
class CORE_EXPORT QgsCoordinateUtils
{
Q_GADGET

public:

/**
@@ -52,14 +55,14 @@ class CORE_EXPORT QgsCoordinateUtils
* \param mapCrs CRS of map
* \returns optimal number of decimal places for coordinates
*/
static int calculateCoordinatePrecision( double mapUnitsPerPixel, const QgsCoordinateReferenceSystem &mapCrs );
Q_INVOKABLE static int calculateCoordinatePrecision( double mapUnitsPerPixel, const QgsCoordinateReferenceSystem &mapCrs );

/**
* Formats a \a point coordinate for use with the specified \a project, respecting the project's
* coordinate display settings.
* \since QGIS 3.2
*/
static QString formatCoordinateForProject( QgsProject *project, const QgsPointXY &point, const QgsCoordinateReferenceSystem &destCrs, int precision );
Q_INVOKABLE static QString formatCoordinateForProject( QgsProject *project, const QgsPointXY &point, const QgsCoordinateReferenceSystem &destCrs, int precision );

};

0 comments on commit 98781da

Please sign in to comment.
You can’t perform that action at this time.