QGIS API Documentation 3.41.0-Master (181b2f43d8e)
Loading...
Searching...
No Matches
qgsrastersinglecolorrenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrastersinglecolorrenderer.h
3 ---------------------------
4 begin : April 2024
5 copyright : (C) 2024 by Mathieu Pellerin
6 email : mathieu at opengis dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSRASTERSINGLECOLORRENDERER_H
19#define QGSRASTERSINGLECOLORRENDERER_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include "qgsrasterrenderer.h"
24
25#include <memory>
26
27class QDomElement;
28
35{
36 public:
37
39 QgsRasterSingleColorRenderer( QgsRasterInterface *input, int band, const QColor &color );
40
45
47 Qgis::RasterRendererFlags flags() const override;
48
50 static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) SIP_FACTORY;
51
52 QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override SIP_FACTORY;
53
58 QColor color() const;
59
64 void setColor( const QColor &color );
65
66 void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
67
68 int inputBand() const override;
69 bool setInputBand( int band ) override;
70 QList<int> usesBands() const override;
71
72 private:
73#ifdef SIP_RUN
76#endif
77
78 int mInputBand = -1;
79 QColor mColor;
80};
81
82#endif // QGSRASTERSINGLECOLORRENDERER_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
Feedback object tailored for raster block reading.
Raster data container.
Base class for processing filters like renderers, reprojector, resampler etc.
Raster renderer pipe that applies colors to a raster.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
Raster renderer which renders all data pixels using a single color.
const QgsRasterSingleColorRenderer & operator=(const QgsRasterSingleColorRenderer &)=delete
QgsRasterSingleColorRenderer cannot be copied. Use clone() instead.
QgsRasterSingleColorRenderer(const QgsRasterSingleColorRenderer &)=delete
QgsRasterSingleColorRenderer cannot be copied. Use clone() instead.
A rectangle specified with double values.
#define SIP_FACTORY
Definition qgis_sip.h:76