QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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 class  Property : int { RendererOpacity }
 Data definable properties. More...
 

Public Member Functions

 QgsRasterPipe ()=default
 Constructor for an empty QgsRasterPipe.
 
 QgsRasterPipe (const QgsRasterPipe &pipe)
 
 ~QgsRasterPipe ()
 
QgsRasterInterfaceat (int idx) const
 Returns the interface at the specified index.
 
QgsBrightnessContrastFilterbrightnessFilter () const
 Returns the brightness filter interface, or nullptr if no brightness filter is present in the pipe.
 
bool canSetOn (int idx, bool on)
 Returns true if the interface at the specified index may be switched on or off.
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the pipe's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the pipe's property collection, used for data defined overrides.
 
void evaluateDataDefinedProperties (QgsExpressionContext &context)
 Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place.
 
QgsHueSaturationFilterhueSaturationFilter () const
 Returns the hue/saturation interface, or nullptr if no hue/saturation filter is present in the pipe.
 
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.
 
QgsRasterInterfacelast () const
 Returns last interface in the pipe.
 
void moveToThread (QThread *thread)
 Moves the pipe to another thread.
 
QgsRasterNullernuller () const
 Returns the raster nuller interface, or nullptr if no raster nuller is present in the pipe.
 
QgsRasterPipeoperator= (const QgsRasterPipe &rh)=delete
 
QgsRasterProjectorprojector () const
 Returns the projector interface, or nullptr if no projector is present in the pipe.
 
QgsRasterDataProviderprovider () const
 Returns the data provider interface, or nullptr if no data provider is present in the pipe.
 
bool remove (int idx)
 Removes and deletes the interface at given index (if possible).
 
bool remove (QgsRasterInterface *interface)
 Removes and deletes interface from pipe (if possible).
 
QgsRasterRendererrenderer () const
 Returns the raster renderer interface, or nullptr if no raster renderer is present in the pipe.
 
bool replace (int idx, QgsRasterInterface *interface)
 Attempts to replace the interface at specified index and reconnect the pipe.
 
QgsRasterResampleFilterresampleFilter () const
 Returns the resample filter interface, or nullptr if no resample filter is present in the pipe.
 
Qgis::RasterResamplingStage resamplingStage () const
 Returns which stage of the pipe should apply resampling.
 
bool set (QgsRasterInterface *interface)
 Inserts a new known interface in default place or replace interface of the same role if it already exists.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the pipe's property collection, used for data defined overrides.
 
bool setOn (int idx, bool on)
 Set whether the interface at the specified index is enabled.
 
void setResamplingStage (Qgis::RasterResamplingStage stage)
 Sets which stage of the pipe should apply resampling.
 
int size () const
 Returns the size of the pipe (the number of interfaces contained in the pipe).
 

Static Public Member Functions

static QgsPropertiesDefinition propertyDefinitions ()
 Returns the definitions for data defined properties available for use in raster pipes.
 

Detailed Description

Contains a pipeline of raster interfaces for sequential raster processing.

Definition at line 49 of file qgsrasterpipe.h.

Member Enumeration Documentation

◆ Property

enum class QgsRasterPipe::Property : int
strong

Data definable properties.

Since
QGIS 3.22
Enumerator
RendererOpacity 

Raster renderer global opacity.

Definition at line 59 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)

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 292 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 351 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 421 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 297 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 307 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 302 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 454 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 277 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 312 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 344 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 282 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 287 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 205 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 373 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 400 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: