QGIS/python/core/raster/qgsrasterrenderer.sip
Nyall Dawson c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00

54 lines
1.6 KiB
Plaintext

class QgsRasterRenderer : QgsRasterInterface
{
%TypeHeaderCode
#include "qgsrasterrenderer.h"
%End
public:
QgsRasterRenderer( QgsRasterInterface* input = 0, const QString& type = "" );
virtual ~QgsRasterRenderer();
virtual QgsRasterInterface * clone() const = 0 /Factory/;
virtual int bandCount() const;
virtual QGis::DataType dataType( int bandNo ) const;
virtual QString type() const;
virtual bool setInput( QgsRasterInterface* input );
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height ) = 0 / Factory /;
bool usesTransparency() const;
void setOpacity( double opacity );
double opacity() const;
void setRasterTransparency( QgsRasterTransparency* t /Transfer/);
const QgsRasterTransparency* rasterTransparency() const;
void setAlphaBand( int band );
int alphaBand() const;
/** Get symbology items if provided by renderer*/
virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
/** Sets base class members from xml. Usually called from create() methods of subclasses*/
void readXML( const QDomElement& rendererElem );
/** Returns a list of band numbers used by the renderer*/
virtual QList<int> usesBands() const;
static QString minMaxOriginName( int theOrigin );
static QString minMaxOriginLabel( int theOrigin );
static int minMaxOriginFromName( const QString& theName );
protected:
/** Write upper class info into rasterrenderer element (called by writeXML method of subclasses)*/
void _writeXML( QDomDocument& doc, QDomElement& rasterRendererElem ) const;
};