mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added method saveAsImage(QString) which will save the current map view to the filename given
git-svn-id: http://svn.osgeo.org/qgis/trunk@932 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
1003fcf1e4
commit
ff33534a90
@ -312,7 +312,10 @@ void QgsMapCanvas::render()
|
||||
paint->end();
|
||||
*/
|
||||
}
|
||||
|
||||
void QgsMapCanvas::saveAsImage(QString theFileName)
|
||||
{
|
||||
pmCanvas->save(theFileName,"PNG");
|
||||
}
|
||||
void QgsMapCanvas::paintEvent(QPaintEvent * ev)
|
||||
{
|
||||
if (!dirty)
|
||||
|
@ -105,8 +105,10 @@ class QgsMapCanvas:public QWidget
|
||||
friend class QgsLegend;
|
||||
public slots:
|
||||
/**Sets dirty=true and calls render2()*/
|
||||
void refresh();
|
||||
void refresh();
|
||||
void render2();
|
||||
//! Save the convtents of the map canvas to disk as an image
|
||||
void saveAsImage(QString theFileName);
|
||||
//! This slot is connected to the visibility change of one or more layers
|
||||
void layerStateChange();
|
||||
//! sets z order based on order of layers in the legend
|
||||
|
Loading…
x
Reference in New Issue
Block a user