Skip to content

Commit

Permalink
fix deprecation annotation of QgsMapRenderer::mapRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 15, 2014
1 parent fa157b0 commit 8242a04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions python/gui/qgsmapcanvas.sip
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ class QgsMapCanvas : QGraphicsView

void setCurrentLayer( QgsMapLayer* layer );

// ### QGIS 3: make QgsMapCanvas independent from overview
void updateOverview();

// ### QGIS 3: make QgsMapCanvas independent from overview
void enableOverviewMode( QgsMapOverviewCanvas* overview );

//! Get access to properties used for map rendering
Expand Down Expand Up @@ -101,19 +103,21 @@ class QgsMapCanvas : QGraphicsView
//! @deprecated since 2.4 - there could be more than just one "map" items
QgsMapCanvasMap* map();

//! @deprecated since 2.4 - use mapRendererSettings() for anything related to current renderer settings
//! @deprecated since 2.4 - use mapSettings() for anything related to current renderer settings
//// SIP: removed /Transfer/ because it crashes after few calls to iface.mapCanvas().mapRenderer().hasCrsTransformEnabled()
//// and in fact there is no transfer of ownership from c++ to python!
//// Actually the problem comes from the fact that "hasCrsTransformEnabled" is both a signal and a normal method
//// /KeepReference/ is necessary because otherwise mapRenderer().hasCrsTransformEnabled() was crashing
QgsMapRenderer* mapRenderer() /Deprecated, KeepReference/;

//! Accessor for the canvas paint device
//! @deprecated since 2.4
QPaintDevice &canvasPaintDevice() /Deprecated/;

//! Get the last reported scale of the canvas
double scale();

//! Clear the map canvas
//! @deprecated since 2.4 - use refresh() - clear does the same thing
void clear() /Deprecated/;

Expand Down Expand Up @@ -174,6 +178,7 @@ class QgsMapCanvas : QGraphicsView
/** Emits signal scaleChanged to update scale in main window */
void updateScale();

/** Updates the full extent */
//! @deprecated since v2.4 - does nothing
void updateFullExtent() /Deprecated/;

Expand All @@ -196,9 +201,11 @@ class QgsMapCanvas : QGraphicsView
/*! Accessor for frozen status of canvas */
bool isFrozen();

//! Flag the canvas as dirty and needed a refresh
//! @deprecated since 2.4 - use refresh() to trigger a refresh (clients should not decide explicitly whether canvas is dirty or not)
void setDirty( bool _dirty ) /Deprecated/;

//! Return the state of the canvas (dirty or not)
//! @deprecated since 2.4 - dirty flag is not kept anymore - always returns false
bool isDirty() const /Deprecated/;

Expand All @@ -211,7 +218,7 @@ class QgsMapCanvas : QGraphicsView
//! Get the current coordinate transform
const QgsMapToPixel* getCoordinateTransform();

//! true if canvas currently drawing
//! Find out whether rendering is in progress
bool isDrawing();

//! returns current layer (set by legend widget)
Expand Down Expand Up @@ -242,6 +249,7 @@ class QgsMapCanvas : QGraphicsView
//! true if antialising is enabled
bool antiAliasingEnabled() const;

//! Select which Qt class to render with
//! @deprecated since 2.4 - does nothing because now we always render to QImage
void useImageToRender( bool theFlag ) /Deprecated/;

Expand Down Expand Up @@ -347,6 +355,7 @@ class QgsMapCanvas : QGraphicsView
//! Emit map tool changed event
void mapToolSet( QgsMapTool *tool );

// ### QGIS 3: remove the signal
//! Emitted when selection in any layer gets changed
void selectionChanged( QgsMapLayer * layer );

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
//! @deprecated since 2.4 - there could be more than just one "map" items
QgsMapCanvasMap* map();

//! @deprecated since 2.4 - use mapRendererSettings() for anything related to current renderer settings
//! @deprecated since 2.4 - use mapSettings() for anything related to current renderer settings
Q_DECL_DEPRECATED QgsMapRenderer* mapRenderer();

//! Accessor for the canvas paint device
Expand Down

0 comments on commit 8242a04

Please sign in to comment.