@@ -1421,7 +1421,7 @@ QgsProcessingParameterMatrix *QgsProcessingParameterMatrix::fromScriptCode( cons
1421
1421
return new QgsProcessingParameterMatrix ( name, description, 0 , false , QStringList (), definition.isEmpty () ? QVariant () : definition, isOptional );
1422
1422
}
1423
1423
1424
- QgsProcessingParameterMultipleLayers::QgsProcessingParameterMultipleLayers ( const QString &name, const QString &description, LayerType layerType, const QVariant &defaultValue, bool optional )
1424
+ QgsProcessingParameterMultipleLayers::QgsProcessingParameterMultipleLayers ( const QString &name, const QString &description, QgsProcessing:: LayerType layerType, const QVariant &defaultValue, bool optional )
1425
1425
: QgsProcessingParameterDefinition( name, description, defaultValue, optional )
1426
1426
, mLayerType( layerType )
1427
1427
{
@@ -1521,11 +1521,11 @@ QString QgsProcessingParameterMultipleLayers::asScriptCode() const
1521
1521
code += QStringLiteral ( " optional " );
1522
1522
switch ( mLayerType )
1523
1523
{
1524
- case TypeRaster:
1524
+ case QgsProcessing:: TypeRaster:
1525
1525
code += QStringLiteral ( " multiple raster" );
1526
1526
break ;
1527
1527
1528
- case TypeFile:
1528
+ case QgsProcessing:: TypeFile:
1529
1529
code += QStringLiteral ( " multiple file" );
1530
1530
break ;
1531
1531
@@ -1554,12 +1554,12 @@ QString QgsProcessingParameterMultipleLayers::asScriptCode() const
1554
1554
return code.trimmed ();
1555
1555
}
1556
1556
1557
- QgsProcessingParameterDefinition ::LayerType QgsProcessingParameterMultipleLayers::layerType () const
1557
+ QgsProcessing ::LayerType QgsProcessingParameterMultipleLayers::layerType () const
1558
1558
{
1559
1559
return mLayerType ;
1560
1560
}
1561
1561
1562
- void QgsProcessingParameterMultipleLayers::setLayerType ( LayerType type )
1562
+ void QgsProcessingParameterMultipleLayers::setLayerType ( QgsProcessing:: LayerType type )
1563
1563
{
1564
1564
mLayerType = type;
1565
1565
}
@@ -1586,7 +1586,7 @@ QVariantMap QgsProcessingParameterMultipleLayers::toVariantMap() const
1586
1586
bool QgsProcessingParameterMultipleLayers::fromVariantMap ( const QVariantMap &map )
1587
1587
{
1588
1588
QgsProcessingParameterDefinition::fromVariantMap ( map );
1589
- mLayerType = static_cast < LayerType >( map.value ( QStringLiteral ( " layer_type" ) ).toInt () );
1589
+ mLayerType = static_cast < QgsProcessing:: LayerType >( map.value ( QStringLiteral ( " layer_type" ) ).toInt () );
1590
1590
mMinimumNumberInputs = map.value ( QStringLiteral ( " min_inputs" ) ).toInt ();
1591
1591
return true ;
1592
1592
}
@@ -1602,13 +1602,13 @@ QgsProcessingParameterMultipleLayers *QgsProcessingParameterMultipleLayers::from
1602
1602
type = m.captured ( 1 ).toLower ().trimmed ();
1603
1603
defaultVal = m.captured ( 2 );
1604
1604
}
1605
- LayerType layerType = TypeVectorAny;
1605
+ QgsProcessing:: LayerType layerType = QgsProcessing:: TypeVectorAny;
1606
1606
if ( type == QStringLiteral ( " vector" ) )
1607
- layerType = TypeVectorAny;
1607
+ layerType = QgsProcessing:: TypeVectorAny;
1608
1608
else if ( type == QStringLiteral ( " raster" ) )
1609
- layerType = TypeRaster;
1609
+ layerType = QgsProcessing:: TypeRaster;
1610
1610
else if ( type == QStringLiteral ( " file" ) )
1611
- layerType = TypeFile;
1611
+ layerType = QgsProcessing:: TypeFile;
1612
1612
return new QgsProcessingParameterMultipleLayers ( name, description, layerType, defaultVal.isEmpty () ? QVariant () : defaultVal, isOptional );
1613
1613
}
1614
1614
@@ -2476,15 +2476,15 @@ QString QgsProcessingParameterFeatureSource::asScriptCode() const
2476
2476
{
2477
2477
switch ( type )
2478
2478
{
2479
- case TypeVectorPoint:
2479
+ case QgsProcessing:: TypeVectorPoint:
2480
2480
code += QStringLiteral ( " point " );
2481
2481
break ;
2482
2482
2483
- case TypeVectorLine:
2483
+ case QgsProcessing:: TypeVectorLine:
2484
2484
code += QStringLiteral ( " line " );
2485
2485
break ;
2486
2486
2487
- case TypeVectorPolygon:
2487
+ case QgsProcessing:: TypeVectorPolygon:
2488
2488
code += QStringLiteral ( " polygon " );
2489
2489
break ;
2490
2490
@@ -2537,19 +2537,19 @@ QgsProcessingParameterFeatureSource *QgsProcessingParameterFeatureSource::fromSc
2537
2537
{
2538
2538
if ( def.startsWith ( QStringLiteral ( " point" ), Qt::CaseInsensitive ) )
2539
2539
{
2540
- types << QgsProcessingParameterDefinition ::TypeVectorPoint;
2540
+ types << QgsProcessing ::TypeVectorPoint;
2541
2541
def = def.mid ( 6 );
2542
2542
continue ;
2543
2543
}
2544
2544
else if ( def.startsWith ( QStringLiteral ( " line" ), Qt::CaseInsensitive ) )
2545
2545
{
2546
- types << QgsProcessingParameterDefinition ::TypeVectorLine;
2546
+ types << QgsProcessing ::TypeVectorLine;
2547
2547
def = def.mid ( 5 );
2548
2548
continue ;
2549
2549
}
2550
2550
else if ( def.startsWith ( QStringLiteral ( " polygon" ), Qt::CaseInsensitive ) )
2551
2551
{
2552
- types << QgsProcessingParameterDefinition ::TypeVectorPolygon;
2552
+ types << QgsProcessing ::TypeVectorPolygon;
2553
2553
def = def.mid ( 8 );
2554
2554
continue ;
2555
2555
}
@@ -2559,7 +2559,7 @@ QgsProcessingParameterFeatureSource *QgsProcessingParameterFeatureSource::fromSc
2559
2559
return new QgsProcessingParameterFeatureSource ( name, description, types, def, isOptional );
2560
2560
}
2561
2561
2562
- QgsProcessingParameterFeatureSink::QgsProcessingParameterFeatureSink ( const QString &name, const QString &description, QgsProcessingParameterDefinition ::LayerType type, const QVariant &defaultValue, bool optional )
2562
+ QgsProcessingParameterFeatureSink::QgsProcessingParameterFeatureSink ( const QString &name, const QString &description, QgsProcessing ::LayerType type, const QVariant &defaultValue, bool optional )
2563
2563
: QgsProcessingDestinationParameter( name, description, defaultValue, optional )
2564
2564
, mDataType( type )
2565
2565
{
@@ -2622,19 +2622,19 @@ QString QgsProcessingParameterFeatureSink::asScriptCode() const
2622
2622
2623
2623
switch ( mDataType )
2624
2624
{
2625
- case TypeVectorPoint:
2625
+ case QgsProcessing:: TypeVectorPoint:
2626
2626
code += QStringLiteral ( " point " );
2627
2627
break ;
2628
2628
2629
- case TypeVectorLine:
2629
+ case QgsProcessing:: TypeVectorLine:
2630
2630
code += QStringLiteral ( " line " );
2631
2631
break ;
2632
2632
2633
- case TypeVectorPolygon:
2633
+ case QgsProcessing:: TypeVectorPolygon:
2634
2634
code += QStringLiteral ( " polygon " );
2635
2635
break ;
2636
2636
2637
- case TypeTable:
2637
+ case QgsProcessing:: TypeTable:
2638
2638
code += QStringLiteral ( " table " );
2639
2639
break ;
2640
2640
@@ -2664,7 +2664,7 @@ QString QgsProcessingParameterFeatureSink::defaultFileExtension() const
2664
2664
}
2665
2665
}
2666
2666
2667
- QgsProcessingParameterDefinition ::LayerType QgsProcessingParameterFeatureSink::dataType () const
2667
+ QgsProcessing ::LayerType QgsProcessingParameterFeatureSink::dataType () const
2668
2668
{
2669
2669
return mDataType ;
2670
2670
}
@@ -2673,22 +2673,22 @@ bool QgsProcessingParameterFeatureSink::hasGeometry() const
2673
2673
{
2674
2674
switch ( mDataType )
2675
2675
{
2676
- case TypeAny:
2677
- case TypeVectorAny:
2678
- case TypeVectorPoint:
2679
- case TypeVectorLine:
2680
- case TypeVectorPolygon:
2681
- case TypeTable:
2676
+ case QgsProcessing:: TypeAny:
2677
+ case QgsProcessing:: TypeVectorAny:
2678
+ case QgsProcessing:: TypeVectorPoint:
2679
+ case QgsProcessing:: TypeVectorLine:
2680
+ case QgsProcessing:: TypeVectorPolygon:
2681
+ case QgsProcessing:: TypeTable:
2682
2682
return true ;
2683
2683
2684
- case TypeRaster:
2685
- case TypeFile:
2684
+ case QgsProcessing:: TypeRaster:
2685
+ case QgsProcessing:: TypeFile:
2686
2686
return false ;
2687
2687
}
2688
2688
return true ;
2689
2689
}
2690
2690
2691
- void QgsProcessingParameterFeatureSink::setDataType ( QgsProcessingParameterDefinition ::LayerType type )
2691
+ void QgsProcessingParameterFeatureSink::setDataType ( QgsProcessing ::LayerType type )
2692
2692
{
2693
2693
mDataType = type;
2694
2694
}
@@ -2703,7 +2703,7 @@ QVariantMap QgsProcessingParameterFeatureSink::toVariantMap() const
2703
2703
bool QgsProcessingParameterFeatureSink::fromVariantMap ( const QVariantMap &map )
2704
2704
{
2705
2705
QgsProcessingDestinationParameter::fromVariantMap ( map );
2706
- mDataType = static_cast < QgsProcessingParameterDefinition ::LayerType >( map.value ( QStringLiteral ( " data_type" ) ).toInt () );
2706
+ mDataType = static_cast < QgsProcessing ::LayerType >( map.value ( QStringLiteral ( " data_type" ) ).toInt () );
2707
2707
return true ;
2708
2708
}
2709
2709
@@ -2717,26 +2717,26 @@ QString QgsProcessingParameterFeatureSink::generateTemporaryDestination() const
2717
2717
2718
2718
QgsProcessingParameterFeatureSink *QgsProcessingParameterFeatureSink::fromScriptCode ( const QString &name, const QString &description, bool isOptional, const QString &definition )
2719
2719
{
2720
- QgsProcessingParameterDefinition ::LayerType type = QgsProcessingParameterDefinition ::TypeVectorAny;
2720
+ QgsProcessing ::LayerType type = QgsProcessing ::TypeVectorAny;
2721
2721
QString def = definition;
2722
2722
if ( def.startsWith ( QStringLiteral ( " point" ), Qt::CaseInsensitive ) )
2723
2723
{
2724
- type = QgsProcessingParameterDefinition ::TypeVectorPoint;
2724
+ type = QgsProcessing ::TypeVectorPoint;
2725
2725
def = def.mid ( 6 );
2726
2726
}
2727
2727
else if ( def.startsWith ( QStringLiteral ( " line" ), Qt::CaseInsensitive ) )
2728
2728
{
2729
- type = QgsProcessingParameterDefinition ::TypeVectorLine;
2729
+ type = QgsProcessing ::TypeVectorLine;
2730
2730
def = def.mid ( 5 );
2731
2731
}
2732
2732
else if ( def.startsWith ( QStringLiteral ( " polygon" ), Qt::CaseInsensitive ) )
2733
2733
{
2734
- type = QgsProcessingParameterDefinition ::TypeVectorPolygon;
2734
+ type = QgsProcessing ::TypeVectorPolygon;
2735
2735
def = def.mid ( 8 );
2736
2736
}
2737
2737
else if ( def.startsWith ( QStringLiteral ( " table" ), Qt::CaseInsensitive ) )
2738
2738
{
2739
- type = QgsProcessingParameterDefinition ::TypeTable;
2739
+ type = QgsProcessing ::TypeTable;
2740
2740
def = def.mid ( 6 );
2741
2741
}
2742
2742
@@ -2980,7 +2980,7 @@ QString QgsProcessingDestinationParameter::generateTemporaryDestination() const
2980
2980
return QgsProcessingUtils::generateTempFilename ( name () + ' .' + defaultFileExtension () );
2981
2981
}
2982
2982
2983
- QgsProcessingParameterVectorOutput::QgsProcessingParameterVectorOutput ( const QString &name, const QString &description, QgsProcessingParameterDefinition ::LayerType type, const QVariant &defaultValue, bool optional )
2983
+ QgsProcessingParameterVectorOutput::QgsProcessingParameterVectorOutput ( const QString &name, const QString &description, QgsProcessing ::LayerType type, const QVariant &defaultValue, bool optional )
2984
2984
: QgsProcessingDestinationParameter( name, description, defaultValue, optional )
2985
2985
, mDataType( type )
2986
2986
{
@@ -3043,15 +3043,15 @@ QString QgsProcessingParameterVectorOutput::asScriptCode() const
3043
3043
3044
3044
switch ( mDataType )
3045
3045
{
3046
- case TypeVectorPoint:
3046
+ case QgsProcessing:: TypeVectorPoint:
3047
3047
code += QStringLiteral ( " point " );
3048
3048
break ;
3049
3049
3050
- case TypeVectorLine:
3050
+ case QgsProcessing:: TypeVectorLine:
3051
3051
code += QStringLiteral ( " line " );
3052
3052
break ;
3053
3053
3054
- case TypeVectorPolygon:
3054
+ case QgsProcessing:: TypeVectorPolygon:
3055
3055
code += QStringLiteral ( " polygon " );
3056
3056
break ;
3057
3057
@@ -3081,7 +3081,7 @@ QString QgsProcessingParameterVectorOutput::defaultFileExtension() const
3081
3081
}
3082
3082
}
3083
3083
3084
- QgsProcessingParameterDefinition ::LayerType QgsProcessingParameterVectorOutput::dataType () const
3084
+ QgsProcessing ::LayerType QgsProcessingParameterVectorOutput::dataType () const
3085
3085
{
3086
3086
return mDataType ;
3087
3087
}
@@ -3090,22 +3090,22 @@ bool QgsProcessingParameterVectorOutput::hasGeometry() const
3090
3090
{
3091
3091
switch ( mDataType )
3092
3092
{
3093
- case TypeAny:
3094
- case TypeVectorAny:
3095
- case TypeVectorPoint:
3096
- case TypeVectorLine:
3097
- case TypeVectorPolygon:
3098
- case TypeTable:
3093
+ case QgsProcessing:: TypeAny:
3094
+ case QgsProcessing:: TypeVectorAny:
3095
+ case QgsProcessing:: TypeVectorPoint:
3096
+ case QgsProcessing:: TypeVectorLine:
3097
+ case QgsProcessing:: TypeVectorPolygon:
3098
+ case QgsProcessing:: TypeTable:
3099
3099
return true ;
3100
3100
3101
- case TypeRaster:
3102
- case TypeFile:
3101
+ case QgsProcessing:: TypeRaster:
3102
+ case QgsProcessing:: TypeFile:
3103
3103
return false ;
3104
3104
}
3105
3105
return true ;
3106
3106
}
3107
3107
3108
- void QgsProcessingParameterVectorOutput::setDataType ( QgsProcessingParameterDefinition ::LayerType type )
3108
+ void QgsProcessingParameterVectorOutput::setDataType ( QgsProcessing ::LayerType type )
3109
3109
{
3110
3110
mDataType = type;
3111
3111
}
@@ -3120,27 +3120,27 @@ QVariantMap QgsProcessingParameterVectorOutput::toVariantMap() const
3120
3120
bool QgsProcessingParameterVectorOutput::fromVariantMap ( const QVariantMap &map )
3121
3121
{
3122
3122
QgsProcessingDestinationParameter::fromVariantMap ( map );
3123
- mDataType = static_cast < QgsProcessingParameterDefinition ::LayerType >( map.value ( QStringLiteral ( " data_type" ) ).toInt () );
3123
+ mDataType = static_cast < QgsProcessing ::LayerType >( map.value ( QStringLiteral ( " data_type" ) ).toInt () );
3124
3124
return true ;
3125
3125
}
3126
3126
3127
3127
QgsProcessingParameterVectorOutput *QgsProcessingParameterVectorOutput::fromScriptCode ( const QString &name, const QString &description, bool isOptional, const QString &definition )
3128
3128
{
3129
- QgsProcessingParameterDefinition ::LayerType type = QgsProcessingParameterDefinition ::TypeVectorAny;
3129
+ QgsProcessing ::LayerType type = QgsProcessing ::TypeVectorAny;
3130
3130
QString def = definition;
3131
3131
if ( def.startsWith ( QStringLiteral ( " point" ), Qt::CaseInsensitive ) )
3132
3132
{
3133
- type = QgsProcessingParameterDefinition ::TypeVectorPoint;
3133
+ type = QgsProcessing ::TypeVectorPoint;
3134
3134
def = def.mid ( 6 );
3135
3135
}
3136
3136
else if ( def.startsWith ( QStringLiteral ( " line" ), Qt::CaseInsensitive ) )
3137
3137
{
3138
- type = QgsProcessingParameterDefinition ::TypeVectorLine;
3138
+ type = QgsProcessing ::TypeVectorLine;
3139
3139
def = def.mid ( 5 );
3140
3140
}
3141
3141
else if ( def.startsWith ( QStringLiteral ( " polygon" ), Qt::CaseInsensitive ) )
3142
3142
{
3143
- type = QgsProcessingParameterDefinition ::TypeVectorPolygon;
3143
+ type = QgsProcessing ::TypeVectorPolygon;
3144
3144
def = def.mid ( 8 );
3145
3145
}
3146
3146
0 commit comments