Skip to content
Permalink
Browse files

signal hasCrsTransformEnabled() renamed to hasCrsTransformEnabledChan…

…ged()
  • Loading branch information
blazek committed Jan 16, 2014
1 parent 8b6d180 commit f33c4904d3b67b3f677494c97006b7d1ea918355
@@ -269,6 +269,7 @@ class QgsMapRenderer : QObject
void drawingProgress( int current, int total );

void hasCrsTransformEnabled( bool flag );
void hasCrsTransformEnabledChanged( bool flag );

void destinationSrsChanged();

@@ -57,7 +57,10 @@ class QgsMapCanvas : QGraphicsView

QgsMapCanvasMap* map();

QgsMapRenderer* mapRenderer() /Transfer/;
// KeepReference is necessary because otherwise
// mapRenderer().hasCrsTransformEnabled() was crashing, most probably because
// QgsMapRenderer.hasCrsTransformEnabled() is both signal and function
QgsMapRenderer* mapRenderer() /KeepReference/;

//! Accessor for the canvas paint device
QPaintDevice &canvasPaintDevice();
@@ -1915,7 +1915,7 @@ void QgisApp::setupConnections()
// connect renderer
connect( mMapCanvas->mapRenderer(), SIGNAL( drawingProgress( int, int ) ),
this, SLOT( showProgress( int, int ) ) );
connect( mMapCanvas->mapRenderer(), SIGNAL( hasCrsTransformEnabled( bool ) ),
connect( mMapCanvas->mapRenderer(), SIGNAL( hasCrsTransformEnabledChanged( bool ) ),
this, SLOT( hasCrsTransformEnabled( bool ) ) );
connect( mMapCanvas->mapRenderer(), SIGNAL( destinationSrsChanged() ),
this, SLOT( destinationSrsChanged() ) );
@@ -727,7 +727,8 @@ void QgsMapRenderer::setProjectionsEnabled( bool enabled )
mDistArea->setEllipsoidalMode( enabled );
updateFullExtent();
mLastExtent.setMinimal();
emit hasCrsTransformEnabled( enabled );
emit hasCrsTransformEnabled( enabled ); // deprecated
emit hasCrsTransformEnabledChanged( enabled );
}
}

@@ -304,8 +304,17 @@ class CORE_EXPORT QgsMapRenderer : public QObject

void drawingProgress( int current, int total );

/** This signal is emitted when CRS transformation is enabled/disabled.
* @param flag true if transformation is enabled.
* @deprecated Use hasCrsTransformEnabledChanged( bool flag )
* to avoid conflict with method of the same name). */
void hasCrsTransformEnabled( bool flag );

/** This signal is emitted when CRS transformation is enabled/disabled.
* @param flag true if transformation is enabled.
* @note Added in 2.1 */
void hasCrsTransformEnabledChanged( bool flag );

void destinationSrsChanged();

void updateMap();
@@ -124,7 +124,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
moveCanvasContents( true );

connect( mMapRenderer, SIGNAL( drawError( QgsMapLayer* ) ), this, SLOT( showError( QgsMapLayer* ) ) );
connect( mMapRenderer, SIGNAL( hasCrsTransformEnabled( bool ) ), this, SLOT( crsTransformEnabled( bool ) ) );
connect( mMapRenderer, SIGNAL( hasCrsTransformEnabledChanged( bool ) ), this, SLOT( crsTransformEnabled( bool ) ) );

crsTransformEnabled( hasCrsTransformEnabled() );

@@ -338,7 +338,7 @@ void QgsMapCanvas::enableOverviewMode( QgsMapOverviewCanvas* overview )
if ( mMapOverview )
{
// disconnect old map overview if exists
disconnect( mMapRenderer, SIGNAL( hasCrsTransformEnabled( bool ) ),
disconnect( mMapRenderer, SIGNAL( hasCrsTransformEnabledChanged( bool ) ),
mMapOverview, SLOT( hasCrsTransformEnabled( bool ) ) );
disconnect( mMapRenderer, SIGNAL( destinationSrsChanged() ),
mMapOverview, SLOT( destinationSrsChanged() ) );
@@ -351,7 +351,7 @@ void QgsMapCanvas::enableOverviewMode( QgsMapOverviewCanvas* overview )
if ( overview )
{
// connect to the map render to copy its projection settings
connect( mMapRenderer, SIGNAL( hasCrsTransformEnabled( bool ) ),
connect( mMapRenderer, SIGNAL( hasCrsTransformEnabledChanged( bool ) ),
overview, SLOT( hasCrsTransformEnabled( bool ) ) );
connect( mMapRenderer, SIGNAL( destinationSrsChanged() ),
overview, SLOT( destinationSrsChanged() ) );

0 comments on commit f33c490

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