QGIS API Documentation 4.1.0-Master (60fea48833c)
Loading...
Searching...
No Matches
qgsprocessingparametertypeimpl.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingparametertypeimpl.h
3 ------------------------
4 begin : March 2018
5 copyright : (C) 2018 by Matthias Kuhn
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPROCESSINGPARAMETERTYPEIMPL_H
19#define QGSPROCESSINGPARAMETERTYPEIMPL_H
20
21#include "qgis.h"
22#include "qgis_sip.h"
24
25#include <QCoreApplication>
26#include <QString>
27
28#define SIP_NO_FILE
29
30using namespace Qt::StringLiterals;
31
32
41{
42 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRasterLayer( name ); }
43
44 QString description() const override { return QCoreApplication::translate( "Processing", "A raster layer parameter." ); }
45
46 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Layer" ); }
47
48 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRasterLayer"_s; }
49
50 QString className() const override { return u"QgsProcessingParameterRasterLayer"_s; }
51
52 QString id() const override { return u"raster"_s; }
53
54 QStringList acceptedPythonTypes() const override
55 {
56 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsProcessingRasterLayerDefinition"_s << u"QgsProperty"_s << u"QgsRasterLayer"_s;
57 }
58
59 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a raster layer" ); }
60
61 QStringList acceptedParameterTypes() const override
62 {
63 return QStringList()
68 }
69
70 QStringList acceptedOutputTypes() const override
71 {
72 return QStringList()
78 }
79
80 QColor modelColor() const override { return QColor( 0, 180, 180 ); /* turquoise */ };
81};
82
91{
92 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMeshLayer( name ); }
93
94 QString description() const override { return QCoreApplication::translate( "Processing", "A mesh layer parameter." ); }
95
96 QString name() const override { return QCoreApplication::translate( "Processing", "Mesh Layer" ); }
97
98 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMeshLayer"_s; }
99
100 QString className() const override { return u"QgsProcessingParameterMeshLayer"_s; }
101
102 QString id() const override { return u"mesh"_s; }
103
104 QStringList acceptedPythonTypes() const override
105 {
106 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsMeshLayer"_s;
107 }
108
109 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a mesh layer" ); }
110
111 QStringList acceptedParameterTypes() const override
112 {
114 }
115
116 QStringList acceptedOutputTypes() const override
117 {
118 return QStringList()
120 // TODO << QgsProcessingOutputMeshLayer::typeName()
124 }
125
126 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
127};
128
137{
138 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorLayer( name ); }
139
140 QString description() const override
141 {
142 return QCoreApplication::translate( "Processing", "A vector layer parameter, e.g. for algorithms which change layer styles, edit layers in place, or other operations which affect an entire layer." );
143 }
144
145 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Layer" ); }
146
147 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorLayer"_s; }
148
149 QString className() const override { return u"QgsProcessingParameterVectorLayer"_s; }
150
151 QString id() const override { return u"vector"_s; }
152
153 QStringList acceptedPythonTypes() const override
154 {
155 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsProperty"_s << u"QgsVectorLayer"_s;
156 }
157
158 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector layer" ); }
159
160 QStringList acceptedParameterTypes() const override
161 {
162 return QStringList()
167 }
168
169 QStringList acceptedOutputTypes() const override
170 {
171 return QStringList()
177 }
178
179 QList<int> acceptedDataTypes( const QgsProcessingParameterDefinition *parameter ) const override
180 {
181 if ( const QgsProcessingParameterVectorLayer *param = dynamic_cast<const QgsProcessingParameterVectorLayer *>( parameter ) )
182 return param->dataTypes();
183 else
184 return QList<int>();
185 }
186
187 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
188};
189
198{
199 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMapLayer( name ); }
200
201 QString description() const override { return QCoreApplication::translate( "Processing", "A generic map layer parameter, which accepts either vector or raster layers." ); }
202
203 QString name() const override { return QCoreApplication::translate( "Processing", "Map Layer" ); }
204
205 QString id() const override { return u"layer"_s; }
206
207 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMapLayer"_s; }
208
209 QString className() const override { return u"QgsProcessingParameterMapLayer"_s; }
210
211 QStringList acceptedPythonTypes() const override
212 {
213 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsMapLayer"_s << u"QgsProperty"_s << u"QgsRasterLayer"_s << u"QgsVectorLayer"_s;
214 }
215
216 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector, raster or mesh layer" ); }
217
218 QStringList acceptedParameterTypes() const override
219 {
220 return QStringList()
229 }
230
231 QStringList acceptedOutputTypes() const override
232 {
233 return QStringList()
240 }
241
242 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
243};
244
253{
254 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterBoolean( name ); }
255
256 QString description() const override { return QCoreApplication::translate( "Processing", "A boolean parameter, for true/false values." ); }
257
258 QString name() const override { return QCoreApplication::translate( "Processing", "Boolean" ); }
259
260 QString id() const override { return u"boolean"_s; }
261
262 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterBoolean"_s; }
263
264 QString className() const override { return u"QgsProcessingParameterBoolean"_s; }
265
266 QStringList acceptedPythonTypes() const override { return QStringList() << u"bool"_s << u"int"_s << u"str"_s << u"QgsProperty"_s; }
267
268 QStringList acceptedStringValues() const override
269 {
270 return QStringList()
271 << QObject::tr( "1 for true/yes" )
272 << QObject::tr( "0 for false/no" )
273 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
274 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
275 }
276
277 QStringList acceptedParameterTypes() const override
278 {
279 //pretty much everything is compatible here and can be converted to a bool!
280 return QStringList()
300 }
301 QStringList acceptedOutputTypes() const override
302 {
303 return QStringList()
312 }
313
314 QColor modelColor() const override { return QColor( 51, 201, 28 ); /* green */ };
315};
316
325{
326 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterExpression( name ); }
327
328 QString description() const override { return QCoreApplication::translate( "Processing", "An expression parameter, to add custom expressions based on layer fields." ); }
329
330 QString name() const override { return QCoreApplication::translate( "Processing", "Expression" ); }
331
332 QString id() const override { return u"expression"_s; }
333
334 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterExpression"_s; }
335
336 QString className() const override { return u"QgsProcessingParameterExpression"_s; }
337
338 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
339
340 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A valid QGIS expression string, e.g \"road_name\" = 'MAIN RD'" ); }
341
342 QStringList acceptedParameterTypes() const override
343 {
344 return QStringList()
353 }
354
355 QStringList acceptedOutputTypes() const override
356 {
358 }
359
360 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
361};
362
371{
372 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterCrs( name ); }
373
374 QString description() const override { return QCoreApplication::translate( "Processing", "A coordinate reference system (CRS) input parameter." ); }
375
376 QString name() const override { return QCoreApplication::translate( "Processing", "CRS" ); }
377
378 QString id() const override { return u"crs"_s; }
379
380 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterCrs"_s; }
381
382 QString className() const override { return u"QgsProcessingParameterCrs"_s; }
383
384 QStringList acceptedPythonTypes() const override
385 {
386 return QStringList()
387 << u"str: 'ProjectCrs'"_s
388 << QObject::tr( "str: CRS auth ID (e.g. 'EPSG:3111')" )
389 << QObject::tr( "str: CRS PROJ4 (e.g. 'PROJ4:…')" )
390 << QObject::tr( "str: CRS WKT (e.g. 'WKT:…')" )
391 << QObject::tr( "str: layer ID. CRS of layer is used." )
392 << QObject::tr( "str: layer name. CRS of layer is used." )
393 << QObject::tr( "str: layer source. CRS of layer is used." )
394 << QObject::tr( "QgsCoordinateReferenceSystem" )
395 << QObject::tr( "QgsMapLayer: CRS of layer is used" )
396 << QObject::tr( "QgsProcessingFeatureSourceDefinition: CRS of source is used" )
397 << u"QgsProperty"_s;
398 }
399
400 QStringList acceptedStringValues() const override
401 {
402 return QStringList()
403 << QObject::tr( "CRS as an auth ID (e.g. 'EPSG:3111')" )
404 << QObject::tr( "CRS as a PROJ4 string (e.g. 'PROJ4:…')" )
405 << QObject::tr( "CRS as a WKT string (e.g. 'WKT:…')" )
406 << QObject::tr( "Path to a layer. The CRS of the layer is used." );
407 }
408
409 QStringList acceptedParameterTypes() const override
410 {
411 return QStringList()
421 }
422
423 QStringList acceptedOutputTypes() const override
424 {
425 return QStringList()
431 }
432
433 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
434};
435
444{
445 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRange( name ); }
446
447 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric range parameter for processing algorithms." ); }
448
449 QString name() const override { return QCoreApplication::translate( "Processing", "Range" ); }
450
451 QString id() const override { return u"range"_s; }
452
453 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRange"_s; }
454
455 QString className() const override { return u"QgsProcessingParameterRange"_s; }
456
457 QStringList acceptedPythonTypes() const override
458 {
459 return QStringList()
460 << QObject::tr( "list[float]: list of 2 float values" )
461 << QObject::tr( "list[str]: list of strings representing floats" )
462 << QObject::tr( "str: as two comma delimited floats, e.g. '1,10'" )
463 << u"QgsProperty"_s;
464 }
465
466 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Two comma separated numeric values, e.g. '1,10'" ); }
467
468 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterRange::typeName() << QgsProcessingParameterString::typeName(); }
469
470 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
471
472 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
473};
474
483{
484 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPoint( name ); }
485
486 QString description() const override { return QCoreApplication::translate( "Processing", "A point geometry parameter." ); }
487
488 QString name() const override { return QCoreApplication::translate( "Processing", "Point" ); }
489
490 QString id() const override { return u"point"_s; }
491
492 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPoint"_s; }
493
494 QString className() const override { return u"QgsProcessingParameterPoint"_s; }
495
496 QStringList acceptedPythonTypes() const override
497 {
498 return QStringList() << QObject::tr( "str: as an 'x,y' string, e.g. '1.5,10.1'" ) << u"QgsPointXY"_s << u"QgsProperty"_s << u"QgsReferencedPointXY"_s << u"QgsGeometry: centroid of geometry is used"_s;
499 }
500
501 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Point coordinate as an 'x,y' string, e.g. '1.5,10.1'" ); }
502
503 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterPoint::typeName() << QgsProcessingParameterString::typeName(); }
504
505 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
506
507 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
508};
509
518{
519 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterGeometry( name ); }
520
521 QString description() const override { return QCoreApplication::translate( "Processing", "A geometry parameter." ); }
522
523 QString name() const override { return QCoreApplication::translate( "Processing", "Geometry" ); }
524
525 QString id() const override { return u"geometry"_s; }
526
527 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterGeometry"_s; }
528
529 QString className() const override { return u"QgsProcessingParameterGeometry"_s; }
530
531 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: as Well-Known Text string (WKT)" ) << u"QgsGeometry"_s << u"QgsProperty"_s; }
532
533 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Well-Known Text string (WKT)" ); }
534
535 QStringList acceptedParameterTypes() const override
536 {
538 }
539
540 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
541
542 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
543};
544
553{
554 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterEnum( name ); }
555
556 QString description() const override { return QCoreApplication::translate( "Processing", "An enumerated type parameter." ); }
557
558 QString name() const override { return QCoreApplication::translate( "Processing", "Enum" ); }
559
560 QString id() const override { return u"enum"_s; }
561
562 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterEnum"_s; }
563
564 QString className() const override { return u"QgsProcessingParameterEnum"_s; }
565
566 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << QObject::tr( "str: as string representation of int, e.g. '1'" ) << u"QgsProperty"_s; }
567
568 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Number of selected option, e.g. '1'" ) << QObject::tr( "Comma separated list of options, e.g. '1,3'" ); }
569
570 QStringList acceptedParameterTypes() const override
571 {
573 }
574
575 QStringList acceptedOutputTypes() const override
576 {
578 }
579
580 QColor modelColor() const override { return QColor( 152, 68, 201 ); /* purple */ };
581};
582
591{
592 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterExtent( name ); }
593
594 QString description() const override { return QCoreApplication::translate( "Processing", "A map extent parameter." ); }
595
596 QString name() const override { return QCoreApplication::translate( "Processing", "Extent" ); }
597
598 QString id() const override { return u"extent"_s; }
599
600 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterExtent"_s; }
601
602 QString className() const override { return u"QgsProcessingParameterExtent"_s; }
603
604 QStringList acceptedPythonTypes() const override
605 {
606 return QStringList()
607 << QObject::tr( "str: as comma delimited list of x min, x max, y min, y max. E.g. '4,10,101,105'" )
608 << QObject::tr( "str: layer ID. Extent of layer is used." )
609 << QObject::tr( "str: layer name. Extent of layer is used." )
610 << QObject::tr( "str: layer source. Extent of layer is used." )
611 << QObject::tr( "QgsMapLayer: Extent of layer is used" )
612 << QObject::tr( "QgsProcessingFeatureSourceDefinition: Extent of source is used" )
613 << u"QgsProperty"_s
614 << u"QgsRectangle"_s
615 << u"QgsReferencedRectangle"_s
616 << u"QgsGeometry: bounding box of geometry is used"_s;
617 }
618
619 QStringList acceptedStringValues() const override
620 {
621 return QStringList() << QObject::tr( "A comma delimited string of x min, x max, y min, y max. E.g. '4,10,101,105'" ) << QObject::tr( "Path to a layer. The extent of the layer is used." );
622 }
623
624 QStringList acceptedParameterTypes() const override
625 {
626 return QStringList()
636 }
637
638 QStringList acceptedOutputTypes() const override
639 {
640 return QStringList()
646 }
647
648 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
649};
650
659{
660 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMatrix( name ); }
661
662 QString description() const override { return QCoreApplication::translate( "Processing", "A table (matrix) parameter for processing algorithms." ); }
663
664 QString name() const override { return QCoreApplication::translate( "Processing", "Matrix" ); }
665
666 QString id() const override { return u"matrix"_s; }
667
668 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMatrix"_s; }
669
670 QString className() const override { return u"QgsProcessingParameterMatrix"_s; }
671
672 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: as comma delimited list of values" ) << u"list"_s << u"QgsProperty"_s; }
673
674 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A comma delimited list of values" ); }
675
676 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterMatrix::typeName(); }
677
678 QStringList acceptedOutputTypes() const override { return QStringList(); }
679
680 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
681};
682
691{
692 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFile( name ); }
693
694 QString description() const override { return QCoreApplication::translate( "Processing", "A file or folder parameter, for use with non-map layer file sources or folders." ); }
695
696 QString name() const override { return QCoreApplication::translate( "Processing", "File/Folder" ); }
697
698 QString id() const override { return u"file"_s; }
699
700 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFile"_s; }
701
702 QString className() const override { return u"QgsProcessingParameterFile"_s; }
703
704 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
705
706 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a file" ); }
707
708 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
709
710 QStringList acceptedOutputTypes() const override
711 {
712 return QStringList()
720 }
721
722 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
723};
724
733{
734 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterField( name ); }
735
736 QString description() const override { return QCoreApplication::translate( "Processing", "A vector field parameter, for selecting an existing field from a vector source." ); }
737
738 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Field" ); }
739
740 QString id() const override { return u"field"_s; }
741
742 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterField"_s; }
743
744 QString className() const override { return u"QgsProcessingParameterField"_s; }
745
746 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
747
748 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "The name of an existing field" ) << QObject::tr( "; delimited list of existing field names" ); }
749
750 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterField::typeName() << QgsProcessingParameterString::typeName(); }
751
752 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
753};
754
755
781
791{
792 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorDestination( name ); }
793
794 QString description() const override { return QCoreApplication::translate( "Processing", "A vector layer destination parameter." ); }
795
796 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Destination" ); }
797
798 QString id() const override { return u"vectorDestination"_s; }
799
800 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorDestination"_s; }
801
802 QString className() const override { return u"QgsProcessingParameterVectorDestination"_s; }
803
805 {
808 return flags;
809 }
810
811 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
812
813 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector layer" ); }
814
815 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
816};
817
827{
828 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFileDestination( name ); }
829
830 QString description() const override { return QCoreApplication::translate( "Processing", "A generic file based destination parameter." ); }
831
832 QString name() const override { return QCoreApplication::translate( "Processing", "File Destination" ); }
833
834 QString id() const override { return u"fileDestination"_s; }
835
836 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFileDestination"_s; }
837
838 QString className() const override { return u"QgsProcessingParameterFileDestination"_s; }
839
841 {
844 return flags;
845 }
846
847 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
848
849 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new file" ); }
850
851 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
852
853 QStringList acceptedOutputTypes() const override
854 {
855 return QStringList()
862 }
863
864 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
865};
866
877{
878 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFolderDestination( name ); }
879
880 QString description() const override { return QCoreApplication::translate( "Processing", "A folder destination parameter." ); }
881
882 QString name() const override { return QCoreApplication::translate( "Processing", "Folder Destination" ); }
883
884 QString id() const override { return u"folderDestination"_s; }
885
886 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFolderDestination"_s; }
887
888 QString className() const override { return u"QgsProcessingParameterFolderDestination"_s; }
889
891 {
894 return flags;
895 }
896
897 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
898
899 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for an existing or new folder" ); }
900
901 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
902
903 QStringList acceptedOutputTypes() const override
904 {
906 }
907
908 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
909};
910
920{
921 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRasterDestination( name ); }
922
923 QString description() const override { return QCoreApplication::translate( "Processing", "A raster layer destination parameter." ); }
924
925 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Destination" ); }
926
927 QString id() const override { return u"rasterDestination"_s; }
928
929 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRasterDestination"_s; }
930
931 QString className() const override { return u"QgsProcessingParameterRasterDestination"_s; }
932
934 {
937 return flags;
938 }
939
940 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
941
942 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new raster layer" ); }
943
944 QColor modelColor() const override { return QColor( 0, 180, 180 ); /* turquoise */ };
945};
946
955{
956 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterString( name ); }
957
958 QString description() const override { return QCoreApplication::translate( "Processing", "A freeform string parameter." ); }
959
960 QString name() const override { return QCoreApplication::translate( "Processing", "String" ); }
961
962 QString id() const override { return u"string"_s; }
963
964 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterString"_s; }
965
966 QString className() const override { return u"QgsProcessingParameterString"_s; }
967
968 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
969
970 QStringList acceptedStringValues() const override
971 {
972 return QStringList()
973 << QObject::tr( "String value" )
974 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
975 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
976 }
977
978 QStringList acceptedParameterTypes() const override
979 {
980 return QStringList()
994 }
995
996 QStringList acceptedOutputTypes() const override
997 {
998 return QStringList()
1004 }
1005
1006 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
1007};
1008
1017{
1018 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterAuthConfig( name ); }
1019
1020 QString description() const override { return QCoreApplication::translate( "Processing", "An authentication configuration parameter." ); }
1021
1022 QString name() const override { return QCoreApplication::translate( "Processing", "Authentication Configuration" ); }
1023
1024 QString id() const override { return u"authcfg"_s; }
1025
1026 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterAuthConfig"_s; }
1027
1028 QString className() const override { return u"QgsProcessingParameterAuthConfig"_s; }
1029
1030 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s; }
1031
1032 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "An existing QGIS authentication ID string" ); }
1033
1034 QStringList acceptedParameterTypes() const override
1035 {
1037 }
1038
1039 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1040};
1041
1050{
1051 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMultipleLayers( name ); }
1052
1053 QString description() const override { return QCoreApplication::translate( "Processing", "An input allowing selection of multiple sources, including multiple map layers or file sources." ); }
1054
1055 QString name() const override { return QCoreApplication::translate( "Processing", "Multiple Input" ); }
1056
1057 QString id() const override { return u"multilayer"_s; }
1058
1059 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMultipleLayers"_s; }
1060
1061 QString className() const override { return u"QgsProcessingParameterMultipleLayers"_s; }
1062
1063 QStringList acceptedPythonTypes() const override
1064 {
1065 return QStringList()
1066 << QObject::tr( "list[str]: list of layer IDs" )
1067 << QObject::tr( "list[str]: list of layer names" )
1068 << QObject::tr( "list[str]: list of layer sources" )
1069 << u"list[QgsMapLayer]"_s
1070 << u"QgsProperty"_s;
1071 }
1072
1073 QStringList acceptedParameterTypes() const override
1074 {
1075 return QStringList()
1084 }
1085 QStringList acceptedOutputTypes() const override
1086 {
1087 return QStringList()
1095 }
1096
1097 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1098};
1099
1108{
1109 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFeatureSource( name ); }
1110
1111 QString description() const override { return QCoreApplication::translate( "Processing", "A vector feature parameter, e.g. for algorithms which operate on the features within a layer." ); }
1112
1113 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Features" ); }
1114
1115 QString id() const override { return u"source"_s; }
1116
1117 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFeatureSource"_s; }
1118
1119 QString className() const override { return u"QgsProcessingParameterFeatureSource"_s; }
1120
1121 QStringList acceptedPythonTypes() const override
1122 {
1123 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsProcessingFeatureSourceDefinition"_s << u"QgsProperty"_s << u"QgsVectorLayer"_s;
1124 }
1125
1126 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector layer" ); }
1127
1128 QStringList acceptedParameterTypes() const override
1129 {
1130 return QStringList()
1136 }
1137
1138 QStringList acceptedOutputTypes() const override
1139 {
1140 return QStringList()
1146 }
1147
1148 QList<int> acceptedDataTypes( const QgsProcessingParameterDefinition *parameter ) const override
1149 {
1150 if ( const QgsProcessingParameterFeatureSource *param = dynamic_cast<const QgsProcessingParameterFeatureSource *>( parameter ) )
1151 return param->dataTypes();
1152 else
1153 return QList<int>();
1154 }
1155
1156 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
1157};
1158
1167{
1168 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterNumber( name ); }
1169
1170 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter, including float or integer values." ); }
1171
1172 QString name() const override { return QCoreApplication::translate( "Processing", "Number" ); }
1173
1174 QString id() const override { return u"number"_s; }
1175
1176 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterNumber"_s; }
1177
1178 QString className() const override { return u"QgsProcessingParameterNumber"_s; }
1179
1180 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1181
1182 QStringList acceptedStringValues() const override
1183 {
1184 return QStringList()
1185 << QObject::tr( "A numeric value" )
1186 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1187 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1188 }
1189
1190 QStringList acceptedParameterTypes() const override
1191 {
1192 return QStringList()
1199 }
1200
1201 QStringList acceptedOutputTypes() const override
1202 {
1204 }
1205
1206 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1207};
1208
1217{
1218 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDistance( name ); }
1219
1220 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a distance measure." ); }
1221
1222 QString name() const override { return QCoreApplication::translate( "Processing", "Distance" ); }
1223
1224 QString id() const override { return u"distance"_s; }
1225
1226 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDistance"_s; }
1227
1228 QString className() const override { return u"QgsProcessingParameterDistance"_s; }
1229
1230 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1231
1232 QStringList acceptedStringValues() const override
1233 {
1234 return QStringList()
1235 << QObject::tr( "A numeric value" )
1236 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1237 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1238 }
1239
1240 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1241};
1242
1243
1252{
1253 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterArea( name ); }
1254
1255 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing an area measure." ); }
1256
1257 QString name() const override { return QCoreApplication::translate( "Processing", "Area" ); }
1258
1259 QString id() const override { return u"area"_s; }
1260
1261 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterArea"_s; }
1262
1263 QString className() const override { return u"QgsProcessingParameterArea"_s; }
1264
1265 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1266
1267 QStringList acceptedStringValues() const override
1268 {
1269 return QStringList()
1270 << QObject::tr( "A numeric value" )
1271 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1272 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1273 }
1274};
1275
1276
1285{
1286 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVolume( name ); }
1287
1288 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a volume measure." ); }
1289
1290 QString name() const override { return QCoreApplication::translate( "Processing", "Volume" ); }
1291
1292 QString id() const override { return u"volume"_s; }
1293
1294 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVolume"_s; }
1295
1296 QString className() const override { return u"QgsProcessingParameterVolume"_s; }
1297
1298 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1299
1300 QStringList acceptedStringValues() const override
1301 {
1302 return QStringList()
1303 << QObject::tr( "A numeric value" )
1304 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1305 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1306 }
1307};
1308
1309
1318{
1319 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDuration( name ); }
1320
1321 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a duration measure." ); }
1322
1323 QString name() const override { return QCoreApplication::translate( "Processing", "Duration" ); }
1324
1325 QString id() const override { return u"duration"_s; }
1326
1327 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDuration"_s; }
1328
1329 QString className() const override { return u"QgsProcessingParameterDuration"_s; }
1330
1331 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1332
1333 QStringList acceptedStringValues() const override
1334 {
1335 return QStringList()
1336 << QObject::tr( "A numeric value (unit type set by algorithms)" )
1337 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1338 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1339 }
1340
1341 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1342};
1343
1352{
1353 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterScale( name ); }
1354
1355 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a map scale." ); }
1356
1357 QString name() const override { return QCoreApplication::translate( "Processing", "Scale" ); }
1358
1359 QString id() const override { return u"scale"_s; }
1360
1361 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterScale"_s; }
1362
1363 QString className() const override { return u"QgsProcessingParameterScale"_s; }
1364
1365 QStringList acceptedPythonTypes() const override { return QStringList() << u"int: scale denominator"_s << u"float: scale denominator"_s << u"QgsProperty"_s; }
1366
1367 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A numeric value representing the scale denominator" ); }
1368
1369 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1370};
1371
1380{
1381 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterBand( name ); }
1382
1383 QString description() const override { return QCoreApplication::translate( "Processing", "A raster band parameter, for selecting an existing band from a raster source." ); }
1384
1385 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Band" ); }
1386
1387 QString id() const override { return u"band"_s; }
1388
1389 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterBand"_s; }
1390
1391 QString className() const override { return u"QgsProcessingParameterBand"_s; }
1392
1393 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"QgsProperty"_s; }
1394
1395 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Integer value representing an existing raster band number" ); }
1396
1397 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterBand::typeName() << QgsProcessingParameterNumber::typeName(); }
1398
1399 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputNumber::typeName() << QgsProcessingOutputVariant::typeName(); }
1400};
1401
1410{
1411 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFeatureSink( name ); }
1412
1414 {
1417 return flags;
1418 }
1419
1420 QString description() const override { return QCoreApplication::translate( "Processing", "A feature sink destination parameter." ); }
1421
1422 QString name() const override { return QCoreApplication::translate( "Processing", "Feature Sink" ); }
1423
1424 QString id() const override { return u"sink"_s; }
1425
1426 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFeatureSink"_s; }
1427
1428 QString className() const override { return u"QgsProcessingParameterFeatureSink"_s; }
1429
1430 QStringList acceptedPythonTypes() const override
1431 {
1432 return QStringList()
1433 << QObject::tr( "str: destination vector file, e.g. 'd:/test.shp'" )
1434 << QObject::tr( "str: 'memory:' to store result in temporary memory layer" )
1435 << QObject::tr( "str: using vector provider ID prefix and destination URI, e.g. 'postgres:…' to store result in PostGIS table" )
1436 << u"QgsProcessingOutputLayerDefinition"_s
1437 << u"QgsProperty"_s;
1438 }
1439
1440 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector layer" ); }
1441
1442 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
1443};
1444
1453{
1454 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterLayout( name ); }
1455
1456 QString description() const override { return QCoreApplication::translate( "Processing", "A print layout parameter." ); }
1457
1458 QString name() const override { return QCoreApplication::translate( "Processing", "Print Layout" ); }
1459
1460 QString id() const override { return u"layout"_s; }
1461
1462 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterLayout"_s; }
1463
1464 QString className() const override { return u"QgsProcessingParameterLayout"_s; }
1465
1466 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: name of print layout in current project" ) << u"QgsProperty"_s; }
1467
1468 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of print layout in current project" ); }
1469
1470 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterLayout::typeName() << QgsProcessingParameterString::typeName(); }
1471
1472 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1473};
1474
1483{
1484 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterLayoutItem( name ); }
1485
1486 QString description() const override { return QCoreApplication::translate( "Processing", "A print layout item parameter." ); }
1487
1488 QString name() const override { return QCoreApplication::translate( "Processing", "Print Layout Item" ); }
1489
1490 QString id() const override { return u"layoutitem"_s; }
1491
1492 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterLayoutItem"_s; }
1493
1494 QString className() const override { return u"QgsProcessingParameterLayoutItem"_s; }
1495
1496 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: UUID of print layout item" ) << QObject::tr( "str: id of print layout item" ) << u"QgsProperty"_s; }
1497
1498 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "UUID or item id of layout item" ); }
1499
1500 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterLayoutItem::typeName() << QgsProcessingParameterString::typeName(); }
1501
1502 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1503};
1504
1513{
1514 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterColor( name ); }
1515
1516 QString description() const override { return QCoreApplication::translate( "Processing", "A color parameter." ); }
1517
1518 QString name() const override { return QCoreApplication::translate( "Processing", "Color" ); }
1519
1520 QString id() const override { return u"color"_s; }
1521
1522 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterColor"_s; }
1523
1524 QString className() const override { return u"QgsProcessingParameterColor"_s; }
1525
1526 QStringList acceptedPythonTypes() const override
1527 {
1528 return QStringList() << QObject::tr( "str: string representation of color, e.g #ff0000 or rgba(200,100,50,0.8)" ) << u"QColor"_s << u"QgsProperty"_s;
1529 }
1530
1531 QStringList acceptedStringValues() const override
1532 {
1533 return QStringList()
1534 << QObject::tr( "String representation of color, e.g #ff0000 or rgba(200,100,50,0.8)" )
1535 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1536 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1537 }
1538
1539 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterColor::typeName() << QgsProcessingParameterString::typeName(); }
1540
1541 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1542
1543 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1544};
1545
1554{
1555 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterCoordinateOperation( name ); }
1556
1557 QString description() const override { return QCoreApplication::translate( "Processing", "A coordinate operation parameter." ); }
1558
1559 QString name() const override { return QCoreApplication::translate( "Processing", "Coordinate Operation" ); }
1560
1561 QString id() const override { return u"coordinateoperation"_s; }
1562
1563 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterCoordinateOperation"_s; }
1564
1565 QString className() const override { return u"QgsProcessingParameterCoordinateOperation"_s; }
1566
1567 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: string representation of a Proj coordinate operation" ); }
1568
1569 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "String representation of Proj coordinate operation" ); }
1570
1572
1573 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1574};
1575
1584{
1585 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMapTheme( name ); }
1586
1587 QString description() const override { return QCoreApplication::translate( "Processing", "A map theme parameter." ); }
1588
1589 QString name() const override { return QCoreApplication::translate( "Processing", "Map Theme" ); }
1590
1591 QString id() const override { return u"maptheme"_s; }
1592
1593 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMapTheme"_s; }
1594
1595 QString className() const override { return u"QgsProcessingParameterMapTheme"_s; }
1596
1597 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: name of an existing map theme" ) << u"QgsProperty"_s; }
1598
1599 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of an existing map theme" ); }
1600
1601 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterExpression::typeName(); }
1602
1603 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1604};
1605
1614{
1615 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDateTime( name ); }
1616
1617 QString description() const override { return QCoreApplication::translate( "Processing", "A datetime parameter, including datetime, date or time values." ); }
1618
1619 QString name() const override { return QCoreApplication::translate( "Processing", "Datetime" ); }
1620
1621 QString id() const override { return u"datetime"_s; }
1622
1623 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDateTime"_s; }
1624
1625 QString className() const override { return u"QgsProcessingParameterDateTime"_s; }
1626
1627 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QDateTime"_s << u"QDate"_s << u"QTime"_s << u"QgsProperty"_s; }
1628
1629 QStringList acceptedStringValues() const override
1630 {
1631 return QStringList()
1632 << QObject::tr( "A datetime value in ISO format" )
1633 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1634 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1635 }
1636
1637 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterDateTime::typeName() << QgsProcessingParameterString::typeName(); }
1638
1639 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1640
1641 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
1642};
1643
1652{
1653 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterProviderConnection( name, QString(), QString() ); }
1654
1655 QString description() const override { return QCoreApplication::translate( "Processing", "A connection name parameter, for registered database connections." ); }
1656
1657 QString name() const override { return QCoreApplication::translate( "Processing", "Connection Name" ); }
1658
1659 QString id() const override { return u"providerconnection"_s; }
1660
1661 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterProviderConnection"_s; }
1662
1663 QString className() const override { return u"QgsProcessingParameterProviderConnection"_s; }
1664
1665 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1666
1667 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of registered database connection" ); }
1668
1669 QStringList acceptedParameterTypes() const override
1670 {
1672 }
1673
1674 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1675};
1676
1685{
1686 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDatabaseSchema( name, QString(), QString() ); }
1687
1688 QString description() const override { return QCoreApplication::translate( "Processing", "A database schema parameter." ); }
1689
1690 QString name() const override { return QCoreApplication::translate( "Processing", "Database Schema" ); }
1691
1692 QString id() const override { return u"databaseschema"_s; }
1693
1694 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDatabaseSchema"_s; }
1695
1696 QString className() const override { return u"QgsProcessingParameterDatabaseSchema"_s; }
1697
1698 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1699
1700 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of existing database schema" ); }
1701
1702 QStringList acceptedParameterTypes() const override
1703 {
1705 }
1706
1707 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1708};
1709
1718{
1719 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDatabaseTable( name, QString(), QString(), QString() ); }
1720
1721 QString description() const override { return QCoreApplication::translate( "Processing", "A database table parameter." ); }
1722
1723 QString name() const override { return QCoreApplication::translate( "Processing", "Database Table" ); }
1724
1725 QString id() const override { return u"databasetable"_s; }
1726
1727 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDatabaseTable"_s; }
1728
1729 QString className() const override { return u"QgsProcessingParameterDatabaseTable"_s; }
1730
1731 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1732
1733 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of existing database table" ); }
1734
1735 QStringList acceptedParameterTypes() const override
1736 {
1738 }
1739
1740 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1741};
1742
1751{
1752 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudLayer( name ); }
1753
1754 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud layer parameter." ); }
1755
1756 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Layer" ); }
1757
1758 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudLayer"_s; }
1759
1760 QString className() const override { return u"QgsProcessingParameterPointCloudLayer"_s; }
1761
1762 QString id() const override { return u"pointcloud"_s; }
1763
1764 QStringList acceptedPythonTypes() const override
1765 {
1766 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsPointCloudLayer"_s;
1767 }
1768
1769 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a point cloud layer" ); }
1770
1771 QStringList acceptedParameterTypes() const override
1772 {
1773 return QStringList()
1778 }
1779
1780 QStringList acceptedOutputTypes() const override
1781 {
1782 return QStringList()
1788 }
1789
1790 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1791};
1792
1801{
1802 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterAnnotationLayer( name ); }
1803
1804 QString description() const override { return QCoreApplication::translate( "Processing", "An annotation layer parameter." ); }
1805
1806 QString name() const override { return QCoreApplication::translate( "Processing", "Annotation Layer" ); }
1807
1808 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterAnnotationLayer"_s; }
1809
1810 QString className() const override { return u"QgsProcessingParameterAnnotationLayer"_s; }
1811
1812 QString id() const override { return u"annotation"_s; }
1813
1814 QStringList acceptedPythonTypes() const override
1815 {
1816 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "\"main\": main annotation layer for a project" ) << u"QgsAnnotationLayer"_s;
1817 }
1818
1819 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Layer ID for an annotation layer, or \"main\" for the main annotation layer in a project." ); }
1820
1821 QStringList acceptedParameterTypes() const override
1822 {
1823 return QStringList()
1828 }
1829
1830 QStringList acceptedOutputTypes() const override
1831 {
1833 }
1834
1835 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1836};
1837
1847{
1848 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudDestination( name ); }
1849
1850 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud layer destination parameter." ); }
1851
1852 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Destination" ); }
1853
1854 QString id() const override { return u"pointCloudDestination"_s; }
1855
1856 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudDestination"_s; }
1857
1858 QString className() const override { return u"QgsProcessingParameterPointCloudDestination"_s; }
1859
1861 {
1864 return flags;
1865 }
1866
1867 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
1868
1869 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new point cloud layer" ); }
1870
1871 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
1872};
1873
1882{
1883 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudAttribute( name ); }
1884
1885 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud attribute parameter, for selecting an attribute from a point cloud source." ); }
1886
1887 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Attribute" ); }
1888
1889 QString id() const override { return u"attribute"_s; }
1890
1891 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudAttribute"_s; }
1892
1893 QString className() const override { return u"QgsProcessingParameterPointCloudAttribute"_s; }
1894
1895 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1896
1897 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "The name of an attribute" ) << QObject::tr( "; delimited list of attribute names" ); }
1898
1900
1901 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1902};
1903
1913{
1914 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorTileDestination( name ); }
1915
1916 QString description() const override { return QCoreApplication::translate( "Processing", "A vector tiles layer destination parameter." ); }
1917
1918 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Tile Destination" ); }
1919
1920 QString id() const override { return u"vectorTileDestination"_s; }
1921
1922 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorTileDestination"_s; }
1923
1924 QString className() const override { return u"QgsProcessingParameterVectorTileDestination"_s; }
1925
1927 {
1930 return flags;
1931 }
1932
1933 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
1934
1935 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector tile layer" ); }
1936
1937 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
1938};
1939
1940#endif // QGSPROCESSINGPARAMETERTYPEIMPL_H
@ ExposeToModeler
Is this parameter available in the modeler. Is set to on by default.
Definition qgis.h:3854
QFlags< ProcessingParameterTypeFlag > ProcessingParameterTypeFlags
Flags which dictate the behavior of Processing parameter types.
Definition qgis.h:3868
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
An annotation layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for area values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A boolean parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A color parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate operation parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate reference system parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A database schema parameter for processing algorithms, allowing users to select from existing schemas...
static QString typeName()
Returns the type name for the parameter class.
A database table name parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A datetime (or pure date or time) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
Base class for the definition of processing parameters.
A double numeric parameter for distance values.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for duration values.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A feature sink output for processing algorithms.
An input feature source (such as vector layers) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
An input file or folder parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
A geometry parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A print layout item parameter, allowing users to select a particular item from a print layout.
static QString typeName()
Returns the type name for the parameter class.
A print layout parameter, allowing users to select a print layout.
static QString typeName()
Returns the type name for the parameter class.
A map layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A map theme parameter for processing algorithms, allowing users to select an existing map theme from ...
A table (matrix) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A mesh layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
static QString typeName()
Returns the type name for the parameter class.
A numeric parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer attribute parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
A point cloud layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A data provider connection parameter for processing algorithms, allowing users to select from availab...
static QString typeName()
Returns the type name for the parameter class.
A numeric range parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
A raster layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
An annotation layer parameter for processing algorithms.
An area parameter for processing algorithms.
An authentication configuration parameter for processing algorithms.
A raster band parameter for Processing algorithms.
A boolean parameter for processing algorithms.
A color parameter for Processing algorithms.
A coordinate operation parameter for Processing algorithms.
A crs parameter for processing algorithms.
A database schema name parameter for processing algorithms.
A database table name parameter for processing algorithms.
A datetime parameter for processing algorithms.
A common generic type for destination parameter, for specifying the destination path for a vector lay...
A distance parameter for processing algorithms.
A duration parameter for processing algorithms.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
An expression parameter for processing algorithms.
A rectangular map extent parameter for processing algorithms.
A feature sink parameter for Processing algorithms.
An input feature source (such as vector layers) parameter for processing algorithms.
A vector layer or feature source field parameter for processing algorithms.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
An input file or folder parameter for processing algorithms.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
A geometry parameter for processing algorithms.
A print layout item parameter for Processing algorithms.
A print layout parameter for Processing algorithms.
A generic map layer parameter for processing algorithms.
A map theme parameter for Processing algorithms.
A table (matrix) parameter for processing algorithms.
A mesh layer parameter for processing algorithms.
A parameter for processing algorithms which accepts multiple map layers.
A numeric parameter for processing algorithms.
A point cloud layer attribute parameter for Processing algorithms.
A pointcloud layer destination parameter, for specifying the destination path for a point cloud layer...
A point cloud layer parameter for processing algorithms.
A point parameter for processing algorithms.
A provider connection name parameter for processing algorithms.
A numeric range parameter for processing algorithms.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
A raster layer parameter for processing algorithms.
A scale parameter for processing algorithms.
A string parameter for processing algorithms.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
A vector layer parameter for processing algorithms.
A vector tile layer destination parameter, for specifying the destination path for a vector tile laye...
A volume parameter for processing algorithms.
Makes metadata of processing parameters available.
virtual QString name() const =0
A human readable and translatable short name for this parameter type.
virtual QStringList acceptedPythonTypes() const
Returns a list of the Python data types accepted as values for the parameter.
virtual QgsProcessingParameterDefinition * create(const QString &name) const =0
Creates a new parameter of this type.
virtual QString description() const =0
A human readable and translatable description for this parameter type.
virtual QStringList acceptedOutputTypes() const =0
Returns a list of compatible Processing output types for inputs for this parameter type.
virtual QColor modelColor() const
Returns the color to use for the parameter in model designer windows.
virtual QString id() const =0
A static id for this type which will be used for storing this parameter type.
virtual QString className() const
Returns the corresponding class name for the parameter type.
virtual QList< int > acceptedDataTypes(const QgsProcessingParameterDefinition *parameter) const
Returns a list of compatible Processing data types for inputs for this parameter type for the specifi...
virtual QStringList acceptedParameterTypes() const =0
Returns a list of compatible Processing parameter types for inputs for this parameter type.
virtual Qgis::ProcessingParameterTypeFlags flags() const
Determines if this parameter is available in the modeler.
virtual QStringList acceptedStringValues() const
Returns a descriptive list of the possible string values acceptable for the parameter.
virtual QString pythonImportString() const
Returns a valid Python import string for importing the corresponding parameter type,...
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
A vector layer (with or without geometry) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector tile layer destination parameter, for specifying the destination path for a vector tile laye...
A double numeric parameter for volume values.
static QString typeName()
Returns the type name for the parameter class.
#define SIP_FACTORY
Definition qgis_sip.h:83