From e40389a41c3ab9ceff1c54f094535a0b004e3464 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 3 Apr 2017 13:53:47 +1000 Subject: [PATCH] Sipify QgsProcessingAlgorithm --- .../processing/qgsprocessingalgorithm.sip | 78 ++++++++++++++++++- src/core/processing/qgsprocessingalgorithm.h | 16 ++-- 2 files changed, 82 insertions(+), 12 deletions(-) diff --git a/python/core/processing/qgsprocessingalgorithm.sip b/python/core/processing/qgsprocessingalgorithm.sip index a5a58d8871c..01fe07c73b4 100644 --- a/python/core/processing/qgsprocessingalgorithm.sip +++ b/python/core/processing/qgsprocessingalgorithm.sip @@ -1,29 +1,99 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/processing/qgsprocessingalgorithm.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + class QgsProcessingAlgorithm { -%TypeHeaderCode -#include +%Docstring + Abstract base class for processing algorithms. +.. versionadded:: 3.0 %End +%TypeHeaderCode +#include "qgsprocessingalgorithm.h" +%End public: - enum Flag + enum Flag { FlagHideFromToolbox, FlagHideFromModeler, FlagSupportsBatch, - FlagDeprecated, + FlagDeprecated }; typedef QFlags Flags; QgsProcessingAlgorithm(); +%Docstring + Constructor for QgsProcessingAlgorithm. +%End + virtual ~QgsProcessingAlgorithm(); virtual QString name() const = 0; +%Docstring + Returns the algorithm name, used for identifying the algorithm. This string + should be fixed for the algorithm, and must not be localised. The name should + be unique within each provider. Names should contain lowercase alphanumeric characters + only and no spaces or other formatting characters. + \see displayName() + \see group() + \see tags() +%End + virtual QString displayName() const = 0; +%Docstring + Returns the translated algorithm name, which should be used for any user-visible display + of the algorithm name. + \see name() +%End + virtual QStringList tags() const; +%Docstring + Returns a list of tags which relate to the algorithm, and are used to assist users in searching + for suitable algorithms. These tags should be localised. +%End + virtual QIcon icon() const; +%Docstring + Returns an icon for the algorithm. + \see svgIconPath() +%End + virtual QString svgIconPath() const; +%Docstring + Returns a path to an SVG version of the algorithm's icon. + \see icon() +%End + virtual QString group() const; +%Docstring + Returns the name of the group this algorithm belongs to. This string + should be localised. + \see tags() +%End + virtual Flags flags() const; +%Docstring + Returns the flags indicating how and when the algorithm operates and should be exposed to users. +%End + }; QFlags operator|(QgsProcessingAlgorithm::Flag f1, QFlags f2); + + + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/core/processing/qgsprocessingalgorithm.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/src/core/processing/qgsprocessingalgorithm.h b/src/core/processing/qgsprocessingalgorithm.h index 2d7f51867d8..b8ba87358a6 100644 --- a/src/core/processing/qgsprocessingalgorithm.h +++ b/src/core/processing/qgsprocessingalgorithm.h @@ -27,7 +27,7 @@ * \class QgsProcessingAlgorithm * \ingroup core * Abstract base class for processing algorithms. - * \note added in QGIS 3.0 + * \since QGIS 3.0 */ class CORE_EXPORT QgsProcessingAlgorithm { @@ -55,16 +55,16 @@ class CORE_EXPORT QgsProcessingAlgorithm * should be fixed for the algorithm, and must not be localised. The name should * be unique within each provider. Names should contain lowercase alphanumeric characters * only and no spaces or other formatting characters. - * @see displayName() - * @see group() - * @see tags() + * \see displayName() + * \see group() + * \see tags() */ virtual QString name() const = 0; /** * Returns the translated algorithm name, which should be used for any user-visible display * of the algorithm name. - * @see name() + * \see name() */ virtual QString displayName() const = 0; @@ -76,20 +76,20 @@ class CORE_EXPORT QgsProcessingAlgorithm /** * Returns an icon for the algorithm. - * @see svgIconPath() + * \see svgIconPath() */ virtual QIcon icon() const; /** * Returns a path to an SVG version of the algorithm's icon. - * @see icon() + * \see icon() */ virtual QString svgIconPath() const; /** * Returns the name of the group this algorithm belongs to. This string * should be localised. - * @see tags() + * \see tags() */ virtual QString group() const { return QString(); }