16#ifndef QGSPROCESSINGPARAMETERRELIEFCOLORS_H
17#define QGSPROCESSINGPARAMETERRELIEFCOLORS_H
26using namespace Qt::StringLiterals;
42 QString
type()
const override;
44 static QString
typeName() {
return u
"reliefcolors"_s; }
58 QList< QgsRasterReliefColor> valueAsReliefColors(
const QVariant &value,
const QgsProcessingContext &context )
const;
63 static QVariant colorsAsVariant(
const QList< QgsRasterReliefColor> &colors );
82 QgsProcessingParameterDefinition *create(
const QString &name )
const override SIP_FACTORY {
return new QgsProcessingParameterReliefColors( name ); }
84 QString
description()
const override {
return QCoreApplication::translate(
"Processing",
"An input allowing setting the output colors for relief algorithms." ); }
86 QString
name()
const override {
return QCoreApplication::translate(
"Processing",
"Relief colors" ); }
90 QString pythonImportString()
const override {
return u
"from qgis.core import QgsProcessingParameterReliefColors"_s; }
92 QString className()
const override {
return u
"QgsProcessingParameterReliefColors"_s; }
94 QStringList acceptedPythonTypes()
const override {
return QStringList() << u
"str"_s; }
96 QStringList acceptedStringValues()
const override
98 return QStringList() << QObject::tr(
"Concatenated string value with format of 'min_elevation,max_elevation,red,green,blue;' for each color range" );
105 QColor
modelColor()
const override {
return QColor( 255, 131, 23 ); };
Contains information about the context in which a processing algorithm is executed.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
QString description() const
Returns the description for the parameter.
QString name() const
Returns the name of the parameter.
virtual bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const
Checks whether the specified input value is acceptable for the parameter.
virtual QColor modelColor() const
Returns the color to use for the parameter in model designer windows.
QString parentLayerParameter() const
Returns the linked parent layer parameter name.
QgsProcessingParameterReliefColors(const QString &name, const QString &description=QString(), const QString &parentLayerParameter=QString(), bool optional=true)
Constructor for QgsProcessingParameterReliefColors.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
bool fromVariantMap(const QVariantMap &map) override
Restores this parameter to a QVariantMap.
QString type() const override
Unique parameter type name.
QVariantMap toVariantMap() const override
Saves this parameter to a QVariantMap.
QgsProcessingParameterDefinition * clone() const override
Creates a clone of the parameter definition.
QgsProcessingParameterString(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool multiLine=false, bool optional=false)
Constructor for QgsProcessingParameterString.
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
Makes metadata of processing parameters available.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.