Skip to content

Commit 5c527c4

Browse files
author
timlinux
committed
Deprecate the use of SRS in favour of CRS in api
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15445 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5d176c0 commit 5c527c4

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

src/core/qgsmaprenderer.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -660,21 +660,21 @@ bool QgsMapRenderer::hasCrsTransformEnabled()
660660
return mProjectionsEnabled;
661661
}
662662

663-
void QgsMapRenderer::setDestinationSrs( const QgsCoordinateReferenceSystem& srs )
663+
void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs )
664664
{
665-
QgsDebugMsg( "* Setting destCRS : = " + srs.toProj4() );
666-
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( srs.srsid() ) );
667-
if ( *mDestCRS != srs )
665+
QgsDebugMsg( "* Setting destCRS : = " + crs.toProj4() );
666+
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( crs.srsid() ) );
667+
if ( *mDestCRS != crs )
668668
{
669-
QgsDebugMsg( "Setting DistArea CRS to " + QString::number( srs.srsid() ) );
670-
mDistArea->setSourceCrs( srs.srsid() );
671-
*mDestCRS = srs;
669+
QgsDebugMsg( "Setting DistArea CRS to " + QString::number( crs.srsid() ) );
670+
mDistArea->setSourceCrs( crs.srsid() );
671+
*mDestCRS = crs;
672672
updateFullExtent();
673673
emit destinationSrsChanged();
674674
}
675675
}
676676

677-
const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationSrs()
677+
const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationCrs()
678678
{
679679
QgsDebugMsgLevel( "* Returning destCRS", 3 );
680680
QgsDebugMsgLevel( "* DestCRS.srsid() = " + QString::number( mDestCRS->srsid() ), 3 );

src/core/qgsmaprenderer.h

+16-4
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,23 @@ class CORE_EXPORT QgsMapRenderer : public QObject
169169
//! returns true if projections are enabled for this layer set
170170
bool hasCrsTransformEnabled();
171171

172-
//! sets destination spatial reference system
173-
void setDestinationSrs( const QgsCoordinateReferenceSystem& srs );
172+
/** sets destination coordinate reference system
173+
* @note deprecated by qgis 1.7
174+
* @see setDestinationCrs
175+
*/
176+
Q_DECL_DEPRECATED void setDestinationSrs( const QgsCoordinateReferenceSystem& srs ) { setDestinationCrs( srs ); };
177+
178+
/** returns CRS of destination coordinate reference system
179+
* @note deprecated by qgis 1.7
180+
* @see destinationCrs
181+
*/
182+
Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& destinationSrs() { return destinationCrs(); };
183+
184+
//! sets destination coordinate reference system
185+
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
174186

175-
//! returns CRS of destination spatial reference system
176-
const QgsCoordinateReferenceSystem& destinationSrs();
187+
//! returns CRS of destination coordinate reference system
188+
const QgsCoordinateReferenceSystem& destinationCrs();
177189

178190
void setOutputUnits( OutputUnits u ) {mOutputUnits = u;}
179191

0 commit comments

Comments
 (0)