mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Metadata and modeller exposure support
This commit is contained in:
parent
ff7b831b9d
commit
2145865a42
@ -43,6 +43,18 @@ This will be used in comboboxes and list widgets.
|
||||
virtual QString id() const = 0;
|
||||
%Docstring
|
||||
A static id for this type which will be used for storing this parameter type.
|
||||
%End
|
||||
|
||||
virtual bool exposeToModeller() const;
|
||||
%Docstring
|
||||
Determines if this parameter is available in the modeller.
|
||||
The default implementation returns true.
|
||||
%End
|
||||
|
||||
virtual QVariantMap metadata() const;
|
||||
%Docstring
|
||||
Metadata for this parameter type. Can be used for example to define custom widgets.
|
||||
The default implementation returns an empty map.
|
||||
%End
|
||||
};
|
||||
|
||||
|
@ -105,7 +105,7 @@ SET(QGIS_CORE_SRCS
|
||||
processing/qgsprocessingfeedback.cpp
|
||||
processing/qgsprocessingoutputs.cpp
|
||||
processing/qgsprocessingparameters.cpp
|
||||
processing/qgsprocessingparametertypeimpl.cpp
|
||||
processing/qgsprocessingparametertype.cpp
|
||||
processing/qgsprocessingprovider.cpp
|
||||
processing/qgsprocessingregistry.cpp
|
||||
processing/qgsprocessingutils.cpp
|
||||
|
11
src/core/processing/qgsprocessingparametertype.cpp
Normal file
11
src/core/processing/qgsprocessingparametertype.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "qgsprocessingparametertype.h"
|
||||
|
||||
bool QgsProcessingParameterType::exposeToModeller() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QVariantMap QgsProcessingParameterType::metadata() const
|
||||
{
|
||||
return QVariantMap();
|
||||
}
|
@ -42,6 +42,18 @@ class CORE_EXPORT QgsProcessingParameterType
|
||||
* A static id for this type which will be used for storing this parameter type.
|
||||
*/
|
||||
virtual QString id() const = 0;
|
||||
|
||||
/**
|
||||
* Determines if this parameter is available in the modeller.
|
||||
* The default implementation returns true.
|
||||
*/
|
||||
virtual bool exposeToModeller() const;
|
||||
|
||||
/**
|
||||
* Metadata for this parameter type. Can be used for example to define custom widgets.
|
||||
* The default implementation returns an empty map.
|
||||
*/
|
||||
virtual QVariantMap metadata() const;
|
||||
};
|
||||
|
||||
#endif // QGSPROCESSINGPARAMETERTYPE_H
|
||||
|
@ -1 +0,0 @@
|
||||
#include "qgsprocessingparametertypeimpl.h"
|
Loading…
x
Reference in New Issue
Block a user