Skip to content

Commit d8086e5

Browse files
committed
Use c++ method for available sources
1 parent 17199c8 commit d8086e5

File tree

9 files changed

+395
-161
lines changed

9 files changed

+395
-161
lines changed

python/core/processing/qgsprocessingoutputs.sip

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ class QgsProcessingOutputDefinition
2828
%End
2929

3030
%ConvertToSubClassCode
31-
if ( sipCpp->type() == "outputVector" )
31+
if ( sipCpp->type() == QgsProcessingOutputVectorLayer::typeName() )
3232
sipType = sipType_QgsProcessingOutputVectorLayer;
33-
else if ( sipCpp->type() == "outputRaster" )
33+
else if ( sipCpp->type() == QgsProcessingOutputRasterLayer::typeName() )
3434
sipType = sipType_QgsProcessingOutputRasterLayer;
35-
else if ( sipCpp->type() == "outputHtml" )
35+
else if ( sipCpp->type() == QgsProcessingOutputHtml::typeName() )
3636
sipType = sipType_QgsProcessingOutputHtml;
37-
else if ( sipCpp->type() == "outputNumber" )
37+
else if ( sipCpp->type() == QgsProcessingOutputNumber::typeName() )
3838
sipType = sipType_QgsProcessingOutputNumber;
39-
else if ( sipCpp->type() == "outputString" )
39+
else if ( sipCpp->type() == QgsProcessingOutputString::typeName() )
4040
sipType = sipType_QgsProcessingOutputString;
41-
else if ( sipCpp->type() == "outputFolder" )
41+
else if ( sipCpp->type() == QgsProcessingOutputFolder::typeName() )
4242
sipType = sipType_QgsProcessingOutputFolder;
4343
%End
4444
public:
@@ -111,6 +111,11 @@ class QgsProcessingOutputVectorLayer : QgsProcessingOutputDefinition
111111
Constructor for QgsProcessingOutputVectorLayer.
112112
%End
113113

114+
static QString typeName();
115+
%Docstring
116+
Returns the type name for the output class.
117+
:rtype: str
118+
%End
114119
virtual QString type() const;
115120

116121
QgsProcessingParameterDefinition::LayerType dataType() const;
@@ -145,7 +150,14 @@ class QgsProcessingOutputRasterLayer : QgsProcessingOutputDefinition
145150
Constructor for QgsProcessingOutputRasterLayer.
146151
%End
147152

153+
static QString typeName();
154+
%Docstring
155+
Returns the type name for the output class.
156+
:rtype: str
157+
%End
148158
virtual QString type() const;
159+
160+
149161
};
150162

151163
class QgsProcessingOutputHtml : QgsProcessingOutputDefinition
@@ -165,7 +177,13 @@ class QgsProcessingOutputHtml : QgsProcessingOutputDefinition
165177
Constructor for QgsProcessingOutputHtml.
166178
%End
167179

180+
static QString typeName();
181+
%Docstring
182+
Returns the type name for the output class.
183+
:rtype: str
184+
%End
168185
virtual QString type() const;
186+
169187
};
170188

171189
class QgsProcessingOutputNumber : QgsProcessingOutputDefinition
@@ -185,6 +203,11 @@ class QgsProcessingOutputNumber : QgsProcessingOutputDefinition
185203
Constructor for QgsProcessingOutputNumber.
186204
%End
187205

206+
static QString typeName();
207+
%Docstring
208+
Returns the type name for the output class.
209+
:rtype: str
210+
%End
188211
virtual QString type() const;
189212
};
190213

@@ -205,7 +228,13 @@ class QgsProcessingOutputString : QgsProcessingOutputDefinition
205228
Constructor for QgsProcessingOutputString.
206229
%End
207230

231+
static QString typeName();
232+
%Docstring
233+
Returns the type name for the output class.
234+
:rtype: str
235+
%End
208236
virtual QString type() const;
237+
209238
};
210239

211240
class QgsProcessingOutputFolder : QgsProcessingOutputDefinition
@@ -220,12 +249,19 @@ class QgsProcessingOutputFolder : QgsProcessingOutputDefinition
220249
%End
221250
public:
222251

252+
223253
QgsProcessingOutputFolder( const QString &name, const QString &description = QString() );
224254
%Docstring
225255
Constructor for QgsProcessingOutputFolder.
226256
%End
227257

258+
static QString typeName();
259+
%Docstring
260+
Returns the type name for the output class.
261+
:rtype: str
262+
%End
228263
virtual QString type() const;
264+
229265
};
230266

231267

0 commit comments

Comments
 (0)