2012-09-24 02:28:15 +02:00
|
|
|
class QgsSingleBandGrayRenderer: QgsRasterRenderer
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgssinglebandgrayrenderer.h"
|
|
|
|
%End
|
|
|
|
public:
|
2014-01-27 09:22:24 +01:00
|
|
|
enum Gradient
|
|
|
|
{
|
|
|
|
BlackToWhite,
|
|
|
|
WhiteToBlack
|
|
|
|
};
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
QgsSingleBandGrayRenderer( QgsRasterDataProvider* provider, int grayBand );
|
|
|
|
~QgsSingleBandGrayRenderer();
|
2014-01-27 09:22:24 +01:00
|
|
|
QgsRasterInterface * clone() const /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2012-09-26 18:46:52 +02:00
|
|
|
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider ) /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height ) / Factory /;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
int grayBand() const;
|
|
|
|
void setGrayBand( int band );
|
|
|
|
const QgsContrastEnhancement* contrastEnhancement() const;
|
|
|
|
/**Takes ownership*/
|
2012-09-26 18:46:52 +02:00
|
|
|
void setContrastEnhancement( QgsContrastEnhancement* ce /Transfer/ );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
void setGradient( Gradient theGradient );
|
|
|
|
Gradient gradient() const;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
|
|
|
|
|
|
|
|
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
|
2014-01-27 09:22:24 +01:00
|
|
|
|
|
|
|
QList<int> usesBands() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|