[QGIS Commit] r15445 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Mar 12 02:16:03 EST 2011


Author: timlinux
Date: 2011-03-11 23:16:03 -0800 (Fri, 11 Mar 2011)
New Revision: 15445

Modified:
   trunk/qgis/src/core/qgsmaprenderer.cpp
   trunk/qgis/src/core/qgsmaprenderer.h
Log:
Deprecate the use of SRS in favour of CRS in api

Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp	2011-03-12 05:57:26 UTC (rev 15444)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp	2011-03-12 07:16:03 UTC (rev 15445)
@@ -660,21 +660,21 @@
   return mProjectionsEnabled;
 }
 
-void QgsMapRenderer::setDestinationSrs( const QgsCoordinateReferenceSystem& srs )
+void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs )
 {
-  QgsDebugMsg( "* Setting destCRS : = " + srs.toProj4() );
-  QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( srs.srsid() ) );
-  if ( *mDestCRS != srs )
+  QgsDebugMsg( "* Setting destCRS : = " + crs.toProj4() );
+  QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( crs.srsid() ) );
+  if ( *mDestCRS != crs )
   {
-    QgsDebugMsg( "Setting DistArea CRS to " + QString::number( srs.srsid() ) );
-    mDistArea->setSourceCrs( srs.srsid() );
-    *mDestCRS = srs;
+    QgsDebugMsg( "Setting DistArea CRS to " + QString::number( crs.srsid() ) );
+    mDistArea->setSourceCrs( crs.srsid() );
+    *mDestCRS = crs;
     updateFullExtent();
     emit destinationSrsChanged();
   }
 }
 
-const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationSrs()
+const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationCrs()
 {
   QgsDebugMsgLevel( "* Returning destCRS", 3 );
   QgsDebugMsgLevel( "* DestCRS.srsid() = " + QString::number( mDestCRS->srsid() ), 3 );

Modified: trunk/qgis/src/core/qgsmaprenderer.h
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.h	2011-03-12 05:57:26 UTC (rev 15444)
+++ trunk/qgis/src/core/qgsmaprenderer.h	2011-03-12 07:16:03 UTC (rev 15445)
@@ -169,12 +169,24 @@
     //! returns true if projections are enabled for this layer set
     bool hasCrsTransformEnabled();
 
-    //! sets destination spatial reference system
-    void setDestinationSrs( const QgsCoordinateReferenceSystem& srs );
+    /** sets destination coordinate reference system
+     * @note deprecated by qgis 1.7
+     * @see setDestinationCrs
+     */
+    Q_DECL_DEPRECATED void setDestinationSrs( const QgsCoordinateReferenceSystem& srs ) { setDestinationCrs( srs ); };
 
-    //! returns CRS of destination spatial reference system
-    const QgsCoordinateReferenceSystem& destinationSrs();
+    /** returns CRS of destination coordinate reference system
+     * @note deprecated by qgis 1.7
+     * @see destinationCrs
+     */
+    Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& destinationSrs() { return destinationCrs(); };
 
+    //! sets destination coordinate reference system
+    void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
+
+    //! returns CRS of destination coordinate reference system
+    const QgsCoordinateReferenceSystem& destinationCrs();
+
     void setOutputUnits( OutputUnits u ) {mOutputUnits = u;}
 
     OutputUnits outputUnits() const {return mOutputUnits;}



More information about the QGIS-commit mailing list