mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[composer] Remove last link between composer maps and canvas
you WILL respect the separation between core and gui!!\!
This commit is contained in:
parent
4a0793d1a3
commit
ad184cdeed
@ -255,9 +255,6 @@ class QgsComposerMap : QgsComposerItem
|
|||||||
|
|
||||||
void updateItem();
|
void updateItem();
|
||||||
|
|
||||||
/** Sets canvas pointer (necessary to query and draw map canvas items)*/
|
|
||||||
void setMapCanvas( QGraphicsView* canvas /Transfer/ );
|
|
||||||
|
|
||||||
void setDrawAnnotations( bool draw );
|
void setDrawAnnotations( bool draw );
|
||||||
bool drawAnnotations() const;
|
bool drawAnnotations() const;
|
||||||
|
|
||||||
|
@ -3708,7 +3708,6 @@ void QgsComposer::addComposerMap( QgsComposerMap* map )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
map->setMapCanvas( mapCanvas() ); //set canvas to composer map to have the possibility to draw canvas items
|
|
||||||
QgsComposerMapWidget* mapWidget = new QgsComposerMapWidget( map );
|
QgsComposerMapWidget* mapWidget = new QgsComposerMapWidget( map );
|
||||||
connect( this, SIGNAL( zoomLevelChanged() ), map, SLOT( renderModeUpdateCachedImage() ) );
|
connect( this, SIGNAL( zoomLevelChanged() ), map, SLOT( renderModeUpdateCachedImage() ) );
|
||||||
mItemWidgetMap.insert( map, mapWidget );
|
mItemWidgetMap.insert( map, mapWidget );
|
||||||
|
@ -56,7 +56,6 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
|
|||||||
, mKeepLayerStyles( false )
|
, mKeepLayerStyles( false )
|
||||||
, mFollowVisibilityPreset( false )
|
, mFollowVisibilityPreset( false )
|
||||||
, mUpdatesEnabled( true )
|
, mUpdatesEnabled( true )
|
||||||
, mMapCanvas( nullptr )
|
|
||||||
, mDrawAnnotations( true )
|
, mDrawAnnotations( true )
|
||||||
, mAtlasDriven( false )
|
, mAtlasDriven( false )
|
||||||
, mAtlasScalingMode( Auto )
|
, mAtlasScalingMode( Auto )
|
||||||
@ -101,7 +100,6 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition )
|
|||||||
, mKeepLayerStyles( false )
|
, mKeepLayerStyles( false )
|
||||||
, mFollowVisibilityPreset( false )
|
, mFollowVisibilityPreset( false )
|
||||||
, mUpdatesEnabled( true )
|
, mUpdatesEnabled( true )
|
||||||
, mMapCanvas( nullptr )
|
|
||||||
, mDrawAnnotations( true )
|
, mDrawAnnotations( true )
|
||||||
, mAtlasDriven( false )
|
, mAtlasDriven( false )
|
||||||
, mAtlasScalingMode( Auto )
|
, mAtlasScalingMode( Auto )
|
||||||
|
@ -34,7 +34,6 @@ class QgsComposerMapGrid;
|
|||||||
class QgsMapToPixel;
|
class QgsMapToPixel;
|
||||||
class QDomNode;
|
class QDomNode;
|
||||||
class QDomDocument;
|
class QDomDocument;
|
||||||
class QGraphicsView;
|
|
||||||
class QPainter;
|
class QPainter;
|
||||||
class QgsFillSymbol;
|
class QgsFillSymbol;
|
||||||
class QgsLineSymbol;
|
class QgsLineSymbol;
|
||||||
@ -349,9 +348,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
|||||||
|
|
||||||
void updateItem() override;
|
void updateItem() override;
|
||||||
|
|
||||||
//! Sets canvas pointer (necessary to query and draw map canvas items)
|
|
||||||
void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether annotations are drawn within the composer map.
|
* Sets whether annotations are drawn within the composer map.
|
||||||
* @see drawAnnotations()
|
* @see drawAnnotations()
|
||||||
@ -578,7 +574,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
|||||||
|
|
||||||
//! Current bounding rectangle. This is used to check if notification to the graphics scene is necessary
|
//! Current bounding rectangle. This is used to check if notification to the graphics scene is necessary
|
||||||
QRectF mCurrentRectangle;
|
QRectF mCurrentRectangle;
|
||||||
QGraphicsView* mMapCanvas;
|
|
||||||
//! True if annotation items, rubber band, etc. from the main canvas should be displayed
|
//! True if annotation items, rubber band, etc. from the main canvas should be displayed
|
||||||
bool mDrawAnnotations;
|
bool mDrawAnnotations;
|
||||||
|
|
||||||
|
@ -1643,7 +1643,6 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
|
|||||||
QgsComposerMap* composerMap = new QgsComposerMap( composition, leftMargin, titleLabel->rect().bottom() + titleLabel->pos().y(), mapWidthMM, mapHeightMM );
|
QgsComposerMap* composerMap = new QgsComposerMap( composition, leftMargin, titleLabel->rect().bottom() + titleLabel->pos().y(), mapWidthMM, mapHeightMM );
|
||||||
composerMap->setLayers( mCanvas->mapSettings().layers() );
|
composerMap->setLayers( mCanvas->mapSettings().layers() );
|
||||||
composerMap->zoomToExtent( layerExtent );
|
composerMap->zoomToExtent( layerExtent );
|
||||||
composerMap->setMapCanvas( mCanvas );
|
|
||||||
composition->addItem( composerMap );
|
composition->addItem( composerMap );
|
||||||
|
|
||||||
QgsComposerTextTableV2* parameterTable = nullptr;
|
QgsComposerTextTableV2* parameterTable = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user