Skip to content

Commit d6a4ab1

Browse files
committedAug 30, 2016
Expose QgsCoordinateReferenceSystem to QML
1 parent 15dd295 commit d6a4ab1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ SET(QGIS_CORE_MOC_HDRS
449449
qgsapplication.h
450450
qgsbrowsermodel.h
451451
qgscontexthelp.h
452+
qgscoordinatereferencesystem.h
452453
qgscredentials.h
453454
qgsdataitem.h
454455
qgsdataprovider.h
@@ -616,7 +617,6 @@ SET(QGIS_CORE_HDRS
616617
qgsconnectionpool.h
617618
qgscontexthelp.h
618619
qgsconditionalstyle.h
619-
qgscoordinatereferencesystem.h
620620
qgscoordinatetransform.h
621621
qgscoordinateutils.h
622622
qgscrscache.h

‎src/core/qgscoordinatereferencesystem.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem& );
184184
*/
185185
class CORE_EXPORT QgsCoordinateReferenceSystem
186186
{
187+
Q_GADGET
188+
187189
public:
188190

189191
//! Enumeration of types of IDs accepted in createFromId() method
@@ -246,7 +248,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
246248
* @returns matching CRS, or an invalid CRS if string could not be matched
247249
* @note added in QGIS 3.0
248250
*/
249-
static QgsCoordinateReferenceSystem fromEpsgId( long epsg );
251+
Q_INVOKABLE static QgsCoordinateReferenceSystem fromEpsgId( long epsg );
250252

251253
/** Creates a CRS from a proj4 style formatted string.
252254
* @param proj4 proj4 format string

0 commit comments

Comments
 (0)
Please sign in to comment.