QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsRasterPipe Class Reference

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 ()
 
QgsRasterInterfaceat (int idx) const
 Returns the interface at the specified index. More...
 
QgsBrightnessContrastFilterbrightnessFilter () 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...
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the pipe's property collection, used for data defined overrides. More...
 
const QgsPropertyCollectiondataDefinedProperties () 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...
 
QgsHueSaturationFilterhueSaturationFilter () 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...
 
QgsRasterInterfacelast () const
 Returns last interface in the pipe. More...
 
QgsRasterNullernuller () const
 Returns the raster nuller interface, or nullptr if no raster nuller is present in the pipe. More...
 
QgsRasterPipeoperator= (const QgsRasterPipe &rh)=delete
 
QgsRasterProjectorprojector () const
 Returns the projector interface, or nullptr if no projector is present in the pipe. More...
 
QgsRasterDataProviderprovider () 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...
 
QgsRasterRendererrenderer () 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...
 
QgsRasterResampleFilterresampleFilter () 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...
 

Detailed Description

Contains a pipeline of raster interfaces for sequential raster processing.

Definition at line 49 of file qgsrasterpipe.h.

Member Enumeration Documentation

◆ Property

Data definable properties.

Since
QGIS 3.22
Enumerator
RendererOpacity 

Raster renderer global opacity.

Definition at line 57 of file qgsrasterpipe.h.

Constructor & Destructor Documentation

◆ QgsRasterPipe() [1/2]

QgsRasterPipe::QgsRasterPipe ( )
default

Constructor for an empty QgsRasterPipe.

◆ QgsRasterPipe() [2/2]

QgsRasterPipe::QgsRasterPipe ( const QgsRasterPipe pipe)

Copy constructor.

Definition at line 34 of file qgsrasterpipe.cpp.

◆ ~QgsRasterPipe()

QgsRasterPipe::~QgsRasterPipe ( )

Definition at line 57 of file qgsrasterpipe.cpp.

Member Function Documentation

◆ at()

QgsRasterInterface* QgsRasterPipe::at ( int  idx) const
inline

Returns the interface at the specified index.

Definition at line 152 of file qgsrasterpipe.h.

◆ brightnessFilter()

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.

◆ canSetOn()

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.

◆ dataDefinedProperties() [1/2]

QgsPropertyCollection& QgsRasterPipe::dataDefinedProperties ( )
inline

Returns a reference to the pipe's property collection, used for data defined overrides.

See also
setDataDefinedProperties()
Since
QGIS 3.22

Definition at line 232 of file qgsrasterpipe.h.

◆ dataDefinedProperties() [2/2]

const QgsPropertyCollection& QgsRasterPipe::dataDefinedProperties ( ) const
inline

Returns a reference to the pipe's property collection, used for data defined overrides.

See also
setDataDefinedProperties()
Property
Note
not available in Python bindings
Since
QGIS 3.22

Definition at line 241 of file qgsrasterpipe.h.

◆ evaluateDataDefinedProperties()

void QgsRasterPipe::evaluateDataDefinedProperties ( QgsExpressionContext context)

Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place.

Since
QGIS 3.22

Definition at line 411 of file qgsrasterpipe.cpp.

◆ hueSaturationFilter()

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.

◆ insert()

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.

See also
set()
replace()

Definition at line 84 of file qgsrasterpipe.cpp.

◆ last()

QgsRasterInterface* QgsRasterPipe::last ( ) const
inline

Returns last interface in the pipe.

Definition at line 157 of file qgsrasterpipe.h.

◆ nuller()

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.

◆ operator=()

QgsRasterPipe& QgsRasterPipe::operator= ( const QgsRasterPipe rh)
delete

◆ projector()

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.

◆ propertyDefinitions()

QgsPropertiesDefinition QgsRasterPipe::propertyDefinitions ( )
static

Returns the definitions for data defined properties available for use in raster pipes.

Since
QGIS 3.22

Definition at line 444 of file qgsrasterpipe.cpp.

◆ provider()

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.

◆ remove() [1/2]

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.

◆ remove() [2/2]

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.

◆ renderer()

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.

◆ replace()

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.

See also
insert()
set()

Definition at line 114 of file qgsrasterpipe.cpp.

◆ resampleFilter()

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.

◆ resamplingStage()

Qgis::RasterResamplingStage QgsRasterPipe::resamplingStage ( ) const
inline

Returns which stage of the pipe should apply resampling.

See also
setResamplingStage()
Since
QGIS 3.16

Definition at line 225 of file qgsrasterpipe.h.

◆ set()

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.

See also
insert()
replace()

Definition at line 195 of file qgsrasterpipe.cpp.

◆ setDataDefinedProperties()

void QgsRasterPipe::setDataDefinedProperties ( const QgsPropertyCollection collection)
inline

Sets the pipe's property collection, used for data defined overrides.

Any existing properties will be discarded.

See also
dataDefinedProperties()
Property
Since
QGIS 3.22

Definition at line 252 of file qgsrasterpipe.h.

◆ setOn()

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.

◆ setResamplingStage()

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().

See also
resamplingStage()
Since
QGIS 3.16

Definition at line 390 of file qgsrasterpipe.cpp.

◆ size()

int QgsRasterPipe::size ( ) const
inline

Returns the size of the pipe (the number of interfaces contained in the pipe).

Definition at line 147 of file qgsrasterpipe.h.


The documentation for this class was generated from the following files: