QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Contains a pipeline of raster interfaces for sequential raster processing. More...
#include <qgsrasterpipe.h>
Public Types | |
enum | Property { RendererOpacity } |
Data definable properties. More... | |
Public Member Functions | |
QgsRasterPipe ()=default | |
Constructor for an empty QgsRasterPipe. More... | |
QgsRasterPipe (const QgsRasterPipe &pipe) | |
Copy constructor. More... | |
~QgsRasterPipe () | |
QgsRasterInterface * | at (int idx) const |
Returns the interface at the specified index. More... | |
QgsBrightnessContrastFilter * | brightnessFilter () const |
Returns the brightness filter interface, or nullptr if no brightness filter is present in the pipe. More... | |
bool | canSetOn (int idx, bool on) |
Returns true if the interface at the specified index may be switched on or off. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the pipe's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the pipe's property collection, used for data defined overrides. More... | |
void | evaluateDataDefinedProperties (QgsExpressionContext &context) |
Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place. More... | |
QgsHueSaturationFilter * | hueSaturationFilter () const |
Returns the hue/saturation interface, or nullptr if no hue/saturation filter is present in the pipe. More... | |
bool | insert (int idx, QgsRasterInterface *interface) |
Attempts to insert interface at specified index and connect if connection would fail, the interface is not inserted and false is returned. More... | |
QgsRasterInterface * | last () const |
Returns last interface in the pipe. More... | |
QgsRasterNuller * | nuller () const |
Returns the raster nuller interface, or nullptr if no raster nuller is present in the pipe. More... | |
QgsRasterPipe & | operator= (const QgsRasterPipe &rh)=delete |
QgsRasterProjector * | projector () const |
Returns the projector interface, or nullptr if no projector is present in the pipe. More... | |
QgsRasterDataProvider * | provider () const |
Returns the data provider interface, or nullptr if no data provider is present in the pipe. More... | |
bool | remove (int idx) |
Removes and deletes the interface at given index (if possible). More... | |
bool | remove (QgsRasterInterface *interface) |
Removes and deletes interface from pipe (if possible). More... | |
QgsRasterRenderer * | renderer () const |
Returns the raster renderer interface, or nullptr if no raster renderer is present in the pipe. More... | |
bool | replace (int idx, QgsRasterInterface *interface) |
Attempts to replace the interface at specified index and reconnect the pipe. More... | |
QgsRasterResampleFilter * | resampleFilter () const |
Returns the resample filter interface, or nullptr if no resample filter is present in the pipe. More... | |
Qgis::RasterResamplingStage | resamplingStage () const |
Returns which stage of the pipe should apply resampling. More... | |
bool | set (QgsRasterInterface *interface) |
Inserts a new known interface in default place or replace interface of the same role if it already exists. More... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the pipe's property collection, used for data defined overrides. More... | |
bool | setOn (int idx, bool on) |
Set whether the interface at the specified index is enabled. More... | |
void | setResamplingStage (Qgis::RasterResamplingStage stage) |
Sets which stage of the pipe should apply resampling. More... | |
int | size () const |
Returns the size of the pipe (the number of interfaces contained in the pipe). More... | |
Static Public Member Functions | |
static QgsPropertiesDefinition | propertyDefinitions () |
Returns the definitions for data defined properties available for use in raster pipes. More... | |
Contains a pipeline of raster interfaces for sequential raster processing.
Definition at line 49 of file qgsrasterpipe.h.
Data definable properties.
Enumerator | |
---|---|
RendererOpacity | Raster renderer global opacity. |
Definition at line 57 of file qgsrasterpipe.h.
|
default |
Constructor for an empty QgsRasterPipe.
QgsRasterPipe::QgsRasterPipe | ( | const QgsRasterPipe & | pipe | ) |
Copy constructor.
Definition at line 34 of file qgsrasterpipe.cpp.
QgsRasterPipe::~QgsRasterPipe | ( | ) |
Definition at line 57 of file qgsrasterpipe.cpp.
|
inline |
Returns the interface at the specified index.
Definition at line 152 of file qgsrasterpipe.h.
QgsBrightnessContrastFilter * QgsRasterPipe::brightnessFilter | ( | ) | const |
Returns the brightness filter interface, or nullptr
if no brightness filter is present in the pipe.
Definition at line 282 of file qgsrasterpipe.cpp.
bool QgsRasterPipe::canSetOn | ( | int | idx, |
bool | on | ||
) |
Returns true
if the interface at the specified index may be switched on or off.
Definition at line 341 of file qgsrasterpipe.cpp.
|
inline |
Returns a reference to the pipe's property collection, used for data defined overrides.
Definition at line 232 of file qgsrasterpipe.h.
|
inline |
Returns a reference to the pipe's property collection, used for data defined overrides.
Definition at line 241 of file qgsrasterpipe.h.
void QgsRasterPipe::evaluateDataDefinedProperties | ( | QgsExpressionContext & | context | ) |
Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place.
Definition at line 411 of file qgsrasterpipe.cpp.
QgsHueSaturationFilter * QgsRasterPipe::hueSaturationFilter | ( | ) | const |
Returns the hue/saturation interface, or nullptr
if no hue/saturation filter is present in the pipe.
Definition at line 287 of file qgsrasterpipe.cpp.
bool QgsRasterPipe::insert | ( | int | idx, |
QgsRasterInterface * | interface | ||
) |
Attempts to insert interface at specified index and connect if connection would fail, the interface is not inserted and false
is returned.
Definition at line 84 of file qgsrasterpipe.cpp.
|
inline |
Returns last interface in the pipe.
Definition at line 157 of file qgsrasterpipe.h.
QgsRasterNuller * QgsRasterPipe::nuller | ( | ) | const |
Returns the raster nuller interface, or nullptr
if no raster nuller is present in the pipe.
Definition at line 297 of file qgsrasterpipe.cpp.
|
delete |
QgsRasterProjector * QgsRasterPipe::projector | ( | ) | const |
Returns the projector interface, or nullptr
if no projector is present in the pipe.
Definition at line 292 of file qgsrasterpipe.cpp.
|
static |
Returns the definitions for data defined properties available for use in raster pipes.
Definition at line 444 of file qgsrasterpipe.cpp.
QgsRasterDataProvider * QgsRasterPipe::provider | ( | ) | const |
Returns the data provider interface, or nullptr
if no data provider is present in the pipe.
Definition at line 267 of file qgsrasterpipe.cpp.
bool QgsRasterPipe::remove | ( | int | idx | ) |
Removes and deletes the interface at given index (if possible).
Returns true
if the interface was successfully removed.
Definition at line 302 of file qgsrasterpipe.cpp.
bool QgsRasterPipe::remove | ( | QgsRasterInterface * | interface | ) |
Removes and deletes interface from pipe (if possible).
Returns true
if the interface was successfully removed.
Definition at line 334 of file qgsrasterpipe.cpp.
QgsRasterRenderer * QgsRasterPipe::renderer | ( | ) | const |
Returns the raster renderer interface, or nullptr
if no raster renderer is present in the pipe.
Definition at line 272 of file qgsrasterpipe.cpp.
bool QgsRasterPipe::replace | ( | int | idx, |
QgsRasterInterface * | interface | ||
) |
Attempts to replace the interface at specified index and reconnect the pipe.
If the connection would fail, the interface is not inserted and false
is returned.
Definition at line 114 of file qgsrasterpipe.cpp.
QgsRasterResampleFilter * QgsRasterPipe::resampleFilter | ( | ) | const |
Returns the resample filter interface, or nullptr
if no resample filter is present in the pipe.
Definition at line 277 of file qgsrasterpipe.cpp.
|
inline |
Returns which stage of the pipe should apply resampling.
Definition at line 225 of file qgsrasterpipe.h.
bool QgsRasterPipe::set | ( | QgsRasterInterface * | interface | ) |
Inserts a new known interface in default place or replace interface of the same role if it already exists.
Known interfaces are:
(and their subclasses).
For other interfaces the position of the interface in the pipe must be explicitly specified using the insert() method.
Definition at line 195 of file qgsrasterpipe.cpp.
|
inline |
Sets the pipe's property collection, used for data defined overrides.
Any existing properties will be discarded.
Definition at line 252 of file qgsrasterpipe.h.
bool QgsRasterPipe::setOn | ( | int | idx, |
bool | on | ||
) |
Set whether the interface at the specified index is enabled.
Returns true
on success.
Definition at line 363 of file qgsrasterpipe.cpp.
void QgsRasterPipe::setResamplingStage | ( | Qgis::RasterResamplingStage | stage | ) |
Sets which stage of the pipe should apply resampling.
Provider resampling is only supported if provider sets ProviderHintCanPerformProviderResampling in providerCapabilities().
Definition at line 390 of file qgsrasterpipe.cpp.
|
inline |
Returns the size of the pipe (the number of interfaces contained in the pipe).
Definition at line 147 of file qgsrasterpipe.h.