16#ifndef QGSPROCESSINGPARAMETERTILEEXTENTMAXZOOMLIST_H
17#define QGSPROCESSINGPARAMETERTILEEXTENTMAXZOOMLIST_H
26using namespace Qt::StringLiterals;
59 QString
type()
const override;
67 static QString
typeName() {
return u
"tileextentmaxzoomlist"_s; }
72 QList<QgsTileExtentMaxZoomRegion> parameterAsRegionList(
const QVariant &variant,
QgsProcessingContext &context )
const;
77 static QVariant toVariant(
const QList<QgsTileExtentMaxZoomRegion> ®ions );
93 static int maxZoomForTile(
const QgsRectangle &tileExtent,
const QList<QgsTileExtentMaxZoomRegion> ®ions,
int defaultMaxZoom );
114 QgsProcessingParameterDefinition *create(
const QString &name )
const override SIP_FACTORY {
return new QgsProcessingParameterTileExtentMaxZoomList( name ); }
116 QString description()
const override
118 return QCoreApplication::translate(
"Processing",
"An input for defining a list of spatial extents, each with an associated maximum zoom level override." );
120 QString name()
const override {
return QCoreApplication::translate(
"Processing",
"Tile Extent Maximum Zoom List" ); }
122 QString pythonImportString()
const override {
return u
"from qgis.core import QgsProcessingParameterTileExtentMaxZoomList"_s; }
123 QString className()
const override {
return u
"QgsProcessingParameterTileExtentMaxZoomList"_s; }
125 QStringList acceptedOutputTypes()
const override {
return {}; }
Contains information about the context in which a processing algorithm is executed.
QVariant defaultValue() const
Returns the default value for the parameter.
QString description() const
Returns the description for the parameter.
QgsProcessingParameterDefinition(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &help=QString())
Constructor for QgsProcessingParameterDefinition.
QString name() const
Returns the name of the parameter.
QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const override
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
QString valueAsString(const QVariant &value, QgsProcessingContext &context, bool &ok) const override
Returns a string version of the parameter input value (if possible).
QString type() const override
Unique parameter type name.
bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const override
Checks whether the specified input value is acceptable for the parameter.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterTileExtentMaxZoomList(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterTileExtentMaxZoomList.
QgsProcessingParameterTileExtentMaxZoomList * clone() const override
Creates a clone of the parameter definition.
QVariant valueAsJsonObject(const QVariant &value, QgsProcessingContext &context) const override
Returns a version of the parameter input value, which is suitable for use in a JSON object.
Makes metadata of processing parameters available.
A rectangle specified with double values.
A QgsRectangle with associated coordinate reference system.
Represents a spatial region paired with a custom maximum zoom level.
int maxZoom
Maximum zoom level applied within this extent.
QgsReferencedRectangle extent
Bounding box extent and associated CRS.