QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgsprocessingparametertype.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingparametertype.h
3 ------------------------
4 begin : March 2018
5 copyright : (C) 2018 by Matthias Kuhn
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#ifndef QGSPROCESSINGPARAMETERTYPE_H
20#define QGSPROCESSINGPARAMETERTYPE_H
21
23#include "qgis.h"
24#include "qgis_sip.h"
25#include <QObject>
26
34{
35 public:
36
40 virtual QgsProcessingParameterDefinition *create( const QString &name ) const = 0 SIP_FACTORY;
41
45 virtual ~QgsProcessingParameterType() = default;
46
52 virtual QString description() const = 0;
53
58 virtual QString name() const = 0;
59
60 // TODO QGIS 4.0 -- make pure virtual
61
69 virtual QString pythonImportString() const { return QString(); }
70
71 // TODO QGIS 4.0 -- make pure virtual
72
79 virtual QString className() const
80 {
81 return name(); // this is wrong, but it's better than nothing for subclasses which don't implement this method
82 }
83
87 virtual QString id() const = 0;
88
93 virtual Qgis::ProcessingParameterTypeFlags flags() const;
94
99 virtual QVariantMap metadata() const;
100
111 virtual QStringList acceptedPythonTypes() const;
112
124 virtual QStringList acceptedStringValues() const;
125};
126
127#endif // QGSPROCESSINGPARAMETERTYPE_H
QFlags< ProcessingParameterTypeFlag > ProcessingParameterTypeFlags
Flags which dictate the behavior of Processing parameter types.
Definition: qgis.h:3040
Base class for the definition of processing parameters.
Makes metadata of processing parameters available.
virtual QString name() const =0
A human readable and translatable short name for this parameter type.
virtual QgsProcessingParameterDefinition * create(const QString &name) const =0
Creates a new parameter of this type.
virtual QString description() const =0
A human readable and translatable description for this parameter type.
virtual QString id() const =0
A static id for this type which will be used for storing this parameter type.
virtual QString className() const
Returns the corresponding class name for the parameter type.
virtual ~QgsProcessingParameterType()=default
Destructor.
virtual QString pythonImportString() const
Returns a valid Python import string for importing the corresponding parameter type,...
#define SIP_FACTORY
Definition: qgis_sip.h:76