Skip to content
Permalink
Browse files

Metadata and modeller exposure support

  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 3, 2018
1 parent ff7b831 commit 2145865a4288fc7771b012dacddb646453554285
@@ -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
@@ -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

This file was deleted.

0 comments on commit 2145865

Please sign in to comment.
You can’t perform that action at this time.