QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsProcessingRasterLayerDefinition Class Reference

Encapsulates settings relating to a raster layer input to a processing algorithm. More...

#include <qgsprocessingparameters.h>

Public Member Functions

 QgsProcessingRasterLayerDefinition (const QgsProperty &source, const double referenceScale=0, const int dpi=96)
 Constructor for QgsProcessingRasterLayerDefinition, accepting a QgsProperty source.
 QgsProcessingRasterLayerDefinition (const QString &source=QString(), const double referenceScale=0, const int dpi=96)
 Constructor for QgsProcessingRasterLayerDefinition, accepting a static string source.
bool loadVariant (const QVariantMap &map)
 Loads this raster layer definition from a QVariantMap, wrapped in a QVariant.
 operator QVariant () const
 Allows direct construction of QVariants.
bool operator!= (const QgsProcessingRasterLayerDefinition &other) const
bool operator== (const QgsProcessingRasterLayerDefinition &other) const
QVariant toVariant () const
 Saves this raster layer definition to a QVariantMap, wrapped in a QVariant.

Public Attributes

int dpi = 96
 Indicates the resolution of the raster source (e.g., a WMS server).
double referenceScale = 0
 If set to a value > 0, sets a scale at which a raster (e.g., a WMS) should be requested or rendered.
QgsProperty source
 Source definition.

Detailed Description

Encapsulates settings relating to a raster layer input to a processing algorithm.

Since
QGIS 4.0

Definition at line 205 of file qgsprocessingparameters.h.

Constructor & Destructor Documentation

◆ QgsProcessingRasterLayerDefinition() [1/2]

QgsProcessingRasterLayerDefinition::QgsProcessingRasterLayerDefinition ( const QString & source = QString(),
const double referenceScale = 0,
const int dpi = 96 )
inline

Constructor for QgsProcessingRasterLayerDefinition, accepting a static string source.

The optional referenceScale can be set to a value > 0 to indicate the reference scale at which a raster layer should be requested or rendered. For instance, a WMS image.

The optional dpi argument can be used to specify the resolution a raster provider (e.g., a WMS server) is using to generate the raster.

Definition at line 218 of file qgsprocessingparameters.h.

◆ QgsProcessingRasterLayerDefinition() [2/2]

QgsProcessingRasterLayerDefinition::QgsProcessingRasterLayerDefinition ( const QgsProperty & source,
const double referenceScale = 0,
const int dpi = 96 )
inline

Constructor for QgsProcessingRasterLayerDefinition, accepting a QgsProperty source.

The optional referenceScale can be set to a value > 0 to indicate the reference scale at which a raster layer should be requested or rendered. For instance, a WMS image.

The optional dpi argument can be used to specify the resolution a raster provider (e.g., a WMS server) is using to generate the raster.

Definition at line 233 of file qgsprocessingparameters.h.

Member Function Documentation

◆ loadVariant()

bool QgsProcessingRasterLayerDefinition::loadVariant ( const QVariantMap & map)

Loads this raster layer definition from a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::readVariant to load it from an XML document.

See also
toVariant()

Definition at line 86 of file qgsprocessingparameters.cpp.

◆ operator QVariant()

QgsProcessingRasterLayerDefinition::operator QVariant ( ) const
inline

Allows direct construction of QVariants.

Definition at line 282 of file qgsprocessingparameters.h.

◆ operator!=()

bool QgsProcessingRasterLayerDefinition::operator!= ( const QgsProcessingRasterLayerDefinition & other) const
inline

Definition at line 276 of file qgsprocessingparameters.h.

◆ operator==()

bool QgsProcessingRasterLayerDefinition::operator== ( const QgsProcessingRasterLayerDefinition & other) const
inline

Definition at line 269 of file qgsprocessingparameters.h.

◆ toVariant()

QVariant QgsProcessingRasterLayerDefinition::toVariant ( ) const

Saves this raster layer definition to a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::writeVariant to save it to an XML document.

See also
loadVariant()

Definition at line 77 of file qgsprocessingparameters.cpp.

Member Data Documentation

◆ dpi

int QgsProcessingRasterLayerDefinition::dpi = 96

Indicates the resolution of the raster source (e.g., a WMS server).

By default 96 DPI.

Definition at line 252 of file qgsprocessingparameters.h.

◆ referenceScale

double QgsProcessingRasterLayerDefinition::referenceScale = 0

If set to a value > 0, sets a scale at which a raster (e.g., a WMS) should be requested or rendered.

Definition at line 247 of file qgsprocessingparameters.h.

◆ source

QgsProperty QgsProcessingRasterLayerDefinition::source

Source definition.

Usually a static property set to a source layer's ID or file name.

Definition at line 242 of file qgsprocessingparameters.h.


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