QGIS API Documentation  3.0.2-Girona (307d082)
qgsalgorithmdissolve.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsalgorithmdissolve.h
3  ---------------------
4  begin : April 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
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 QGSALGORITHMDISSOLVE_H
19 #define QGSALGORITHMDISSOLVE_H
20 
21 #define SIP_NO_FILE
22 
23 #include "qgis.h"
24 #include "qgsprocessingalgorithm.h"
25 
27 
31 class QgsCollectorAlgorithm : public QgsProcessingAlgorithm
32 {
33  protected:
34 
35  QVariantMap processCollection( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback,
36  const std::function<QgsGeometry( const QVector<QgsGeometry>& )> &collector, int maxQueueLength = 0 );
37 };
38 
42 class QgsDissolveAlgorithm : public QgsCollectorAlgorithm
43 {
44 
45  public:
46 
47  QgsDissolveAlgorithm() = default;
48  void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
49  QString name() const override;
50  QString displayName() const override;
51  QStringList tags() const override;
52  QString group() const override;
53  QString groupId() const override;
54  QString shortHelpString() const override;
55  QgsDissolveAlgorithm *createInstance() const override SIP_FACTORY;
56 
57  protected:
58 
59  QVariantMap processAlgorithm( const QVariantMap &parameters,
60  QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
61 
62 };
63 
67 class QgsCollectAlgorithm : public QgsCollectorAlgorithm
68 {
69 
70  public:
71 
72  QgsCollectAlgorithm() = default;
73  void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
74  QString name() const override;
75  QString displayName() const override;
76  QStringList tags() const override;
77  QString group() const override;
78  QString groupId() const override;
79  QString shortHelpString() const override;
80  QgsCollectAlgorithm *createInstance() const override SIP_FACTORY;
81 
82  protected:
83 
84  QVariantMap processAlgorithm( const QVariantMap &parameters,
85  QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
86 
87 };
88 
90 
91 #endif // QGSALGORITHMDISSOLVE_H
92 
93 
Base class for providing feedback from a processing algorithm.
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:111
Abstract base class for processing algorithms.
#define SIP_FACTORY
Definition: qgis_sip.h:69
Contains information about the context in which a processing algorithm is executed.