Skip to content
Permalink
Browse files
Add a QgsProject::ellipsoidChanged signal
  • Loading branch information
nyalldawson committed Apr 20, 2017
1 parent 6ecb17f commit dd6c7fdbc8b57a606c00e26a09c8884774122e68
Showing with 13 additions and 0 deletions.
  1. +1 −0 python/core/qgsproject.sip
  2. +2 −0 src/core/qgsproject.cpp
  3. +10 −0 src/core/qgsproject.h
@@ -546,6 +546,7 @@ class QgsProject : QObject, QgsExpressionContextGenerator
void customVariablesChanged();

void crsChanged();
void ellipsoidChanged( const QString &ellipsoid );

/**
* Emitted whenever a new transaction group has been created or a
@@ -447,6 +447,7 @@ void QgsProject::setEllipsoid( const QString &ellipsoid )
{
writeEntry( QStringLiteral( "Measure" ), QStringLiteral( "/Ellipsoid" ), ellipsoid );
setDirty( true );
emit ellipsoidChanged( ellipsoid );
}

void QgsProject::clear()
@@ -954,6 +955,7 @@ bool QgsProject::read()

emit nonIdentifiableLayersChanged( nonIdentifiableLayers() );
emit crsChanged();
emit ellipsoidChanged( ellipsoid() );

return true;
}
@@ -78,6 +78,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
Q_PROPERTY( QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged )
Q_PROPERTY( QString homePath READ homePath NOTIFY homePathChanged )
Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
Q_PROPERTY( QString ellipsoid READ ellipsoid WRITE setEllipsoid NOTIFY ellipsoidChanged )
Q_PROPERTY( QgsMapThemeCollection *mapThemeCollection READ mapThemeCollection NOTIFY mapThemeCollectionChanged )
Q_PROPERTY( QgsSnappingConfig snappingConfig READ snappingConfig WRITE setSnappingConfig NOTIFY snappingConfigChanged )
Q_PROPERTY( QgsRelationManager *relationManager READ relationManager )
@@ -770,6 +771,15 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
*/
void crsChanged();

/**
* Emitted when the project \a ellipsoid is changed.
*
* \since QGIS 3.0
* \see setEllipsoid()
* \see ellipsoid()
*/
void ellipsoidChanged( const QString &ellipsoid );

/**
* Emitted whenever a new transaction group has been created or a
* transaction group has been removed.

0 comments on commit dd6c7fd

Please sign in to comment.