2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterrenderer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-06 12:49:24 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
class QgsRasterRenderer : QgsRasterInterface
|
|
|
|
{
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Raster renderer pipe that applies colors to a raster.
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2014-10-22 17:29:14 +07:00
|
|
|
#include "qgsrasterrenderer.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
static const QRgb NODATA_COLOR;
|
|
|
|
|
2017-09-25 14:20:39 +10:00
|
|
|
QgsRasterRenderer( QgsRasterInterface *input = 0, const QString &type = QString() );
|
2017-09-25 15:16:05 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsRasterRenderer.
|
2017-09-25 15:16:05 +10:00
|
|
|
%End
|
2017-12-15 08:57:22 +10:00
|
|
|
~QgsRasterRenderer();
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
virtual QgsRasterRenderer *clone() const = 0 /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
QgsRasterRenderer cannot be copied. Use clone() instead.
|
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int bandCount() const;
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2016-07-21 22:01:38 +10:00
|
|
|
virtual Qgis::DataType dataType( int bandNo ) const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QString type() const;
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual bool setInput( QgsRasterInterface *input );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
|
|
|
virtual QgsRasterBlock *block( int bandNo,
|
|
|
|
const QgsRectangle &extent,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
QgsRasterBlockFeedback *feedback = 0 ) = 0 /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
bool usesTransparency() const;
|
|
|
|
|
|
|
|
void setOpacity( double opacity );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``opacity`` for the renderer, where ``opacity`` is a value between 0 (totally transparent)
|
|
|
|
and 1.0 (fully opaque).
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`opacity`
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
double opacity() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent)
|
|
|
|
and 1.0 (fully opaque).
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setOpacity`
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
void setRasterTransparency( QgsRasterTransparency *t /Transfer/ );
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsRasterTransparency *rasterTransparency() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
void setAlphaBand( int band );
|
|
|
|
int alphaBand() const;
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets symbology items if provided by renderer
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void readXml( const QDomElement &rendererElem );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Sets base class members from xml. Usually called from create() methods of subclasses
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void copyCommonProperties( const QgsRasterRenderer *other, bool copyMinMaxOrigin = true );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Copies common properties like opacity / transparency data from other renderer.
|
|
|
|
Useful when cloning renderers.
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
2016-07-07 13:11:32 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QList<int> usesBands() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns a list of band numbers used by the renderer
|
|
|
|
%End
|
2012-10-06 11:22:52 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsRasterMinMaxOrigin &minMaxOrigin() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns const reference to origin of min/max values
|
|
|
|
%End
|
2016-12-15 01:31:05 +01:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setMinMaxOrigin( const QgsRasterMinMaxOrigin &origin );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Sets origin of min/max values
|
|
|
|
%End
|
2012-10-06 11:22:52 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void _writeXml( QDomDocument &doc, QDomElement &rasterRendererElem ) const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Write upper class info into rasterrenderer element (called by writeXml method of subclasses)
|
|
|
|
%End
|
|
|
|
|
2012-10-06 11:22:52 +02:00
|
|
|
|
2016-01-20 17:06:04 +11:00
|
|
|
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
QgsRasterRenderer( const QgsRasterRenderer & );
|
|
|
|
const QgsRasterRenderer &operator=( const QgsRasterRenderer & );
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-06-02 23:35:10 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterrenderer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|