Skip to content

Commit db07bc6

Browse files
authoredDec 15, 2017
Merge pull request #5867 from alexbruy/processing-group
[processing] add groupId() method to get untranslated algorithm group
2 parents abdd875 + 2674022 commit db07bc6

File tree

268 files changed

+841
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+841
-6
lines changed
 

‎python/core/processing/models/qgsprocessingmodelalgorithm.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class QgsProcessingModelAlgorithm : QgsProcessingAlgorithm
2222
%End
2323
public:
2424

25-
QgsProcessingModelAlgorithm( const QString &name = QString(), const QString &group = QString() );
25+
QgsProcessingModelAlgorithm( const QString &name = QString(), const QString &group = QString(), const QString &groupId = QString() );
2626
%Docstring
2727
Constructor for QgsProcessingModelAlgorithm.
2828
%End
@@ -36,6 +36,8 @@ class QgsProcessingModelAlgorithm : QgsProcessingAlgorithm
3636

3737
virtual QString group() const;
3838

39+
virtual QString groupId() const;
40+
3941
virtual QIcon icon() const;
4042

4143
virtual QString svgIconPath() const;

‎python/core/processing/qgsprocessingalgorithm.sip

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,20 @@ class QgsProcessingAlgorithm
158158
%Docstring
159159
Returns the name of the group this algorithm belongs to. This string
160160
should be localised.
161+
.. seealso:: :py:func:`groupId()`
161162
.. seealso:: :py:func:`tags()`
162163
:rtype: str
163164
%End
164165

166+
virtual QString groupId() const;
167+
%Docstring
168+
Returns the unique ID of the group this algorithm belongs to. This string
169+
should be fixed for the algorithm, and must not be localised. The group id
170+
should be unique within each provider. Group id should contain lowercase
171+
alphanumeric characters only and no spaces or other formatting characters.
172+
.. seealso:: :py:func:`group()`
173+
:rtype: str
174+
%End
165175
virtual Flags flags() const;
166176
%Docstring
167177
Returns the flags indicating how and when the algorithm operates and should be exposed to users.

0 commit comments

Comments
 (0)
Please sign in to comment.