Canvas now emits renderComplete signal when rendering of cnavas has completed, but before the screen is refreshed. Added accessor and mutators for the canvas pixmap.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1306 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2004-05-05 08:49:59 +00:00
parent 47dfc1134d
commit bac7056bb1
2 changed files with 12 additions and 0 deletions

View File

@ -248,6 +248,12 @@ void QgsMapCanvas::render2(QPaintDevice * theQPaintDevice)
}
dirty = false;
// notify any listeners that rendering is complete
//note that pmCanvas is not draw to gui yet
emit renderComplete();
repaint();
}
}

View File

@ -48,6 +48,10 @@ Q_OBJECT public:
QgsMapCanvas(QWidget * parent = 0, const char *name = 0);
//! Destructor
~QgsMapCanvas();
//! Accessor for the cnavas pixmap
QPixmap * canvasPixmap() { return pmCanvas; } ;
//! Mutator for the canvas pixmap
void setCanvasPixmap(QPixmap * theQPixmap) { pmCanvas=theQPixmap; } ;
//! Set the legend control to be used with this canvas
void setLegend(QgsLegend *legend);
//! Get a pointer to the legend control used with this canvas
@ -129,6 +133,8 @@ signals:
void scaleChanged(QString);
//! Emitted when the extents of the map change
void extentsChanged(QString);
//! Emitted when the canvas has rendered
void renderComplete();
private:
//! Overridden mouse move event
void mouseMoveEvent(QMouseEvent * e);