Skip to content
Permalink
Browse files

Update QgsMapLayer to current naming convention for CRS; srs() functi…

…on left for API compatability (note was added to warn of future changes in 2.0)

git-svn-id: http://svn.osgeo.org/qgis/trunk@11943 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer
cfarmer committed Nov 7, 2009
1 parent 05a5712 commit b4a6b417dbc91b1fdc99a629a6a5c92bc9845d98
Showing with 28 additions and 2 deletions.
  1. +11 −1 python/core/qgsmaplayer.sip
  2. +7 −0 src/core/qgsmaplayer.cpp
  3. +10 −1 src/core/qgsmaplayer.h
@@ -188,7 +188,17 @@ public:
*/
virtual QString lastError();

/** Returns layer's spatial reference system */
/** Returns layer's spatial reference system
@note This was introduced in QGIS 1.4
*/

const QgsCoordinateReferenceSystem& crs();

/** Returns layer's spatial reference system
@note This method is here for API compatibility
and will be deprecited in 2.0
@see crs()
*/
const QgsCoordinateReferenceSystem& srs();

/** Sets layer's spatial reference system */
@@ -427,8 +427,15 @@ void QgsMapLayer::setSubLayerVisibility( QString name, bool vis )
// NOOP
}

const QgsCoordinateReferenceSystem& QgsMapLayer::crs()
{
return *mCRS;
}

const QgsCoordinateReferenceSystem& QgsMapLayer::srs()
{
// This will be dropped in QGIS 2.0 due to conflicting name
// Please use crs() in the future
return *mCRS;
}

@@ -190,7 +190,16 @@ class CORE_EXPORT QgsMapLayer : public QObject
*/
virtual QString lastError();

/** Returns layer's spatial reference system */
/** Returns layer's spatial reference system
@note This was introduced in QGIS 1.4
*/
const QgsCoordinateReferenceSystem& crs();

/** Returns layer's spatial reference system
@note This method is here for API compatibility
and will be deprecited in 2.0
@see crs()
*/
const QgsCoordinateReferenceSystem& srs();

/** Sets layer's spatial reference system */

0 comments on commit b4a6b41

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