[QGIS Commit] r9504 - in trunk/qgis: python/core python/gui src/app
src/app/legend src/core src/core/composer src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Oct 20 16:41:06 EDT 2008
Author: timlinux
Date: 2008-10-20 16:41:06 -0400 (Mon, 20 Oct 2008)
New Revision: 9504
Modified:
trunk/qgis/python/core/qgscoordinatetransform.sip
trunk/qgis/python/core/qgsdistancearea.sip
trunk/qgis/python/core/qgsmaprenderer.sip
trunk/qgis/python/gui/qgsmapcanvas.sip
trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgisapp.h
trunk/qgis/src/app/qgsmaptoolidentify.cpp
trunk/qgis/src/app/qgsmeasuretool.cpp
trunk/qgis/src/app/qgsprojectproperties.cpp
trunk/qgis/src/core/composer/qgscomposermap.cpp
trunk/qgis/src/core/qgscoordinatetransform.cpp
trunk/qgis/src/core/qgscoordinatetransform.h
trunk/qgis/src/core/qgsdistancearea.cpp
trunk/qgis/src/core/qgsdistancearea.h
trunk/qgis/src/core/qgsmaprenderer.cpp
trunk/qgis/src/core/qgsmaprenderer.h
trunk/qgis/src/core/qgsprojectfiletransform.cpp
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsmapcanvas.h
trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
trunk/qgis/src/gui/qgsmapoverviewcanvas.h
Log:
api cleanups for distance area
Modified: trunk/qgis/python/core/qgscoordinatetransform.sip
===================================================================
--- trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-20 20:41:06 UTC (rev 9504)
@@ -64,7 +64,7 @@
* Set the source (layer) QgsCoordinateReferenceSystem
* @param theCRS QgsCoordinateReferenceSystem representation of the layer's coordinate system
*/
- void setSourceCRS(const QgsCoordinateReferenceSystem& theCRS);
+ void setSourceCrs(const QgsCoordinateReferenceSystem& theCRS);
/*!
* Mutator for dest QgsCoordinateReferenceSystem
@@ -76,7 +76,7 @@
* Get the QgsCoordinateReferenceSystem representation of the layer's coordinate system
* @return QgsCoordinateReferenceSystem of the layer's coordinate system
*/
- QgsCoordinateReferenceSystem& sourceCRS();
+ QgsCoordinateReferenceSystem& sourceCrs();
/*!
* Get the QgsCoordinateReferenceSystem representation of the map canvas coordinate system
Modified: trunk/qgis/python/core/qgsdistancearea.sip
===================================================================
--- trunk/qgis/python/core/qgsdistancearea.sip 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/python/core/qgsdistancearea.sip 2008-10-20 20:41:06 UTC (rev 9504)
@@ -17,16 +17,16 @@
void setProjectionsEnabled(bool flag);
//! returns projections enabled flag
- bool projectionsEnabled();
+ bool hasCrsTransformEnabled();
//! sets source spatial reference system (by QGIS CRS)
- void setSourceCRS(long srsid);
+ void setSourceCrs(long srsid);
//! sets source spatial reference system (by EpsgCrsId)
void setSourceEpsgCrsId(long epsgId);
//! returns source spatial reference system
- long sourceCRS();
+ long sourceCrs();
//! What sort of coordinate system is being used?
bool geographic();
@@ -41,7 +41,7 @@
//! returns ellipsoid's semi minor axis
double ellipsoidSemiMinor();
//! returns ellipsoid's inverse flattening
- double ellipsoidInvFlattening();
+ double ellipsoidInverseFlattening();
//! general measurement (line distance or polygon area)
double measure(QgsGeometry* geometry);
@@ -56,7 +56,7 @@
double measurePolygon(const QList<QgsPoint>& points);
//! compute bearing - in radians
- double getBearing(const QgsPoint& p1, const QgsPoint& p2);
+ double bearing(const QgsPoint& p1, const QgsPoint& p2);
static QString textUnit(double value, int decimals, QGis::UnitType u, bool isArea);
Modified: trunk/qgis/python/core/qgsmaprenderer.sip
===================================================================
--- trunk/qgis/python/core/qgsmaprenderer.sip 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/python/core/qgsmaprenderer.sip 2008-10-20 20:41:06 UTC (rev 9504)
@@ -69,7 +69,7 @@
void setProjectionsEnabled(bool enabled);
//! returns true if projections are enabled for this layer set
- bool projectionsEnabled();
+ bool hasCrsTransformEnabled();
//! sets destination spatial reference system
void setDestinationSrs(const QgsCoordinateReferenceSystem& srs);
@@ -99,7 +99,7 @@
void setProgress(int current, int total);
- void projectionsEnabled(bool flag);
+ void hasCrsTransformEnabled(bool flag);
void destinationSrsChanged();
Modified: trunk/qgis/python/gui/qgsmapcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvas.sip 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/python/gui/qgsmapcanvas.sip 2008-10-20 20:41:06 UTC (rev 9504)
@@ -194,7 +194,7 @@
bool renderFlag();
/** A simple helper method to find out if on the fly projections are enabled or not */
- bool projectionsEnabled();
+ bool hasCrsTransformEnabled();
/** The map units may have changed, so cope with that */
void mapUnitsChanged();
Modified: trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapoverviewcanvas.sip 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/python/gui/qgsmapoverviewcanvas.sip 2008-10-20 20:41:06 UTC (rev 9504)
@@ -30,7 +30,7 @@
public slots:
- void projectionsEnabled(bool flag);
+ void hasCrsTransformEnabled(bool flag);
void destinationSrsChanged();
Modified: trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayerfile.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/legend/qgslegendlayerfile.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -270,7 +270,7 @@
destCRS = vlayer->srs();
// Find out if we have projections enabled or not
- if ( QgisApp::instance()->mapCanvas()->mapRenderer()->projectionsEnabled() )
+ if ( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() )
{
destCRS = QgisApp::instance()->mapCanvas()->mapRenderer()->destinationSrs();
}
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -1493,7 +1493,7 @@
//signal when mouse moved over window (coords display in status bar)
connect( mMapCanvas, SIGNAL( xyCoordinates( QgsPoint & ) ), this, SLOT( showMouseCoordinate( QgsPoint & ) ) );
connect( mMapCanvas->mapRenderer(), SIGNAL( drawingProgress( int, int ) ), this, SLOT( showProgress( int, int ) ) );
- connect( mMapCanvas->mapRenderer(), SIGNAL( projectionsEnabled( bool ) ), this, SLOT( projectionsEnabled( bool ) ) );
+ connect( mMapCanvas->mapRenderer(), SIGNAL( hasCrsTransformEnabled( bool ) ), this, SLOT( hasCrsTransformEnabled( bool ) ) );
connect( mMapCanvas->mapRenderer(), SIGNAL( destinationSrsChanged() ), this, SLOT( destinationSrsChanged() ) );
connect( mMapCanvas, SIGNAL( extentsChanged() ), this, SLOT( showExtents() ) );
connect( mMapCanvas, SIGNAL( scaleChanged( double ) ), this, SLOT( showScale( double ) ) );
@@ -4811,7 +4811,7 @@
}
-void QgisApp::projectionsEnabled( bool theFlag )
+void QgisApp::hasCrsTransformEnabled( bool theFlag )
{
// save this information to project
QgsProject::instance()->writeEntry( "SpatialRefSys", "/ProjectionsEnabled", ( theFlag ? 1 : 0 ) );
@@ -4996,14 +4996,14 @@
//connect (pp,SIGNAL(refresh()), mMapCanvas, SLOT(refresh()));
QgsMapRenderer* myRender = mMapCanvas->mapRenderer();
- bool wasProjected = myRender->projectionsEnabled();
+ bool wasProjected = myRender->hasCrsTransformEnabled();
long oldCRSID = myRender->destinationSrs().srsid();
// Display the modal dialog box.
pp->exec();
long newCRSID = myRender->destinationSrs().srsid();
- bool isProjected = myRender->projectionsEnabled();
+ bool isProjected = myRender->hasCrsTransformEnabled();
// projections have been turned on/off or dest CRS has changed while projections are on
if ( wasProjected != isProjected || ( isProjected && oldCRSID != newCRSID ) )
Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/qgisapp.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -509,7 +509,7 @@
void showExtents();
void showStatusMessage( QString theMessage );
void updateMouseCoordinatePrecision();
- void projectionsEnabled( bool theFlag );
+ void hasCrsTransformEnabled( bool theFlag );
void destinationSrsChanged();
// void debugHook();
//! Add a vector layer to the map
Modified: trunk/qgis/src/app/qgsmaptoolidentify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/qgsmaptoolidentify.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -243,9 +243,9 @@
// init distance/area calculator
QgsDistanceArea calc;
- calc.setProjectionsEnabled( mCanvas->projectionsEnabled() ); // project?
+ calc.setProjectionsEnabled( mCanvas->hasCrsTransformEnabled() ); // project?
calc.setEllipsoid( ellipsoid );
- calc.setSourceCRS( layer->srs().srsid() );
+ calc.setSourceCrs( layer->srs().srsid() );
mFeatureList.clear();
QApplication::setOverrideCursor( Qt::WaitCursor );
Modified: trunk/qgis/src/app/qgsmeasuretool.cpp
===================================================================
--- trunk/qgis/src/app/qgsmeasuretool.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/qgsmeasuretool.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -123,9 +123,9 @@
// set source CRS and projections enabled flag
// QgsMapRenderer* mapRender = mCanvas->mapRenderer();
- // mCalc->setProjectionsEnabled(mapRender->projectionsEnabled());
+ // mCalc->setProjectionsEnabled(mapRender->hasCrsTransformEnabled());
// int srsid = mapRender->destinationSrs().srsid();
- // mCalc->setSourceCRS(srsid);
+ // mCalc->setSourceCrs(srsid);
int myRed = settings.value( "/qgis/default_measure_color_red", 180 ).toInt();
int myGreen = settings.value( "/qgis/default_measure_color_green", 180 ).toInt();
Modified: trunk/qgis/src/app/qgsprojectproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsprojectproperties.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/app/qgsprojectproperties.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -56,7 +56,7 @@
setMapUnits( myUnit );
//see if the user wants on the fly projection enabled
- bool myProjectionEnabled = myRender->projectionsEnabled();
+ bool myProjectionEnabled = myRender->hasCrsTransformEnabled();
cbxProjectionEnabled->setChecked( myProjectionEnabled );
long myCRSID = myRender->destinationSrs().srsid();
Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -113,7 +113,7 @@
theMapRenderer.setExtent( extent );
theMapRenderer.setOutputSize( size, dpi );
theMapRenderer.setLayerSet( mMapRenderer->layerSet() );
- theMapRenderer.setProjectionsEnabled( mMapRenderer->projectionsEnabled() );
+ theMapRenderer.setProjectionsEnabled( mMapRenderer->hasCrsTransformEnabled() );
theMapRenderer.setDestinationSrs( mMapRenderer->destinationSrs() );
QgsRenderContext* theRendererContext = theMapRenderer.rendererContext();
Modified: trunk/qgis/src/core/qgscoordinatetransform.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -99,7 +99,7 @@
}
}
-void QgsCoordinateTransform::setSourceCRS( const QgsCoordinateReferenceSystem& theCRS )
+void QgsCoordinateTransform::setSourceCrs( const QgsCoordinateReferenceSystem& theCRS )
{
mSourceCRS = theCRS;
initialise();
Modified: trunk/qgis/src/core/qgscoordinatetransform.h
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -99,7 +99,7 @@
* Set the source (layer) QgsCoordinateReferenceSystem
* @param theCRS QgsCoordinateReferenceSystem representation of the layer's coordinate system
*/
- void setSourceCRS( const QgsCoordinateReferenceSystem& theCRS );
+ void setSourceCrs( const QgsCoordinateReferenceSystem& theCRS );
/*!
* Mutator for dest QgsCoordinateReferenceSystem
@@ -111,7 +111,7 @@
* Get the QgsCoordinateReferenceSystem representation of the layer's coordinate system
* @return QgsCoordinateReferenceSystem of the layer's coordinate system
*/
- QgsCoordinateReferenceSystem& sourceCRS() { return mSourceCRS; }
+ QgsCoordinateReferenceSystem& sourceCrs() { return mSourceCRS; }
/*!
* Get the QgsCoordinateReferenceSystem representation of the map canvas coordinate system
@@ -289,9 +289,9 @@
}
mySummary += "\n\tSource Spatial Ref Sys : ";
- if (r.sourceCRS())
+ if (r.sourceCrs())
{
- mySummary << r.sourceCRS();
+ mySummary << r.sourceCrs();
}
else
{
Modified: trunk/qgis/src/core/qgsdistancearea.cpp
===================================================================
--- trunk/qgis/src/core/qgsdistancearea.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgsdistancearea.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -60,18 +60,18 @@
mProjectionsEnabled = flag;
}
-void QgsDistanceArea::setSourceCRS( long srsid )
+void QgsDistanceArea::setSourceCrs( long srsid )
{
QgsCoordinateReferenceSystem srcCRS;
srcCRS.createFromSrsId( srsid );
- mCoordTransform->setSourceCRS( srcCRS );
+ mCoordTransform->setSourceCrs( srcCRS );
}
void QgsDistanceArea::setSourceEpsgCrsId( long epsgId )
{
QgsCoordinateReferenceSystem srcCRS;
srcCRS.createFromEpsg( epsgId );
- mCoordTransform->setSourceCRS( srcCRS );
+ mCoordTransform->setSourceCrs( srcCRS );
}
@@ -404,7 +404,7 @@
}
-double QgsDistanceArea::getBearing( const QgsPoint& p1, const QgsPoint& p2 )
+double QgsDistanceArea::bearing( const QgsPoint& p1, const QgsPoint& p2 )
{
QgsPoint pp1 = p1, pp2 = p2;
if ( mProjectionsEnabled && ( mEllipsoid != "NONE" ) )
Modified: trunk/qgis/src/core/qgsdistancearea.h
===================================================================
--- trunk/qgis/src/core/qgsdistancearea.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgsdistancearea.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -45,18 +45,18 @@
void setProjectionsEnabled( bool flag );
//! returns projections enabled flag
- bool projectionsEnabled() { return mProjectionsEnabled; }
+ bool hasCrsTransformEnabled() { return mProjectionsEnabled; }
//! sets source spatial reference system (by QGIS CRS)
- void setSourceCRS( long srsid );
+ void setSourceCrs( long srsid );
//! sets source spatial reference system (by EpsgCrsId)
void setSourceEpsgCrsId( long epsgId );
//! returns source spatial reference system
- long sourceCRS() { return mSourceRefSys; }
+ long sourceCrs() { return mSourceRefSys; }
//! What sort of coordinate system is being used?
- bool geographic() { return mCoordTransform->sourceCRS().geographicFlag(); }
+ bool geographic() { return mCoordTransform->sourceCrs().geographicFlag(); }
//! sets ellipsoid by its acronym
bool setEllipsoid( const QString& ellipsoid );
@@ -69,7 +69,7 @@
//! returns ellipsoid's semi minor axis
double ellipsoidSemiMinor() { return mSemiMinor; }
//! returns ellipsoid's inverse flattening
- double ellipsoidInvFlattening() { return mInvFlattening; }
+ double ellipsoidInverseFlattening() { return mInvFlattening; }
//! general measurement (line distance or polygon area)
double measure( QgsGeometry* geometry );
@@ -83,7 +83,7 @@
double measurePolygon( const QList<QgsPoint>& points );
//! compute bearing - in radians
- double getBearing( const QgsPoint& p1, const QgsPoint& p2 );
+ double bearing( const QgsPoint& p1, const QgsPoint& p2 );
static QString textUnit( double value, int decimals, QGis::UnitType u, bool isArea );
Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -301,7 +301,7 @@
bool split = false;
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
r1 = mExtent;
split = splitLayersExtent( ml, r1, r2 );
@@ -395,7 +395,7 @@
{
bool split = false;
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
QgsRect r1 = mExtent;
split = splitLayersExtent( ml, r1, r2 );
@@ -461,11 +461,11 @@
QgsDebugMsg( "Adjusting DistArea projection on/off" );
mDistArea->setProjectionsEnabled( enabled );
updateFullExtent();
- emit projectionsEnabled( enabled );
+ emit hasCrsTransformEnabled( enabled );
}
}
-bool QgsMapRenderer::projectionsEnabled()
+bool QgsMapRenderer::hasCrsTransformEnabled()
{
return mProjectionsEnabled;
}
@@ -477,7 +477,7 @@
if ( *mDestCRS != srs )
{
QgsDebugMsg( "Setting DistArea CRS to " + QString::number( srs.srsid() ) );
- mDistArea->setSourceCRS( srs.srsid() );
+ mDistArea->setSourceCrs( srs.srsid() );
*mDestCRS = srs;
updateFullExtent();
emit destinationSrsChanged();
@@ -497,7 +497,7 @@
{
bool split = false;
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
try
{
@@ -513,7 +513,7 @@
// extent separately.
static const double splitCoord = 180.0;
- if ( tr.sourceCRS().geographicFlag() )
+ if ( tr.sourceCrs().geographicFlag() )
{
// Note: ll = lower left point
// and ur = upper right point
@@ -553,7 +553,7 @@
QgsRect QgsMapRenderer::layerExtentToOutputExtent( QgsMapLayer* theLayer, QgsRect extent )
{
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
try
{
@@ -575,7 +575,7 @@
QgsPoint QgsMapRenderer::layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint point )
{
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
try
{
@@ -596,7 +596,7 @@
QgsPoint QgsMapRenderer::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint point )
{
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
try
{
@@ -618,7 +618,7 @@
QgsRect QgsMapRenderer::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRect rect )
{
- if ( projectionsEnabled() )
+ if ( hasCrsTransformEnabled() )
{
try
{
@@ -844,7 +844,7 @@
QDomElement projNode = theDoc.createElement( "projections" );
theNode.appendChild( projNode );
- QDomText projText = theDoc.createTextNode( QString::number( projectionsEnabled() ) );
+ QDomText projText = theDoc.createTextNode( QString::number( hasCrsTransformEnabled() ) );
projNode.appendChild( projText );
// destination CRS
Modified: trunk/qgis/src/core/qgsmaprenderer.h
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgsmaprenderer.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -112,7 +112,7 @@
void setProjectionsEnabled( bool enabled );
//! returns true if projections are enabled for this layer set
- bool projectionsEnabled();
+ bool hasCrsTransformEnabled();
//! sets destination spatial reference system
void setDestinationSrs( const QgsCoordinateReferenceSystem& srs );
@@ -149,7 +149,7 @@
void drawingProgress( int current, int total );
- void projectionsEnabled( bool flag );
+ void hasCrsTransformEnabled( bool flag );
void destinationSrsChanged();
Modified: trunk/qgis/src/core/qgsprojectfiletransform.cpp
===================================================================
--- trunk/qgis/src/core/qgsprojectfiletransform.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/core/qgsprojectfiletransform.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -105,13 +105,13 @@
QDomElement properties = qgis.firstChildElement( "properties" );
QDomElement spatial = properties.firstChildElement( "SpatialRefSys" );
- QDomElement projectionsEnabled = spatial.firstChildElement( "ProjectionsEnabled" );
+ QDomElement hasCrsTransformEnabled = spatial.firstChildElement( "ProjectionsEnabled" );
// Type is 'int', and '1' if on.
// Create an element
QDomElement projection = mDom.createElement( "projections" );
- QgsDebugMsg( QString( "Projection flag: " ) + projectionsEnabled.text() );
+ QgsDebugMsg( QString( "Projection flag: " ) + hasCrsTransformEnabled.text() );
// Set flag from ProjectionsEnabled
- projection.appendChild( mDom.createTextNode( projectionsEnabled.text() ) );
+ projection.appendChild( mDom.createTextNode( hasCrsTransformEnabled.text() ) );
// Set new element as child of <mapcanvas>
mapCanvas.appendChild( projection );
@@ -128,11 +128,11 @@
// Find the coordinatetransform
QDomNode coordinateTransform = mapLayer.namedItem( "coordinatetransform" );
// Find the sourcesrs
- QDomNode sourceCRS = coordinateTransform.namedItem( "sourcesrs" );
+ QDomNode sourceCrs = coordinateTransform.namedItem( "sourcesrs" );
// Rename to srs
- sourceCRS.toElement().setTagName( "srs" );
+ sourceCrs.toElement().setTagName( "srs" );
// Re-parent to maplayer
- mapLayer.appendChild( sourceCRS );
+ mapLayer.appendChild( sourceCrs );
// Re-move coordinatetransform
// Take the destination CRS of the first layer and use for mapcanvas projection
if ( ! doneDestination )
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -311,8 +311,8 @@
if ( mMapOverview )
{
// disconnect old map overview if exists
- disconnect( mMapRenderer, SIGNAL( projectionsEnabled( bool ) ),
- mMapOverview, SLOT( projectionsEnabled( bool ) ) );
+ disconnect( mMapRenderer, SIGNAL( hasCrsTransformEnabled( bool ) ),
+ mMapOverview, SLOT( hasCrsTransformEnabled( bool ) ) );
disconnect( mMapRenderer, SIGNAL( destinationSrsChanged() ),
mMapOverview, SLOT( destinationSrsChanged() ) );
@@ -324,8 +324,8 @@
if ( overview )
{
// connect to the map render to copy its projection settings
- connect( mMapRenderer, SIGNAL( projectionsEnabled( bool ) ),
- overview, SLOT( projectionsEnabled( bool ) ) );
+ connect( mMapRenderer, SIGNAL( hasCrsTransformEnabled( bool ) ),
+ overview, SLOT( hasCrsTransformEnabled( bool ) ) );
connect( mMapRenderer, SIGNAL( destinationSrsChanged() ),
overview, SLOT( destinationSrsChanged() ) );
}
@@ -524,9 +524,9 @@
} // zoomToPreviousExtent
-bool QgsMapCanvas::projectionsEnabled()
+bool QgsMapCanvas::hasCrsTransformEnabled()
{
- return mMapRenderer->projectionsEnabled();
+ return mMapRenderer->hasCrsTransformEnabled();
}
void QgsMapCanvas::mapUnitsChanged()
Modified: trunk/qgis/src/gui/qgsmapcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/gui/qgsmapcanvas.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -253,7 +253,7 @@
bool renderFlag() {return mRenderFlag;};
/** A simple helper method to find out if on the fly projections are enabled or not */
- bool projectionsEnabled();
+ bool hasCrsTransformEnabled();
/** The map units may have changed, so cope with that */
void mapUnitsChanged();
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2008-10-20 20:41:06 UTC (rev 9504)
@@ -272,7 +272,7 @@
reflectChangedExtent();
}
-void QgsMapOverviewCanvas::projectionsEnabled( bool flag )
+void QgsMapOverviewCanvas::hasCrsTransformEnabled( bool flag )
{
mMapRenderer->setProjectionsEnabled( flag );
}
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.h 2008-10-20 20:29:15 UTC (rev 9503)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.h 2008-10-20 20:41:06 UTC (rev 9504)
@@ -64,7 +64,7 @@
public slots:
- void projectionsEnabled( bool flag );
+ void hasCrsTransformEnabled( bool flag );
void destinationSrsChanged();
More information about the QGIS-commit
mailing list