QGIS/python/core/auto_generated/raster/qgsrasterpipe.sip.in
Nyall Dawson 8c9d008413 Spelling
2021-06-25 13:53:52 +10:00

244 lines
6.4 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterpipe.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRasterPipe
{
%Docstring(signature="appended")
Contains a pipeline of raster interfaces for sequential raster processing.
%End
%TypeHeaderCode
#include "qgsrasterpipe.h"
%End
public:
enum Property
{
RendererOpacity,
};
QgsRasterPipe();
%Docstring
Constructor for an empty QgsRasterPipe.
%End
~QgsRasterPipe();
bool insert( int idx, QgsRasterInterface *interface /Transfer/ );
%Docstring
Attempts to insert interface at specified index and connect
if connection would fail, the interface is not inserted and ``False`` is returned
.. seealso:: :py:func:`set`
.. seealso:: :py:func:`replace`
%End
%MethodCode
sipRes = sipCpp->insert( a0, a1 );
if ( !sipRes )
{
// if insertion failed transfer ownership back to python
PyObject *o = sipGetPyObject( a1, sipType_QgsRasterInterface );
if ( o )
sipTransferTo( o, NULL );
}
%End
bool replace( int idx, QgsRasterInterface *interface /Transfer/ );
%Docstring
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.
.. seealso:: :py:func:`insert`
.. seealso:: :py:func:`set`
%End
bool set( QgsRasterInterface *interface /Transfer/ );
%Docstring
Inserts a new known interface in default place or replace interface of the same
role if it already exists.
Known interfaces are:
- :py:class:`QgsRasterDataProvider`,
- :py:class:`QgsRasterRenderer`
- :py:class:`QgsRasterResampleFilter`
- :py:class:`QgsRasterProjector`
- :py:class:`QgsHueSaturationFilter`
- :py:class:`QgsBrightnessContrastFilter`
(and their subclasses).
For other interfaces the position of the interface in the pipe must be explicitly
specified using the :py:func:`~QgsRasterPipe.insert` method.
.. seealso:: :py:func:`insert`
.. seealso:: :py:func:`replace`
%End
bool remove( int idx );
%Docstring
Removes and deletes the interface at given index (if possible).
Returns ``True`` if the interface was successfully removed.
%End
bool remove( QgsRasterInterface *interface );
%Docstring
Removes and deletes interface from pipe (if possible).
Returns ``True`` if the interface was successfully removed.
%End
int size() const;
%Docstring
Returns the size of the pipe (the number of interfaces contained in the pipe).
%End
QgsRasterInterface *at( int idx ) const;
%Docstring
Returns the interface at the specified index.
%End
QgsRasterInterface *last() const;
%Docstring
Returns last interface in the pipe.
%End
bool setOn( int idx, bool on );
%Docstring
Set whether the interface at the specified index is enabled.
Returns ``True`` on success.
%End
bool canSetOn( int idx, bool on );
%Docstring
Returns ``True`` if the interface at the specified index may be switched on or off.
%End
QgsRasterDataProvider *provider() const;
%Docstring
Returns the data provider interface, or ``None`` if no data provider is present in the pipe.
%End
QgsRasterRenderer *renderer() const;
%Docstring
Returns the raster renderer interface, or ``None`` if no raster renderer is present in the pipe.
%End
QgsRasterResampleFilter *resampleFilter() const;
%Docstring
Returns the resample filter interface, or ``None`` if no resample filter is present in the pipe.
%End
QgsBrightnessContrastFilter *brightnessFilter() const;
%Docstring
Returns the brightness filter interface, or ``None`` if no brightness filter is present in the pipe.
%End
QgsHueSaturationFilter *hueSaturationFilter() const;
%Docstring
Returns the hue/saturation interface, or ``None`` if no hue/saturation filter is present in the pipe.
%End
QgsRasterProjector *projector() const;
%Docstring
Returns the projector interface, or ``None`` if no projector is present in the pipe.
%End
QgsRasterNuller *nuller() const;
%Docstring
Returns the raster nuller interface, or ``None`` if no raster nuller is present in the pipe.
%End
void setResamplingStage( Qgis::RasterResamplingStage stage );
%Docstring
Sets which stage of the pipe should apply resampling.
Provider resampling is only supported if provider sets
ProviderHintCanPerformProviderResampling in :py:func:`~QgsRasterPipe.providerCapabilities`.
.. seealso:: :py:func:`resamplingStage`
.. versionadded:: 3.16
%End
Qgis::RasterResamplingStage resamplingStage() const;
%Docstring
Returns which stage of the pipe should apply resampling
.. seealso:: :py:func:`setResamplingStage`
.. versionadded:: 3.16
%End
QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the pipe's property collection, used for data defined overrides.
.. seealso:: :py:func:`setDataDefinedProperties`
.. versionadded:: 3.22
%End
void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the pipe's property ``collection``, used for data defined overrides.
Any existing properties will be discarded.
.. seealso:: :py:func:`dataDefinedProperties`
.. seealso:: Property
.. versionadded:: 3.22
%End
void evaluateDataDefinedProperties( QgsExpressionContext &context );
%Docstring
Evaluates any data defined properties set on the pipe, applying their results
to the corresponding interfaces in place.
.. versionadded:: 3.22
%End
static QgsPropertiesDefinition propertyDefinitions();
%Docstring
Returns the definitions for data defined properties available for use in raster pipes.
.. versionadded:: 3.22
%End
private:
QgsRasterPipe( const QgsRasterPipe &pipe );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterpipe.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/