Skip to content

Commit

Permalink
Deprecated several map canvas signals related to rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Nov 11, 2013
1 parent 106b2cc commit 61c48be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
9 changes: 0 additions & 9 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -433,8 +433,6 @@ void QgsMapCanvas::refresh()
// Tell the user we're going to be a while
QApplication::setOverrideCursor( Qt::WaitCursor );
emit renderStarting();
mMap->render();
mDirty = false;
Expand All @@ -445,19 +443,12 @@ void QgsMapCanvas::refresh()
emit renderComplete( &p );
p.end();
// notifies current map tool
if ( mMapTool )
mMapTool->renderComplete();
// Tell the user we've finished going to be a while
QApplication::restoreOverrideCursor();
}
mDrawing = false;
// Done refreshing
emit mapCanvasRefreshed();
if ( logRefresh )
{
QString logMsg = tr( "Canvas refresh: %1 ms" ).arg( t.elapsed() );
Expand Down
13 changes: 9 additions & 4 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -333,7 +333,8 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView

signals:
/** Let the owner know how far we are with render operations */
void setProgress( int, int );
//! @deprecated since 2.1 - already unused in 2.0 anyway
Q_DECL_DEPRECATED void setProgress( int, int );

/** emits current mouse position
\note changed in 1.3 */
Expand All @@ -353,15 +354,19 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
being rendered onto a pixmap other than the mapCanvas own pixmap member.
*/
void renderComplete( QPainter * );
//! @deprecated since 2.1 - anything related to rendering progress is not visible outside of map canvas
//! - additional drawing shall be done directly within the renderer job or independently as a map canvas item
Q_DECL_DEPRECATED void renderComplete( QPainter * );

/** Emitted when canvas finished a refresh request.
\note Added in 2.0 */
void mapCanvasRefreshed();
//! @deprecated since 2.1 - anything related to rendering progress is not visible outside of map canvas
Q_DECL_DEPRECATED void mapCanvasRefreshed();

/** Emitted when the canvas is about to be rendered.
\note Added in 1.5 */
void renderStarting();
//! @deprecated since 2.1 - anything related to rendering progress is not visible outside of map canvas
Q_DECL_DEPRECATED void renderStarting();

//! Emitted when a new set of layers has been received
void layersChanged();
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/grass/qgsgrassregion.cpp
Expand Up @@ -258,8 +258,6 @@ QgsGrassRegion::QgsGrassRegion( QgsGrassPlugin *plugin, QgisInterface *iface,

refreshGui();

connect( mCanvas, SIGNAL( renderComplete( QPainter * ) ), this, SLOT( postRender( QPainter * ) ) );

// Connect entries
connect( mNorth, SIGNAL( editingFinished() ), this, SLOT( northChanged() ) );
connect( mSouth, SIGNAL( editingFinished() ), this, SLOT( southChanged() ) );
Expand Down

0 comments on commit 61c48be

Please sign in to comment.