File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,14 @@ void QgsQuickCoordinateTransformer::setSourceCrs( const QgsCoordinateReferenceSy
76
76
77
77
void QgsQuickCoordinateTransformer::setTransformContext ( const QgsCoordinateTransformContext &context )
78
78
{
79
- mCoordinateTransform .setContext ( context );
79
+ mTransformContext = context;
80
+ mCoordinateTransform .setContext ( mTransformContext );
81
+ emit transformContextChanged ();
82
+ }
83
+
84
+ QgsCoordinateTransformContext QgsQuickCoordinateTransformer::transformContext () const
85
+ {
86
+ return mTransformContext ;
80
87
}
81
88
82
89
void QgsQuickCoordinateTransformer::updatePosition ()
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
53
53
Q_PROPERTY ( QgsCoordinateReferenceSystem sourceCrs READ sourceCrs WRITE setSourceCrs NOTIFY sourceCrsChanged )
54
54
55
55
// ! Transformation context, can be set from QgsQuickMapSettings::transformContext()
56
- Q_PROPERTY ( QgsCoordinateTransformContext transformContext WRITE setTransformContext )
56
+ Q_PROPERTY ( QgsCoordinateTransformContext transformContext READ transformContext WRITE setTransformContext NOTIFY transformContextChanged )
57
57
58
58
public:
59
59
// ! Creates new coordinate transformer
@@ -83,6 +83,9 @@ class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
83
83
// !\copydoc QgsQuickCoordinateTransformer::transformContext
84
84
void setTransformContext ( const QgsCoordinateTransformContext &context );
85
85
86
+ // !\copydoc QgsQuickCoordinateTransformer::transformContext
87
+ QgsCoordinateTransformContext transformContext () const ;
88
+
86
89
signals:
87
90
// !\copydoc QgsQuickCoordinateTransformer::projectedPosition
88
91
void projectedPositionChanged ();
@@ -105,6 +108,7 @@ class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
105
108
QgsPoint mProjectedPosition ;
106
109
QgsPoint mSourcePosition ;
107
110
QgsCoordinateTransform mCoordinateTransform ;
111
+ QgsCoordinateTransformContext mTransformContext ;
108
112
};
109
113
110
114
#endif // QGSQUICKCOORDINATETRANSFORMER_H
You can’t perform that action at this time.
0 commit comments