Skip to content

Commit 2906d1f

Browse files
authored
Merge pull request #4763 from nyalldawson/algs3
Restore more processing algs
2 parents 7ed6c90 + 531e1a3 commit 2906d1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+614
-2207
lines changed

.ci/travis/linux/blacklist.txt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ PyQgsDBManagerGpkg
1010

1111
# temporary during processing refactoring
1212
ProcessingParametersTest
13-
ProcessingModelerTest
1413
ProcessingGdalAlgorithmsTest
1514

1615
# layout tests are run on separate build

python/core/processing/qgsprocessingoutputs.sip

+21
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class QgsProcessingOutputDefinition
3838
sipType = sipType_QgsProcessingOutputNumber;
3939
else if ( sipCpp->type() == "outputString" )
4040
sipType = sipType_QgsProcessingOutputString;
41+
else if ( sipCpp->type() == "outputFolder" )
42+
sipType = sipType_QgsProcessingOutputFolder;
4143
%End
4244
public:
4345

@@ -206,6 +208,25 @@ class QgsProcessingOutputString : QgsProcessingOutputDefinition
206208
virtual QString type() const;
207209
};
208210

211+
class QgsProcessingOutputFolder : QgsProcessingOutputDefinition
212+
{
213+
%Docstring
214+
A folder output for processing algorithms.
215+
.. versionadded:: 3.0
216+
%End
217+
218+
%TypeHeaderCode
219+
#include "qgsprocessingoutputs.h"
220+
%End
221+
public:
222+
223+
QgsProcessingOutputFolder( const QString &name, const QString &description = QString() );
224+
%Docstring
225+
Constructor for QgsProcessingOutputFolder.
226+
%End
227+
228+
virtual QString type() const;
229+
};
209230

210231

211232

python/core/processing/qgsprocessingparameters.sip

+17
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,29 @@ class QgsProcessingParameterDefinition
315315
:rtype: bool
316316
%End
317317

318+
319+
QVariantMap &metadata();
320+
%Docstring
321+
Returns the parameter's freeform metadata. This is mostly used by parameter widget wrappers
322+
in order to customise their appearance and behavior.
323+
.. seealso:: setMetadata()
324+
:rtype: QVariantMap
325+
%End
326+
327+
void setMetadata( const QVariantMap &metadata );
328+
%Docstring
329+
Sets the parameter's freeform ``metadata``. This is mostly used by parameter widget wrappers
330+
in order to customise their appearance and behavior.
331+
.. seealso:: metadata()
332+
%End
333+
318334
protected:
319335

320336

321337

322338

323339

340+
324341
};
325342

326343
QFlags<QgsProcessingParameterDefinition::Flag> operator|(QgsProcessingParameterDefinition::Flag f1, QFlags<QgsProcessingParameterDefinition::Flag> f2);

python/core/qgsvectorlayerexporter.sip

+7
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ class QgsVectorLayerExporter : QgsFeatureSink
124124
Finalizes the export and closes the new created layer.
125125
%End
126126

127+
bool flushBuffer();
128+
%Docstring
129+
Flush the buffer writing the features to the new layer.
130+
.. versionadded:: 3.0
131+
:rtype: bool
132+
%End
133+
127134
private:
128135
QgsVectorLayerExporter( const QgsVectorLayerExporter &rh );
129136
};

python/plugins/processing/algs/help/qgis.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ qgis:mergelines: >
312312
qgis:mergevectorlayers: >
313313
This algorithm combines multiple vector layers of the same geometry type into a single one.
314314

315-
If attributes tables are different, the attribute table of the resulting layer will contain the attributes from both input layers.
315+
If attributes tables are different, the attribute table of the resulting layer will contain the attributes from all input layers. New attributes will be added for the original layer name and source.
316316

317317
The layers will all be reprojected to match the coordinate reference system of the first input layer.
318318

python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py

-197
This file was deleted.

0 commit comments

Comments
 (0)