mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
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:
parent
47dfc1134d
commit
bac7056bb1
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user