QGIS/python/core/auto_generated/raster/qgspalettedrasterrenderer.sip.in

171 lines
4.7 KiB
Plaintext
Raw Normal View History

2017-06-01 10:54:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgspalettedrasterrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPalettedRasterRenderer: QgsRasterRenderer
{
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Renderer for paletted raster images.
2017-06-01 10:54:33 +02:00
%End
%TypeHeaderCode
2017-06-01 10:54:33 +02:00
#include "qgspalettedrasterrenderer.h"
%End
public:
struct Class
{
Class( int value, const QColor &color = QColor(), const QString &label = QString() );
2017-06-01 10:54:33 +02:00
%Docstring
Constructor for Class
%End
int value;
2017-06-01 10:54:33 +02:00
QColor color;
QString label;
};
typedef QList< QgsPalettedRasterRenderer::Class > ClassData;
QgsPalettedRasterRenderer( QgsRasterInterface *input, int bandNumber, const ClassData &classes );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsPalettedRasterRenderer.
2017-06-01 10:54:33 +02:00
%End
virtual QgsPalettedRasterRenderer *clone() const /Factory/;
2017-06-01 10:54:33 +02:00
%Docstring
QgsPalettedRasterRenderer cannot be copied. Use clone() instead.
%End
static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/;
2017-06-01 10:54:33 +02:00
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/;
int nColors() const;
2017-06-01 10:54:33 +02:00
%Docstring
Returns number of colors
%End
ClassData classes() const;
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a map of value to classes (colors) used by the renderer.
2017-06-01 10:54:33 +02:00
%End
2014-01-27 09:22:24 +01:00
QString label( int idx ) const;
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Return optional category label
2017-06-01 10:54:33 +02:00
.. versionadded:: 2.1
%End
void setLabel( int idx, const QString &label );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set category label
2017-06-01 10:54:33 +02:00
.. versionadded:: 2.1
%End
int band() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the raster band used for rendering the raster.
.. versionadded:: 3.0
%End
2017-06-01 10:54:33 +02:00
virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;
2014-01-27 09:22:24 +01:00
2017-06-01 10:54:33 +02:00
virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const;
virtual QList<int> usesBands() const;
void setSourceColorRamp( QgsColorRamp *ramp /Transfer/ );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the source color ``ramp``. Ownership is transferred to the renderer.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`sourceColorRamp`
2017-06-01 10:54:33 +02:00
%End
QgsColorRamp *sourceColorRamp() const;
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Get the source color ramp
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSourceColorRamp`
2017-06-01 10:54:33 +02:00
%End
static QgsPalettedRasterRenderer::ClassData colorTableToClassData( const QList<QgsColorRampShader::ColorRampItem> &table );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Converts a raster color ``table`` to paletted renderer class data.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
%End
static QgsPalettedRasterRenderer::ClassData classDataFromString( const QString &string );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Converts a ``string`` containing a color table or class data to to paletted renderer class data.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`classDataFromFile`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`classDataToString`
2017-06-01 10:54:33 +02:00
%End
static QgsPalettedRasterRenderer::ClassData classDataFromFile( const QString &path );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Opens a color table file and returns corresponding paletted renderer class data.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`classDataFromString`
2017-06-01 10:54:33 +02:00
%End
static QString classDataToString( const QgsPalettedRasterRenderer::ClassData &classes );
2017-06-01 10:54:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Converts classes to a string representation, using the .clr/gdal color table file format.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`classDataFromString`
2017-06-01 10:54:33 +02:00
%End
2017-06-01 10:54:33 +02:00
static QgsPalettedRasterRenderer::ClassData classDataFromRaster( QgsRasterInterface *raster, int bandNumber, QgsColorRamp *ramp = 0,
QgsRasterBlockFeedback *feedback = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Generates class data from a ``raster``, for the specified ``bandNumber``. An optional
color ``ramp`` can be specified to automatically assign colors from the ramp.
2017-06-01 10:54:33 +02:00
.. versionadded:: 3.0
%End
2017-06-01 10:54:33 +02:00
private:
QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer & );
const QgsPalettedRasterRenderer &operator=( const QgsPalettedRasterRenderer & );
};
2017-06-01 10:54:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgspalettedrasterrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/