Skip to content

Commit ad184cd

Browse files
committedJan 30, 2017
[composer] Remove last link between composer maps and canvas
you WILL respect the separation between core and gui!!\!
1 parent 4a0793d commit ad184cd

File tree

5 files changed

+0
-12
lines changed

5 files changed

+0
-12
lines changed
 

‎python/core/composer/qgscomposermap.sip

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ class QgsComposerMap : QgsComposerItem
255255

256256
void updateItem();
257257

258-
/** Sets canvas pointer (necessary to query and draw map canvas items)*/
259-
void setMapCanvas( QGraphicsView* canvas /Transfer/ );
260-
261258
void setDrawAnnotations( bool draw );
262259
bool drawAnnotations() const;
263260

‎src/app/composer/qgscomposer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3708,7 +3708,6 @@ void QgsComposer::addComposerMap( QgsComposerMap* map )
37083708
return;
37093709
}
37103710

3711-
map->setMapCanvas( mapCanvas() ); //set canvas to composer map to have the possibility to draw canvas items
37123711
QgsComposerMapWidget* mapWidget = new QgsComposerMapWidget( map );
37133712
connect( this, SIGNAL( zoomLevelChanged() ), map, SLOT( renderModeUpdateCachedImage() ) );
37143713
mItemWidgetMap.insert( map, mapWidget );

‎src/core/composer/qgscomposermap.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
5656
, mKeepLayerStyles( false )
5757
, mFollowVisibilityPreset( false )
5858
, mUpdatesEnabled( true )
59-
, mMapCanvas( nullptr )
6059
, mDrawAnnotations( true )
6160
, mAtlasDriven( false )
6261
, mAtlasScalingMode( Auto )
@@ -101,7 +100,6 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition )
101100
, mKeepLayerStyles( false )
102101
, mFollowVisibilityPreset( false )
103102
, mUpdatesEnabled( true )
104-
, mMapCanvas( nullptr )
105103
, mDrawAnnotations( true )
106104
, mAtlasDriven( false )
107105
, mAtlasScalingMode( Auto )

‎src/core/composer/qgscomposermap.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class QgsComposerMapGrid;
3434
class QgsMapToPixel;
3535
class QDomNode;
3636
class QDomDocument;
37-
class QGraphicsView;
3837
class QPainter;
3938
class QgsFillSymbol;
4039
class QgsLineSymbol;
@@ -349,9 +348,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
349348

350349
void updateItem() override;
351350

352-
//! Sets canvas pointer (necessary to query and draw map canvas items)
353-
void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; }
354-
355351
/**
356352
* Sets whether annotations are drawn within the composer map.
357353
* @see drawAnnotations()
@@ -578,7 +574,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
578574

579575
//! Current bounding rectangle. This is used to check if notification to the graphics scene is necessary
580576
QRectF mCurrentRectangle;
581-
QGraphicsView* mMapCanvas;
582577
//! True if annotation items, rubber band, etc. from the main canvas should be displayed
583578
bool mDrawAnnotations;
584579

‎src/plugins/georeferencer/qgsgeorefplugingui.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,6 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
16431643
QgsComposerMap* composerMap = new QgsComposerMap( composition, leftMargin, titleLabel->rect().bottom() + titleLabel->pos().y(), mapWidthMM, mapHeightMM );
16441644
composerMap->setLayers( mCanvas->mapSettings().layers() );
16451645
composerMap->zoomToExtent( layerExtent );
1646-
composerMap->setMapCanvas( mCanvas );
16471646
composition->addItem( composerMap );
16481647

16491648
QgsComposerTextTableV2* parameterTable = nullptr;

0 commit comments

Comments
 (0)
Please sign in to comment.