QGIS API Documentation 4.3.0-Master (96c7fa699b4)
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
6 email : matthias@opengis.ch
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"
25
26#include <QCoreApplication>
27#include <QString>
28
29#define SIP_NO_FILE
30
31using namespace Qt::StringLiterals;
32
33
42{
43 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRasterLayer( name ); }
44
45 QString description() const override { return QCoreApplication::translate( "Processing", "A raster layer parameter." ); }
46
47 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Layer" ); }
48
49 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRasterLayer"_s; }
50
51 QString className() const override { return u"QgsProcessingParameterRasterLayer"_s; }
52
53 QString id() const override { return u"raster"_s; }
54
55 QStringList acceptedPythonTypes() const override
56 {
57 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;
58 }
59
60 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a raster layer" ); }
61
62 QStringList acceptedParameterTypes() const override
63 {
64 return QStringList()
69 }
70
71 QStringList acceptedOutputTypes() const override
72 {
73 return QStringList()
79 }
80
81 QColor modelColor() const override { return QColor( 0, 180, 180 ); /* turquoise */ };
82};
83
92{
93 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMeshLayer( name ); }
94
95 QString description() const override { return QCoreApplication::translate( "Processing", "A mesh layer parameter." ); }
96
97 QString name() const override { return QCoreApplication::translate( "Processing", "Mesh Layer" ); }
98
99 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMeshLayer"_s; }
100
101 QString className() const override { return u"QgsProcessingParameterMeshLayer"_s; }
102
103 QString id() const override { return u"mesh"_s; }
104
105 QStringList acceptedPythonTypes() const override
106 {
107 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsMeshLayer"_s;
108 }
109
110 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a mesh layer" ); }
111
112 QStringList acceptedParameterTypes() const override
113 {
115 }
116
117 QStringList acceptedOutputTypes() const override
118 {
119 return QStringList()
121 // TODO << QgsProcessingOutputMeshLayer::typeName()
125 }
126
127 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
128};
129
138{
139 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorLayer( name ); }
140
141 QString description() const override
142 {
143 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." );
144 }
145
146 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Layer" ); }
147
148 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorLayer"_s; }
149
150 QString className() const override { return u"QgsProcessingParameterVectorLayer"_s; }
151
152 QString id() const override { return u"vector"_s; }
153
154 QStringList acceptedPythonTypes() const override
155 {
156 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsProperty"_s << u"QgsVectorLayer"_s;
157 }
158
159 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector layer" ); }
160
161 QStringList acceptedParameterTypes() const override
162 {
163 return QStringList()
168 }
169
170 QStringList acceptedOutputTypes() const override
171 {
172 return QStringList()
178 }
179
180 QList<int> acceptedDataTypes( const QgsProcessingParameterDefinition *parameter ) const override
181 {
182 if ( const QgsProcessingParameterVectorLayer *param = dynamic_cast<const QgsProcessingParameterVectorLayer *>( parameter ) )
183 return param->dataTypes();
184 else
185 return QList<int>();
186 }
187
188 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
189};
190
199{
200 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMapLayer( name ); }
201
202 QString description() const override { return QCoreApplication::translate( "Processing", "A generic map layer parameter, which accepts either vector or raster layers." ); }
203
204 QString name() const override { return QCoreApplication::translate( "Processing", "Map Layer" ); }
205
206 QString id() const override { return u"layer"_s; }
207
208 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMapLayer"_s; }
209
210 QString className() const override { return u"QgsProcessingParameterMapLayer"_s; }
211
212 QStringList acceptedPythonTypes() const override
213 {
214 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;
215 }
216
217 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector, raster or mesh layer" ); }
218
219 QStringList acceptedParameterTypes() const override
220 {
221 return QStringList()
230 }
231
232 QStringList acceptedOutputTypes() const override
233 {
234 return QStringList()
242 }
243
244 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
245};
246
255{
256 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterBoolean( name ); }
257
258 QString description() const override { return QCoreApplication::translate( "Processing", "A boolean parameter, for true/false values." ); }
259
260 QString name() const override { return QCoreApplication::translate( "Processing", "Boolean" ); }
261
262 QString id() const override { return u"boolean"_s; }
263
264 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterBoolean"_s; }
265
266 QString className() const override { return u"QgsProcessingParameterBoolean"_s; }
267
268 QStringList acceptedPythonTypes() const override { return QStringList() << u"bool"_s << u"int"_s << u"str"_s << u"QgsProperty"_s; }
269
270 QStringList acceptedStringValues() const override
271 {
272 return QStringList()
273 << QObject::tr( "1 for true/yes" )
274 << QObject::tr( "0 for false/no" )
275 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
276 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
277 }
278
279 QStringList acceptedParameterTypes() const override
280 {
281 //pretty much everything is compatible here and can be converted to a bool!
282 return QStringList()
303 }
304 QStringList acceptedOutputTypes() const override
305 {
306 return QStringList()
316 }
317
318 QColor modelColor() const override { return QColor( 51, 201, 28 ); /* green */ };
319};
320
329{
330 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterExpression( name ); }
331
332 QString description() const override { return QCoreApplication::translate( "Processing", "An expression parameter, to add custom expressions based on layer fields." ); }
333
334 QString name() const override { return QCoreApplication::translate( "Processing", "Expression" ); }
335
336 QString id() const override { return u"expression"_s; }
337
338 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterExpression"_s; }
339
340 QString className() const override { return u"QgsProcessingParameterExpression"_s; }
341
342 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
343
344 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A valid QGIS expression string, e.g \"road_name\" = 'MAIN RD'" ); }
345
346 QStringList acceptedParameterTypes() const override
347 {
348 return QStringList()
357 }
358
359 QStringList acceptedOutputTypes() const override
360 {
362 }
363
364 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
365};
366
375{
376 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterCrs( name ); }
377
378 QString description() const override { return QCoreApplication::translate( "Processing", "A coordinate reference system (CRS) input parameter." ); }
379
380 QString name() const override { return QCoreApplication::translate( "Processing", "CRS" ); }
381
382 QString id() const override { return u"crs"_s; }
383
384 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterCrs"_s; }
385
386 QString className() const override { return u"QgsProcessingParameterCrs"_s; }
387
388 QStringList acceptedPythonTypes() const override
389 {
390 return QStringList()
391 << u"str: 'ProjectCrs'"_s
392 << QObject::tr( "str: CRS auth ID (e.g. 'EPSG:3111')" )
393 << QObject::tr( "str: CRS PROJ4 (e.g. 'PROJ4:…')" )
394 << QObject::tr( "str: CRS WKT (e.g. 'WKT:…')" )
395 << QObject::tr( "str: layer ID. CRS of layer is used." )
396 << QObject::tr( "str: layer name. CRS of layer is used." )
397 << QObject::tr( "str: layer source. CRS of layer is used." )
398 << QObject::tr( "QgsCoordinateReferenceSystem" )
399 << QObject::tr( "QgsMapLayer: CRS of layer is used" )
400 << QObject::tr( "QgsProcessingFeatureSourceDefinition: CRS of source is used" )
401 << u"QgsProperty"_s;
402 }
403
404 QStringList acceptedStringValues() const override
405 {
406 return QStringList()
407 << QObject::tr( "CRS as an auth ID (e.g. 'EPSG:3111')" )
408 << QObject::tr( "CRS as a PROJ4 string (e.g. 'PROJ4:…')" )
409 << QObject::tr( "CRS as a WKT string (e.g. 'WKT:…')" )
410 << QObject::tr( "Path to a layer. The CRS of the layer is used." );
411 }
412
413 QStringList acceptedParameterTypes() const override
414 {
415 return QStringList()
426 }
427
428 QStringList acceptedOutputTypes() const override
429 {
430 return QStringList()
437 }
438
439 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
440};
441
450{
451 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRange( name ); }
452
453 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric range parameter for processing algorithms." ); }
454
455 QString name() const override { return QCoreApplication::translate( "Processing", "Range" ); }
456
457 QString id() const override { return u"range"_s; }
458
459 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRange"_s; }
460
461 QString className() const override { return u"QgsProcessingParameterRange"_s; }
462
463 QStringList acceptedPythonTypes() const override
464 {
465 return QStringList()
466 << QObject::tr( "list[float]: list of 2 float values" )
467 << QObject::tr( "list[str]: list of strings representing floats" )
468 << QObject::tr( "str: as two comma delimited floats, e.g. '1,10'" )
469 << u"QgsProperty"_s;
470 }
471
472 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Two comma separated numeric values, e.g. '1,10'" ); }
473
474 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterRange::typeName() << QgsProcessingParameterString::typeName(); }
475
476 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
477
478 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
479};
480
489{
490 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPoint( name ); }
491
492 QString description() const override { return QCoreApplication::translate( "Processing", "A point geometry parameter." ); }
493
494 QString name() const override { return QCoreApplication::translate( "Processing", "Point" ); }
495
496 QString id() const override { return u"point"_s; }
497
498 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPoint"_s; }
499
500 QString className() const override { return u"QgsProcessingParameterPoint"_s; }
501
502 QStringList acceptedPythonTypes() const override
503 {
504 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;
505 }
506
507 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Point coordinate as an 'x,y' string, e.g. '1.5,10.1'" ); }
508
509 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterPoint::typeName() << QgsProcessingParameterString::typeName(); }
510
511 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
512
513 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
514};
515
524{
525 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterGeometry( name ); }
526
527 QString description() const override { return QCoreApplication::translate( "Processing", "A geometry parameter." ); }
528
529 QString name() const override { return QCoreApplication::translate( "Processing", "Geometry" ); }
530
531 QString id() const override { return u"geometry"_s; }
532
533 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterGeometry"_s; }
534
535 QString className() const override { return u"QgsProcessingParameterGeometry"_s; }
536
537 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: as Well-Known Text string (WKT)" ) << u"QgsGeometry"_s << u"QgsProperty"_s; }
538
539 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Well-Known Text string (WKT)" ); }
540
541 QStringList acceptedParameterTypes() const override
542 {
544 }
545
546 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
547
548 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
549};
550
559{
560 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterEnum( name ); }
561
562 QString description() const override { return QCoreApplication::translate( "Processing", "An enumerated type parameter." ); }
563
564 QString name() const override { return QCoreApplication::translate( "Processing", "Enum" ); }
565
566 QString id() const override { return u"enum"_s; }
567
568 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterEnum"_s; }
569
570 QString className() const override { return u"QgsProcessingParameterEnum"_s; }
571
572 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << QObject::tr( "str: as string representation of int, e.g. '1'" ) << u"QgsProperty"_s; }
573
574 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'" ); }
575
576 QStringList acceptedParameterTypes() const override
577 {
579 }
580
581 QStringList acceptedOutputTypes() const override
582 {
584 }
585
586 QColor modelColor() const override { return QColor( 152, 68, 201 ); /* purple */ };
587};
588
597{
598 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterExtent( name ); }
599
600 QString description() const override { return QCoreApplication::translate( "Processing", "A map extent parameter." ); }
601
602 QString name() const override { return QCoreApplication::translate( "Processing", "Extent" ); }
603
604 QString id() const override { return u"extent"_s; }
605
606 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterExtent"_s; }
607
608 QString className() const override { return u"QgsProcessingParameterExtent"_s; }
609
610 QStringList acceptedPythonTypes() const override
611 {
612 return QStringList()
613 << QObject::tr( "str: as comma delimited list of x min, x max, y min, y max. E.g. '4,10,101,105'" )
614 << QObject::tr( "str: layer ID. Extent of layer is used." )
615 << QObject::tr( "str: layer name. Extent of layer is used." )
616 << QObject::tr( "str: layer source. Extent of layer is used." )
617 << QObject::tr( "QgsMapLayer: Extent of layer is used" )
618 << QObject::tr( "QgsProcessingFeatureSourceDefinition: Extent of source is used" )
619 << u"QgsProperty"_s
620 << u"QgsRectangle"_s
621 << u"QgsReferencedRectangle"_s
622 << u"QgsGeometry: bounding box of geometry is used"_s;
623 }
624
625 QStringList acceptedStringValues() const override
626 {
627 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." );
628 }
629
630 QStringList acceptedParameterTypes() const override
631 {
632 return QStringList()
642 }
643
644 QStringList acceptedOutputTypes() const override
645 {
646 return QStringList()
653 }
654
655 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
656};
657
666{
667 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMatrix( name ); }
668
669 QString description() const override { return QCoreApplication::translate( "Processing", "A table (matrix) parameter for processing algorithms." ); }
670
671 QString name() const override { return QCoreApplication::translate( "Processing", "Matrix" ); }
672
673 QString id() const override { return u"matrix"_s; }
674
675 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMatrix"_s; }
676
677 QString className() const override { return u"QgsProcessingParameterMatrix"_s; }
678
679 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: as comma delimited list of values" ) << u"list"_s << u"QgsProperty"_s; }
680
681 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A comma delimited list of values" ); }
682
683 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterMatrix::typeName(); }
684
685 QStringList acceptedOutputTypes() const override { return QStringList(); }
686
687 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
688};
689
698{
699 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFile( name ); }
700
701 QString description() const override { return QCoreApplication::translate( "Processing", "A file or folder parameter, for use with non-map layer file sources or folders." ); }
702
703 QString name() const override { return QCoreApplication::translate( "Processing", "File/Folder" ); }
704
705 QString id() const override { return u"file"_s; }
706
707 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFile"_s; }
708
709 QString className() const override { return u"QgsProcessingParameterFile"_s; }
710
711 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
712
713 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a file" ); }
714
715 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
716
717 QStringList acceptedOutputTypes() const override
718 {
719 return QStringList()
727 }
728
729 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
730};
731
740{
741 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterField( name ); }
742
743 QString description() const override { return QCoreApplication::translate( "Processing", "A vector field parameter, for selecting an existing field from a vector source." ); }
744
745 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Field" ); }
746
747 QString id() const override { return u"field"_s; }
748
749 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterField"_s; }
750
751 QString className() const override { return u"QgsProcessingParameterField"_s; }
752
753 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
754
755 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "The name of an existing field" ) << QObject::tr( "; delimited list of existing field names" ); }
756
757 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterField::typeName() << QgsProcessingParameterString::typeName(); }
758
759 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
760};
761
762
789
799{
800 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorDestination( name ); }
801
802 QString description() const override { return QCoreApplication::translate( "Processing", "A vector layer destination parameter." ); }
803
804 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Destination" ); }
805
806 QString id() const override { return u"vectorDestination"_s; }
807
808 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorDestination"_s; }
809
810 QString className() const override { return u"QgsProcessingParameterVectorDestination"_s; }
811
813 {
816 return flags;
817 }
818
819 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
820
821 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector layer" ); }
822
823 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
824};
825
835{
836 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFileDestination( name ); }
837
838 QString description() const override { return QCoreApplication::translate( "Processing", "A generic file based destination parameter." ); }
839
840 QString name() const override { return QCoreApplication::translate( "Processing", "File Destination" ); }
841
842 QString id() const override { return u"fileDestination"_s; }
843
844 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFileDestination"_s; }
845
846 QString className() const override { return u"QgsProcessingParameterFileDestination"_s; }
847
849 {
852 return flags;
853 }
854
855 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
856
857 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new file" ); }
858
859 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
860
861 QStringList acceptedOutputTypes() const override
862 {
863 return QStringList()
870 }
871
872 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
873};
874
885{
886 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFolderDestination( name ); }
887
888 QString description() const override { return QCoreApplication::translate( "Processing", "A folder destination parameter." ); }
889
890 QString name() const override { return QCoreApplication::translate( "Processing", "Folder Destination" ); }
891
892 QString id() const override { return u"folderDestination"_s; }
893
894 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFolderDestination"_s; }
895
896 QString className() const override { return u"QgsProcessingParameterFolderDestination"_s; }
897
899 {
902 return flags;
903 }
904
905 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
906
907 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for an existing or new folder" ); }
908
909 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterFile::typeName(); }
910
911 QStringList acceptedOutputTypes() const override
912 {
914 }
915
916 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
917};
918
928{
929 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterRasterDestination( name ); }
930
931 QString description() const override { return QCoreApplication::translate( "Processing", "A raster layer destination parameter." ); }
932
933 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Destination" ); }
934
935 QString id() const override { return u"rasterDestination"_s; }
936
937 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterRasterDestination"_s; }
938
939 QString className() const override { return u"QgsProcessingParameterRasterDestination"_s; }
940
942 {
945 return flags;
946 }
947
948 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
949
950 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new raster layer" ); }
951
952 QColor modelColor() const override { return QColor( 0, 180, 180 ); /* turquoise */ };
953};
954
963{
964 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterString( name ); }
965
966 QString description() const override { return QCoreApplication::translate( "Processing", "A freeform string parameter." ); }
967
968 QString name() const override { return QCoreApplication::translate( "Processing", "String" ); }
969
970 QString id() const override { return u"string"_s; }
971
972 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterString"_s; }
973
974 QString className() const override { return u"QgsProcessingParameterString"_s; }
975
976 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
977
978 QStringList acceptedStringValues() const override
979 {
980 return QStringList()
981 << QObject::tr( "String value" )
982 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
983 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
984 }
985
986 QStringList acceptedParameterTypes() const override
987 {
988 return QStringList()
1002 }
1003
1004 QStringList acceptedOutputTypes() const override
1005 {
1006 return QStringList()
1012 }
1013
1014 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
1015};
1016
1025{
1026 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterAuthConfig( name ); }
1027
1028 QString description() const override { return QCoreApplication::translate( "Processing", "An authentication configuration parameter." ); }
1029
1030 QString name() const override { return QCoreApplication::translate( "Processing", "Authentication Configuration" ); }
1031
1032 QString id() const override { return u"authcfg"_s; }
1033
1034 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterAuthConfig"_s; }
1035
1036 QString className() const override { return u"QgsProcessingParameterAuthConfig"_s; }
1037
1038 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s; }
1039
1040 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "An existing QGIS authentication ID string" ); }
1041
1042 QStringList acceptedParameterTypes() const override
1043 {
1045 }
1046
1047 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1048};
1049
1058{
1059 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMultipleLayers( name ); }
1060
1061 QString description() const override { return QCoreApplication::translate( "Processing", "An input allowing selection of multiple sources, including multiple map layers or file sources." ); }
1062
1063 QString name() const override { return QCoreApplication::translate( "Processing", "Multiple Input" ); }
1064
1065 QString id() const override { return u"multilayer"_s; }
1066
1067 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMultipleLayers"_s; }
1068
1069 QString className() const override { return u"QgsProcessingParameterMultipleLayers"_s; }
1070
1071 QStringList acceptedPythonTypes() const override
1072 {
1073 return QStringList()
1074 << QObject::tr( "list[str]: list of layer IDs" )
1075 << QObject::tr( "list[str]: list of layer names" )
1076 << QObject::tr( "list[str]: list of layer sources" )
1077 << u"list[QgsMapLayer]"_s
1078 << u"QgsProperty"_s;
1079 }
1080
1081 QStringList acceptedParameterTypes() const override
1082 {
1083 return QStringList()
1093 }
1094 QStringList acceptedOutputTypes() const override
1095 {
1096 return QStringList()
1106 }
1107
1108 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1109};
1110
1119{
1120 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFeatureSource( name ); }
1121
1122 QString description() const override { return QCoreApplication::translate( "Processing", "A vector feature parameter, e.g. for algorithms which operate on the features within a layer." ); }
1123
1124 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Features" ); }
1125
1126 QString id() const override { return u"source"_s; }
1127
1128 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFeatureSource"_s; }
1129
1130 QString className() const override { return u"QgsProcessingParameterFeatureSource"_s; }
1131
1132 QStringList acceptedPythonTypes() const override
1133 {
1134 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;
1135 }
1136
1137 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a vector layer" ); }
1138
1139 QStringList acceptedParameterTypes() const override
1140 {
1141 return QStringList()
1147 }
1148
1149 QStringList acceptedOutputTypes() const override
1150 {
1151 return QStringList()
1157 }
1158
1159 QList<int> acceptedDataTypes( const QgsProcessingParameterDefinition *parameter ) const override
1160 {
1161 if ( const QgsProcessingParameterFeatureSource *param = dynamic_cast<const QgsProcessingParameterFeatureSource *>( parameter ) )
1162 return param->dataTypes();
1163 else
1164 return QList<int>();
1165 }
1166
1167 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
1168};
1169
1178{
1179 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterNumber( name ); }
1180
1181 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter, including float or integer values." ); }
1182
1183 QString name() const override { return QCoreApplication::translate( "Processing", "Number" ); }
1184
1185 QString id() const override { return u"number"_s; }
1186
1187 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterNumber"_s; }
1188
1189 QString className() const override { return u"QgsProcessingParameterNumber"_s; }
1190
1191 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1192
1193 QStringList acceptedStringValues() const override
1194 {
1195 return QStringList()
1196 << QObject::tr( "A numeric value" )
1197 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1198 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1199 }
1200
1201 QStringList acceptedParameterTypes() const override
1202 {
1203 return QStringList()
1210 }
1211
1212 QStringList acceptedOutputTypes() const override
1213 {
1215 }
1216
1217 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1218};
1219
1228{
1229 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDistance( name ); }
1230
1231 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a distance measure." ); }
1232
1233 QString name() const override { return QCoreApplication::translate( "Processing", "Distance" ); }
1234
1235 QString id() const override { return u"distance"_s; }
1236
1237 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDistance"_s; }
1238
1239 QString className() const override { return u"QgsProcessingParameterDistance"_s; }
1240
1241 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1242
1243 QStringList acceptedStringValues() const override
1244 {
1245 return QStringList()
1246 << QObject::tr( "A numeric value" )
1247 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1248 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1249 }
1250
1251 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1252};
1253
1254
1263{
1264 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterArea( name ); }
1265
1266 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing an area measure." ); }
1267
1268 QString name() const override { return QCoreApplication::translate( "Processing", "Area" ); }
1269
1270 QString id() const override { return u"area"_s; }
1271
1272 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterArea"_s; }
1273
1274 QString className() const override { return u"QgsProcessingParameterArea"_s; }
1275
1276 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1277
1278 QStringList acceptedStringValues() const override
1279 {
1280 return QStringList()
1281 << QObject::tr( "A numeric value" )
1282 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1283 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1284 }
1285};
1286
1287
1296{
1297 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVolume( name ); }
1298
1299 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a volume measure." ); }
1300
1301 QString name() const override { return QCoreApplication::translate( "Processing", "Volume" ); }
1302
1303 QString id() const override { return u"volume"_s; }
1304
1305 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVolume"_s; }
1306
1307 QString className() const override { return u"QgsProcessingParameterVolume"_s; }
1308
1309 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1310
1311 QStringList acceptedStringValues() const override
1312 {
1313 return QStringList()
1314 << QObject::tr( "A numeric value" )
1315 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1316 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1317 }
1318};
1319
1320
1329{
1330 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDuration( name ); }
1331
1332 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a duration measure." ); }
1333
1334 QString name() const override { return QCoreApplication::translate( "Processing", "Duration" ); }
1335
1336 QString id() const override { return u"duration"_s; }
1337
1338 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDuration"_s; }
1339
1340 QString className() const override { return u"QgsProcessingParameterDuration"_s; }
1341
1342 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s << u"QgsProperty"_s; }
1343
1344 QStringList acceptedStringValues() const override
1345 {
1346 return QStringList()
1347 << QObject::tr( "A numeric value (unit type set by algorithms)" )
1348 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1349 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1350 }
1351
1352 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1353};
1354
1363{
1364 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterScale( name ); }
1365
1366 QString description() const override { return QCoreApplication::translate( "Processing", "A numeric parameter representing a map scale." ); }
1367
1368 QString name() const override { return QCoreApplication::translate( "Processing", "Scale" ); }
1369
1370 QString id() const override { return u"scale"_s; }
1371
1372 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterScale"_s; }
1373
1374 QString className() const override { return u"QgsProcessingParameterScale"_s; }
1375
1376 QStringList acceptedPythonTypes() const override { return QStringList() << u"int: scale denominator"_s << u"float: scale denominator"_s << u"QgsProperty"_s; }
1377
1378 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A numeric value representing the scale denominator" ); }
1379
1380 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1381};
1382
1391{
1392 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterBand( name ); }
1393
1394 QString description() const override { return QCoreApplication::translate( "Processing", "A raster band parameter, for selecting an existing band from a raster source." ); }
1395
1396 QString name() const override { return QCoreApplication::translate( "Processing", "Raster Band" ); }
1397
1398 QString id() const override { return u"band"_s; }
1399
1400 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterBand"_s; }
1401
1402 QString className() const override { return u"QgsProcessingParameterBand"_s; }
1403
1404 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"QgsProperty"_s; }
1405
1406 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Integer value representing an existing raster band number" ); }
1407
1408 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterBand::typeName() << QgsProcessingParameterNumber::typeName(); }
1409
1410 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputNumber::typeName() << QgsProcessingOutputVariant::typeName(); }
1411};
1412
1421{
1422 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterFeatureSink( name ); }
1423
1425 {
1428 return flags;
1429 }
1430
1431 QString description() const override { return QCoreApplication::translate( "Processing", "A feature sink destination parameter." ); }
1432
1433 QString name() const override { return QCoreApplication::translate( "Processing", "Feature Sink" ); }
1434
1435 QString id() const override { return u"sink"_s; }
1436
1437 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterFeatureSink"_s; }
1438
1439 QString className() const override { return u"QgsProcessingParameterFeatureSink"_s; }
1440
1441 QStringList acceptedPythonTypes() const override
1442 {
1443 return QStringList()
1444 << QObject::tr( "str: destination vector file, e.g. 'd:/test.shp'" )
1445 << QObject::tr( "str: 'memory:' to store result in temporary memory layer" )
1446 << QObject::tr( "str: using vector provider ID prefix and destination URI, e.g. 'postgres:…' to store result in PostGIS table" )
1447 << u"QgsProcessingOutputLayerDefinition"_s
1448 << u"QgsProperty"_s;
1449 }
1450
1451 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector layer" ); }
1452
1453 QColor modelColor() const override { return QColor( 122, 0, 47 ); /* burgundy */ };
1454};
1455
1464{
1465 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterLayout( name ); }
1466
1467 QString description() const override { return QCoreApplication::translate( "Processing", "A print layout parameter." ); }
1468
1469 QString name() const override { return QCoreApplication::translate( "Processing", "Print Layout" ); }
1470
1471 QString id() const override { return u"layout"_s; }
1472
1473 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterLayout"_s; }
1474
1475 QString className() const override { return u"QgsProcessingParameterLayout"_s; }
1476
1477 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: name of print layout in current project" ) << u"QgsProperty"_s; }
1478
1479 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of print layout in current project" ); }
1480
1481 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterLayout::typeName() << QgsProcessingParameterString::typeName(); }
1482
1483 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1484};
1485
1494{
1495 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterLayoutItem( name ); }
1496
1497 QString description() const override { return QCoreApplication::translate( "Processing", "A print layout item parameter." ); }
1498
1499 QString name() const override { return QCoreApplication::translate( "Processing", "Print Layout Item" ); }
1500
1501 QString id() const override { return u"layoutitem"_s; }
1502
1503 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterLayoutItem"_s; }
1504
1505 QString className() const override { return u"QgsProcessingParameterLayoutItem"_s; }
1506
1507 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; }
1508
1509 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "UUID or item id of layout item" ); }
1510
1511 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterLayoutItem::typeName() << QgsProcessingParameterString::typeName(); }
1512
1513 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1514};
1515
1524{
1525 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterColor( name ); }
1526
1527 QString description() const override { return QCoreApplication::translate( "Processing", "A color parameter." ); }
1528
1529 QString name() const override { return QCoreApplication::translate( "Processing", "Color" ); }
1530
1531 QString id() const override { return u"color"_s; }
1532
1533 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterColor"_s; }
1534
1535 QString className() const override { return u"QgsProcessingParameterColor"_s; }
1536
1537 QStringList acceptedPythonTypes() const override
1538 {
1539 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;
1540 }
1541
1542 QStringList acceptedStringValues() const override
1543 {
1544 return QStringList()
1545 << QObject::tr( "String representation of color, e.g #ff0000 or rgba(200,100,50,0.8)" )
1546 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1547 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1548 }
1549
1550 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterColor::typeName() << QgsProcessingParameterString::typeName(); }
1551
1552 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1553
1554 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
1555};
1556
1565{
1566 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterCoordinateOperation( name ); }
1567
1568 QString description() const override { return QCoreApplication::translate( "Processing", "A coordinate operation parameter." ); }
1569
1570 QString name() const override { return QCoreApplication::translate( "Processing", "Coordinate Operation" ); }
1571
1572 QString id() const override { return u"coordinateoperation"_s; }
1573
1574 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterCoordinateOperation"_s; }
1575
1576 QString className() const override { return u"QgsProcessingParameterCoordinateOperation"_s; }
1577
1578 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: string representation of a Proj coordinate operation" ); }
1579
1580 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "String representation of Proj coordinate operation" ); }
1581
1583
1584 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1585};
1586
1595{
1596 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterMapTheme( name ); }
1597
1598 QString description() const override { return QCoreApplication::translate( "Processing", "A map theme parameter." ); }
1599
1600 QString name() const override { return QCoreApplication::translate( "Processing", "Map Theme" ); }
1601
1602 QString id() const override { return u"maptheme"_s; }
1603
1604 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterMapTheme"_s; }
1605
1606 QString className() const override { return u"QgsProcessingParameterMapTheme"_s; }
1607
1608 QStringList acceptedPythonTypes() const override { return QStringList() << QObject::tr( "str: name of an existing map theme" ) << u"QgsProperty"_s; }
1609
1610 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of an existing map theme" ); }
1611
1612 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterString::typeName() << QgsProcessingParameterExpression::typeName(); }
1613
1614 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1615};
1616
1625{
1626 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDateTime( name ); }
1627
1628 QString description() const override { return QCoreApplication::translate( "Processing", "A datetime parameter, including datetime, date or time values." ); }
1629
1630 QString name() const override { return QCoreApplication::translate( "Processing", "Datetime" ); }
1631
1632 QString id() const override { return u"datetime"_s; }
1633
1634 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDateTime"_s; }
1635
1636 QString className() const override { return u"QgsProcessingParameterDateTime"_s; }
1637
1638 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QDateTime"_s << u"QDate"_s << u"QTime"_s << u"QgsProperty"_s; }
1639
1640 QStringList acceptedStringValues() const override
1641 {
1642 return QStringList()
1643 << QObject::tr( "A datetime value in ISO format" )
1644 << QObject::tr( "field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field" )
1645 << QObject::tr( "expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression" );
1646 }
1647
1648 QStringList acceptedParameterTypes() const override { return QStringList() << QgsProcessingParameterDateTime::typeName() << QgsProcessingParameterString::typeName(); }
1649
1650 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1651
1652 QColor modelColor() const override { return QColor( 255, 131, 23 ); /* orange */ };
1653};
1654
1663{
1664 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterProviderConnection( name, QString(), QString() ); }
1665
1666 QString description() const override { return QCoreApplication::translate( "Processing", "A connection name parameter, for registered database connections." ); }
1667
1668 QString name() const override { return QCoreApplication::translate( "Processing", "Connection Name" ); }
1669
1670 QString id() const override { return u"providerconnection"_s; }
1671
1672 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterProviderConnection"_s; }
1673
1674 QString className() const override { return u"QgsProcessingParameterProviderConnection"_s; }
1675
1676 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1677
1678 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of registered database connection" ); }
1679
1680 QStringList acceptedParameterTypes() const override
1681 {
1683 }
1684
1685 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1686};
1687
1696{
1697 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDatabaseSchema( name, QString(), QString() ); }
1698
1699 QString description() const override { return QCoreApplication::translate( "Processing", "A database schema parameter." ); }
1700
1701 QString name() const override { return QCoreApplication::translate( "Processing", "Database Schema" ); }
1702
1703 QString id() const override { return u"databaseschema"_s; }
1704
1705 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDatabaseSchema"_s; }
1706
1707 QString className() const override { return u"QgsProcessingParameterDatabaseSchema"_s; }
1708
1709 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1710
1711 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of existing database schema" ); }
1712
1713 QStringList acceptedParameterTypes() const override
1714 {
1716 }
1717
1718 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1719};
1720
1729{
1730 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterDatabaseTable( name, QString(), QString(), QString() ); }
1731
1732 QString description() const override { return QCoreApplication::translate( "Processing", "A database table parameter." ); }
1733
1734 QString name() const override { return QCoreApplication::translate( "Processing", "Database Table" ); }
1735
1736 QString id() const override { return u"databasetable"_s; }
1737
1738 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterDatabaseTable"_s; }
1739
1740 QString className() const override { return u"QgsProcessingParameterDatabaseTable"_s; }
1741
1742 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1743
1744 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Name of existing database table" ); }
1745
1746 QStringList acceptedParameterTypes() const override
1747 {
1749 }
1750
1751 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1752};
1753
1762{
1763 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudLayer( name ); }
1764
1765 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud layer parameter." ); }
1766
1767 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Layer" ); }
1768
1769 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudLayer"_s; }
1770
1771 QString className() const override { return u"QgsProcessingParameterPointCloudLayer"_s; }
1772
1773 QString id() const override { return u"pointcloud"_s; }
1774
1775 QStringList acceptedPythonTypes() const override
1776 {
1777 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "str: layer source" ) << u"QgsPointCloudLayer"_s;
1778 }
1779
1780 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path to a point cloud layer" ); }
1781
1782 QStringList acceptedParameterTypes() const override
1783 {
1784 return QStringList()
1789 }
1790
1791 QStringList acceptedOutputTypes() const override
1792 {
1793 return QStringList()
1799 }
1800
1801 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1802};
1803
1812{
1813 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterAnnotationLayer( name ); }
1814
1815 QString description() const override { return QCoreApplication::translate( "Processing", "An annotation layer parameter." ); }
1816
1817 QString name() const override { return QCoreApplication::translate( "Processing", "Annotation Layer" ); }
1818
1819 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterAnnotationLayer"_s; }
1820
1821 QString className() const override { return u"QgsProcessingParameterAnnotationLayer"_s; }
1822
1823 QString id() const override { return u"annotation"_s; }
1824
1825 QStringList acceptedPythonTypes() const override
1826 {
1827 return QStringList() << QObject::tr( "str: layer ID" ) << QObject::tr( "str: layer name" ) << QObject::tr( "\"main\": main annotation layer for a project" ) << u"QgsAnnotationLayer"_s;
1828 }
1829
1830 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Layer ID for an annotation layer, or \"main\" for the main annotation layer in a project." ); }
1831
1832 QStringList acceptedParameterTypes() const override
1833 {
1834 return QStringList()
1839 }
1840
1841 QStringList acceptedOutputTypes() const override
1842 {
1844 }
1845
1846 QColor modelColor() const override { return QColor( 137, 150, 171 ); /* cold gray */ };
1847};
1848
1858{
1859 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudDestination( name ); }
1860
1861 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud layer destination parameter." ); }
1862
1863 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Destination" ); }
1864
1865 QString id() const override { return u"pointCloudDestination"_s; }
1866
1867 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudDestination"_s; }
1868
1869 QString className() const override { return u"QgsProcessingParameterPointCloudDestination"_s; }
1870
1872 {
1875 return flags;
1876 }
1877
1878 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
1879
1880 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new point cloud layer" ); }
1881
1882 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
1883};
1884
1893{
1894 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterPointCloudAttribute( name ); }
1895
1896 QString description() const override { return QCoreApplication::translate( "Processing", "A point cloud attribute parameter, for selecting an attribute from a point cloud source." ); }
1897
1898 QString name() const override { return QCoreApplication::translate( "Processing", "Point Cloud Attribute" ); }
1899
1900 QString id() const override { return u"attribute"_s; }
1901
1902 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterPointCloudAttribute"_s; }
1903
1904 QString className() const override { return u"QgsProcessingParameterPointCloudAttribute"_s; }
1905
1906 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s; }
1907
1908 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "The name of an attribute" ) << QObject::tr( "; delimited list of attribute names" ); }
1909
1911
1912 QStringList acceptedOutputTypes() const override { return QStringList() << QgsProcessingOutputString::typeName() << QgsProcessingOutputVariant::typeName(); }
1913};
1914
1924{
1925 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterVectorTileDestination( name ); }
1926
1927 QString description() const override { return QCoreApplication::translate( "Processing", "A vector tiles layer destination parameter." ); }
1928
1929 QString name() const override { return QCoreApplication::translate( "Processing", "Vector Tile Destination" ); }
1930
1931 QString id() const override { return u"vectorTileDestination"_s; }
1932
1933 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterVectorTileDestination"_s; }
1934
1935 QString className() const override { return u"QgsProcessingParameterVectorTileDestination"_s; }
1936
1938 {
1941 return flags;
1942 }
1943
1944 QStringList acceptedPythonTypes() const override { return QStringList() << u"str"_s << u"QgsProperty"_s << u"QgsProcessingOutputLayerDefinition"_s; }
1945
1946 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "Path for new vector tile layer" ); }
1947
1948 QColor modelColor() const override { return QColor( 80, 80, 80 ); /* dark gray */ };
1949};
1950
1951#endif // QGSPROCESSINGPARAMETERTYPEIMPL_H
@ ExposeToModeler
Is this parameter available in the modeler. Is set to on by default.
Definition qgis.h:4000
QFlags< ProcessingParameterTypeFlag > ProcessingParameterTypeFlags
Flags which dictate the behavior of Processing parameter types.
Definition qgis.h:4014
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.
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