QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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_sip.h"
25#include "qgsapplication.h"
26
28
32class QgsCollectorAlgorithm : public QgsProcessingAlgorithm
33{
34 protected:
35
36 QVariantMap processCollection( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback,
37 const std::function<QgsGeometry( const QVector<QgsGeometry>& )> &collector, int maxQueueLength = 0, Qgis::ProcessingFeatureSourceFlags sourceFlags = Qgis::ProcessingFeatureSourceFlags(),
38 bool separateDisjoint = false );
39};
40
44class QgsDissolveAlgorithm : public QgsCollectorAlgorithm
45{
46
47 public:
48
49 QgsDissolveAlgorithm() = default;
50 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
51 QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmDissolve.svg" ) ); }
52 QString svgIconPath() const override { return QgsApplication::iconPath( QStringLiteral( "/algorithms/mAlgorithmDissolve.svg" ) ); }
53 QString name() const override;
54 QString displayName() const override;
55 QStringList tags() const override;
56 QString group() const override;
57 QString groupId() const override;
58 QString shortHelpString() const override;
59 Qgis::ProcessingAlgorithmDocumentationFlags documentationFlags() const override;
60 QgsDissolveAlgorithm *createInstance() const override SIP_FACTORY;
61
62 protected:
63
64 QVariantMap processAlgorithm( const QVariantMap &parameters,
65 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
66
67};
68
72class QgsCollectAlgorithm : public QgsCollectorAlgorithm
73{
74
75 public:
76
77 QgsCollectAlgorithm() = default;
78 QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
79 QString svgIconPath() const override { return QgsApplication::iconPath( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
80 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
81 QString name() const override;
82 QString displayName() const override;
83 QStringList tags() const override;
84 QString group() const override;
85 QString groupId() const override;
86 QString shortHelpString() const override;
87 Qgis::ProcessingAlgorithmDocumentationFlags documentationFlags() const override;
88 QgsCollectAlgorithm *createInstance() const override SIP_FACTORY;
89
90 protected:
91
92 QVariantMap processAlgorithm( const QVariantMap &parameters,
93 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
94
95};
96
98
99#endif // QGSALGORITHMDISSOLVE_H
100
101
QFlags< ProcessingAlgorithmDocumentationFlag > ProcessingAlgorithmDocumentationFlags
Flags describing algorithm behavior for documentation purposes.
Definition qgis.h:3367
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
Definition qgis.h:3444
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
A geometry is the spatial representation of a feature.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
#define SIP_FACTORY
Definition qgis_sip.h:76