|
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
| 15 | + |
15 | 16 | class QgsProcessingParameterDefinition
|
16 | 17 | {
|
17 | 18 | %Docstring
|
@@ -222,124 +223,142 @@ class QgsProcessingParameters
|
222 | 223 | :rtype: bool
|
223 | 224 | %End
|
224 | 225 |
|
225 |
| - static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 226 | + static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
226 | 227 | %Docstring
|
227 |
| - Evaluates the parameter with matching ``name`` to a static string value. |
| 228 | + Evaluates the parameter with matching ``definition`` to a static string value. |
228 | 229 | :rtype: str
|
229 | 230 | %End
|
230 | 231 |
|
231 |
| - static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 232 | + static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
232 | 233 | %Docstring
|
233 |
| - Evaluates the parameter with matching ``name`` to an expression. |
| 234 | + Evaluates the parameter with matching ``definition`` to an expression. |
234 | 235 | :rtype: str
|
235 | 236 | %End
|
236 | 237 |
|
237 |
| - static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 238 | + static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
238 | 239 | %Docstring
|
239 |
| - Evaluates the parameter with matching ``name`` to a static double value. |
| 240 | + Evaluates the parameter with matching ``definition`` to a static double value. |
240 | 241 | :rtype: float
|
241 | 242 | %End
|
242 | 243 |
|
243 |
| - static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 244 | + static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
244 | 245 | %Docstring
|
245 |
| - Evaluates the parameter with matching ``name`` to a static integer value. |
| 246 | + Evaluates the parameter with matching ``definition`` to a static integer value. |
246 | 247 | :rtype: int
|
247 | 248 | %End
|
248 | 249 |
|
249 |
| - static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 250 | + static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
250 | 251 | %Docstring
|
251 |
| - Evaluates the parameter with matching ``name`` to a enum value. |
| 252 | + Evaluates the parameter with matching ``definition`` to a enum value. |
252 | 253 | :rtype: int
|
253 | 254 | %End
|
254 | 255 |
|
255 |
| - static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 256 | + static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
256 | 257 | %Docstring
|
257 |
| - Evaluates the parameter with matching ``name`` to list of enum values. |
| 258 | + Evaluates the parameter with matching ``definition`` to list of enum values. |
258 | 259 | :rtype: list of int
|
259 | 260 | %End
|
260 | 261 |
|
261 |
| - static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ); |
| 262 | + static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); |
262 | 263 | %Docstring
|
263 |
| - Evaluates the parameter with matching ``name`` to a static boolean value. |
| 264 | + Evaluates the parameter with matching ``definition`` to a static boolean value. |
264 | 265 | :rtype: bool
|
265 | 266 | %End
|
266 | 267 |
|
267 |
| - static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 268 | + static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, |
| 269 | + const QString &encoding, const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs, |
| 270 | + QgsProcessingContext &context, QString &destinationIdentifier /Out/ ) /Factory/; |
| 271 | +%Docstring |
| 272 | + Evaluates the parameter with matching ``definition`` to a feature sink. |
| 273 | + |
| 274 | + The ``encoding``, ``fields``, ``geometryType`` and ``crs`` parameters dictate the properties |
| 275 | + of the resulting feature sink. |
| 276 | + |
| 277 | + Sinks will either be taken from ``context``'s active project, or created from external |
| 278 | + providers and stored temporarily in the ``context``. The ``destinationIdentifier`` |
| 279 | + argument will be set to a string which can be used to retrieve the layer corresponding |
| 280 | + to the sink, e.g. via calling QgsProcessingUtils.mapLayerFromString(). |
| 281 | + |
| 282 | + This function creates a new object and the caller takes responsibility for deleting the returned object. |
| 283 | + :rtype: QgsFeatureSink |
| 284 | +%End |
| 285 | + |
| 286 | + static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
268 | 287 | %Docstring
|
269 |
| - Evaluates the parameter with matching ``name`` to a map layer. |
| 288 | + Evaluates the parameter with matching ``definition`` to a map layer. |
270 | 289 |
|
271 | 290 | Layers will either be taken from ``context``'s active project, or loaded from external
|
272 | 291 | sources and stored temporarily in the ``context``. In either case, callers do not
|
273 | 292 | need to handle deletion of the returned layer.
|
274 | 293 | :rtype: QgsMapLayer
|
275 | 294 | %End
|
276 | 295 |
|
277 |
| - static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 296 | + static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
278 | 297 | %Docstring
|
279 |
| - Evaluates the parameter with matching ``name`` to a raster layer. |
| 298 | + Evaluates the parameter with matching ``definition`` to a raster layer. |
280 | 299 |
|
281 | 300 | Layers will either be taken from ``context``'s active project, or loaded from external
|
282 | 301 | sources and stored temporarily in the ``context``. In either case, callers do not
|
283 | 302 | need to handle deletion of the returned layer.
|
284 | 303 | :rtype: QgsRasterLayer
|
285 | 304 | %End
|
286 | 305 |
|
287 |
| - static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 306 | + static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
288 | 307 | %Docstring
|
289 |
| - Evaluates the parameter with matching ``name`` to a vector layer. |
| 308 | + Evaluates the parameter with matching ``definition`` to a vector layer. |
290 | 309 |
|
291 | 310 | Layers will either be taken from ``context``'s active project, or loaded from external
|
292 | 311 | sources and stored temporarily in the ``context``. In either case, callers do not
|
293 | 312 | need to handle deletion of the returned layer.
|
294 | 313 | :rtype: QgsVectorLayer
|
295 | 314 | %End
|
296 | 315 |
|
297 |
| - static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 316 | + static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
298 | 317 | %Docstring
|
299 |
| - Evaluates the parameter with matching ``name`` to a coordinate reference system. |
| 318 | + Evaluates the parameter with matching ``definition`` to a coordinate reference system. |
300 | 319 | :rtype: QgsCoordinateReferenceSystem
|
301 | 320 | %End
|
302 | 321 |
|
303 |
| - static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 322 | + static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
304 | 323 | %Docstring
|
305 |
| - Evaluates the parameter with matching ``name`` to a rectangular extent. |
| 324 | + Evaluates the parameter with matching ``definition`` to a rectangular extent. |
306 | 325 | :rtype: QgsRectangle
|
307 | 326 | %End
|
308 | 327 |
|
309 |
| - static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 328 | + static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
310 | 329 | %Docstring
|
311 |
| - Evaluates the parameter with matching ``name`` to a point. |
| 330 | + Evaluates the parameter with matching ``definition`` to a point. |
312 | 331 | :rtype: QgsPointXY
|
313 | 332 | %End
|
314 | 333 |
|
315 |
| - static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 334 | + static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
316 | 335 | %Docstring
|
317 |
| - Evaluates the parameter with matching ``name`` to a file/folder name. |
| 336 | + Evaluates the parameter with matching ``definition`` to a file/folder name. |
318 | 337 | :rtype: str
|
319 | 338 | %End
|
320 | 339 |
|
321 |
| - static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 340 | + static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
322 | 341 | %Docstring
|
323 |
| - Evaluates the parameter with matching ``name`` to a matrix/table of values. |
| 342 | + Evaluates the parameter with matching ``definition`` to a matrix/table of values. |
324 | 343 | Tables are collapsed to a 1 dimensional list.
|
325 | 344 | :rtype: QVariantList
|
326 | 345 | %End
|
327 | 346 |
|
328 |
| - static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 347 | + static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
329 | 348 | %Docstring
|
330 |
| - Evaluates the parameter with matching ``name`` to a list of map layers. |
| 349 | + Evaluates the parameter with matching ``definition`` to a list of map layers. |
331 | 350 | :rtype: list of QgsMapLayer
|
332 | 351 | %End
|
333 | 352 |
|
334 |
| - static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 353 | + static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
335 | 354 | %Docstring
|
336 |
| - Evaluates the parameter with matching ``name`` to a range of values. |
| 355 | + Evaluates the parameter with matching ``definition`` to a range of values. |
337 | 356 | :rtype: list of float
|
338 | 357 | %End
|
339 | 358 |
|
340 |
| - static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ); |
| 359 | + static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); |
341 | 360 | %Docstring
|
342 |
| - Evaluates the parameter with matching ``name`` to a list of fields. |
| 361 | + Evaluates the parameter with matching ``definition`` to a list of fields. |
343 | 362 | :rtype: list of str
|
344 | 363 | %End
|
345 | 364 |
|
|
0 commit comments