Skip to content

Commit

Permalink
since 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Jun 25, 2018
1 parent 5ef5d39 commit 54a5059
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/quickgui/qgsquickcoordinatetransformer.h
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
*
* \note QML Type: CoordinateTransformer
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
{
2 changes: 1 addition & 1 deletion src/quickgui/qgsquickpositionkit.h
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
*
* \note QML Type: PositionKit
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_EXPORT QgsQuickPositionKit : public QObject
{
2 changes: 1 addition & 1 deletion src/quickgui/qgsquicksimulatedpositionsource.h
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
*
* \note QML Type: not exported
*
* \since QGIS 3.2
* \since QGIS 3.4
*/
class QUICK_NO_EXPORT QgsQuickSimulatedPositionSource : public QGeoPositionInfoSource
{
20 changes: 19 additions & 1 deletion src/quickgui/qgsquickutils.h
Original file line number Diff line number Diff line change
@@ -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.