Skip to content
Permalink
Browse files

since 3.4

  • Loading branch information
PeterPetrik committed May 29, 2018
1 parent 5ef5d39 commit 54a5059995384158fb582e99df634d146a2c60c2
@@ -34,7 +34,7 @@
*
* \note QML Type: CoordinateTransformer
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
{
@@ -35,7 +35,7 @@
*
* \note QML Type: PositionKit
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_EXPORT QgsQuickPositionKit : public QObject
{
@@ -46,7 +46,7 @@
*
* \note QML Type: not exported
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_NO_EXPORT QgsQuickSimulatedPositionSource : public QGeoPositionInfoSource
{
@@ -74,26 +74,36 @@ class QUICK_EXPORT QgsQuickUtils: public QObject

/**
* Creates crs from epsg code in QML
*
* \since QGIS 3.4
*/
Q_INVOKABLE static QgsCoordinateReferenceSystem coordinateReferenceSystemFromEpsgId( long epsg );

/**
* Creates QgsPointXY in QML
*
* \since QGIS 3.4
*/
Q_INVOKABLE QgsPointXY pointXYFactory( double x, double y ) const;

/**
* Creates QgsPoint in QML
*
* \since QGIS 3.4
*/
Q_INVOKABLE QgsPoint pointFactory( double x, double y, double z = std::numeric_limits<double>::quiet_NaN(), double m = std::numeric_limits<double>::quiet_NaN() ) const;

/**
* Converts QGeoCoordinate to QgsPoint
*
* \since QGIS 3.4
*/
Q_INVOKABLE QgsPoint coordinateToPoint( const QGeoCoordinate &coor ) const;

/**
* Transforms point between different crs from QML
*
* \since QGIS 3.4
*/
Q_INVOKABLE static QgsPointXY transformPoint( const QgsCoordinateReferenceSystem &srcCrs,
const QgsCoordinateReferenceSystem &destCrs,
@@ -121,10 +131,16 @@ class QUICK_EXPORT QgsQuickUtils: public QObject

/**
* Returns QUrl to image from library's /images folder.
*
* \since QGIS 3.4
*/
Q_INVOKABLE const QUrl getThemeIcon( const QString &name );

//! \copydoc QgsCoordinateFormatter::format()
/**
* \copydoc QgsCoordinateFormatter::format()
*
* \since QGIS 3.4
*/
Q_INVOKABLE static QString formatPoint(
const QgsPoint &point,
QgsCoordinateFormatter::Format format = QgsCoordinateFormatter::FormatPair,
@@ -141,6 +157,8 @@ class QUICK_EXPORT QgsQuickUtils: public QObject
* \param units units of dist
* \param decimals decimal to use
* \returns string represetation of dist
*
* \since QGIS 3.4
*/
Q_INVOKABLE static QString formatDistance( double distance, QgsUnitTypes::DistanceUnit units, int decimals = 1 );

0 comments on commit 54a5059

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