QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
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...
 
void moveToThread (QThread *thread)
 Moves the pipe to another thread. 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 167 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 295 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 354 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 247 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 256 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 424 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 300 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 97 of file qgsrasterpipe.cpp.

◆ last()

QgsRasterInterface * QgsRasterPipe::last ( ) const
inline

Returns last interface in the pipe.

Definition at line 172 of file qgsrasterpipe.h.

◆ moveToThread()

void QgsRasterPipe::moveToThread ( QThread *  thread)

Moves the pipe to another thread.

This effects all QObject derived interfaces in the pipe, and follows the same behavior as QObject::moveToThread. Specifically, it is permitted to PUSH the pipe from the current thread to another thread, but NOT to PULL a pipe from another thread over to the current thread. Pulling is only supported by first pushsing the pipe from its current thread to a nullptr thread, and then later pulling to the current thread. See QObject documentation for more details.

Since
QGIS 3.30

Definition at line 66 of file qgsrasterpipe.cpp.

◆ nuller()

QgsRasterNuller * QgsRasterPipe::nuller ( ) const

Returns the raster nuller interface, or nullptr if no raster nuller is present in the pipe.

Definition at line 310 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 305 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 457 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 280 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 315 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 347 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 285 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 127 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 290 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 240 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 208 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 267 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 376 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 403 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 162 of file qgsrasterpipe.h.


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