Skip to content
Permalink
Browse files
Implement writeXML method for single band data renderer
  • Loading branch information
mhugent committed Mar 30, 2012
1 parent 19eb9de commit 6d593554e63bf759051bf52b0241cb3620ba9fcb
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/core/raster/qgssinglebandcolordatarenderer.cpp
@@ -17,6 +17,8 @@

#include "qgssinglebandcolordatarenderer.h"
#include "qgsrasterviewport.h"
#include <QDomDocument>
#include <QDomElement>
#include <QImage>

QgsSingleBandColorDataRenderer::QgsSingleBandColorDataRenderer( QgsRasterDataProvider* provider, int band ):
@@ -90,5 +92,13 @@ void QgsSingleBandColorDataRenderer::draw( QPainter* p, QgsRasterViewPort* viewP

void QgsSingleBandColorDataRenderer::writeXML( QDomDocument& doc, QDomElement& parentElem ) const
{
//soon...
if ( parentElem.isNull() )
{
return;
}

QDomElement rasterRendererElem = doc.createElement( "rasterrenderer" );
_writeXML( doc, rasterRendererElem );
rasterRendererElem.setAttribute( "band", mBand );
parentElem.appendChild( rasterRendererElem );
}

0 comments on commit 6d59355

Please sign in to comment.