QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
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. | |
QgsRasterPipe (const QgsRasterPipe &pipe) | |
Copy constructor. | |
~QgsRasterPipe () | |
QgsRasterInterface * | at (int idx) const |
Returns the interface at the specified index. | |
QgsBrightnessContrastFilter * | brightnessFilter () 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. | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the pipe's property collection, used for data defined overrides. | |
const QgsPropertyCollection & | dataDefinedProperties () 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. | |
QgsHueSaturationFilter * | hueSaturationFilter () 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. | |
QgsRasterInterface * | last () const |
Returns last interface in the pipe. | |
void | moveToThread (QThread *thread) |
Moves the pipe to another thread. | |
QgsRasterNuller * | nuller () const |
Returns the raster nuller interface, or nullptr if no raster nuller is present in the pipe. | |
QgsRasterPipe & | operator= (const QgsRasterPipe &rh)=delete |
QgsRasterProjector * | projector () const |
Returns the projector interface, or nullptr if no projector is present in the pipe. | |
QgsRasterDataProvider * | provider () 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). | |
QgsRasterRenderer * | renderer () 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. | |
QgsRasterResampleFilter * | resampleFilter () 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. | |
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 167 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 295 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 354 of file qgsrasterpipe.cpp.
|
inline |
Returns a reference to the pipe's property collection, used for data defined overrides.
Definition at line 247 of file qgsrasterpipe.h.
|
inline |
Returns a reference to the pipe's property collection, used for data defined overrides.
Definition at line 256 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 424 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 300 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 97 of file qgsrasterpipe.cpp.
|
inline |
Returns last interface in the pipe.
Definition at line 172 of file qgsrasterpipe.h.
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.
Definition at line 66 of file qgsrasterpipe.cpp.
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.
|
delete |
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.
|
static |
Returns the definitions for data defined properties available for use in raster pipes.
Definition at line 457 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 280 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 315 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 347 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 285 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 127 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 290 of file qgsrasterpipe.cpp.
|
inline |
Returns which stage of the pipe should apply resampling.
Definition at line 240 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 208 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 267 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 376 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 403 of file qgsrasterpipe.cpp.
|
inline |
Returns the size of the pipe (the number of interfaces contained in the pipe).
Definition at line 162 of file qgsrasterpipe.h.