QGIS API Documentation 3.38.0-Grenoble (exported)
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 QgsDissolveAlgorithm *createInstance() const override SIP_FACTORY;
60
61 protected:
62
63 QVariantMap processAlgorithm( const QVariantMap &parameters,
64 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
65
66};
67
71class QgsCollectAlgorithm : public QgsCollectorAlgorithm
72{
73
74 public:
75
76 QgsCollectAlgorithm() = default;
77 QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
78 QString svgIconPath() const override { return QgsApplication::iconPath( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
79 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
80 QString name() const override;
81 QString displayName() const override;
82 QStringList tags() const override;
83 QString group() const override;
84 QString groupId() const override;
85 QString shortHelpString() const override;
86 QgsCollectAlgorithm *createInstance() const override SIP_FACTORY;
87
88 protected:
89
90 QVariantMap processAlgorithm( const QVariantMap &parameters,
91 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
92
93};
94
96
97#endif // QGSALGORITHMDISSOLVE_H
98
99
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
Definition qgis.h:3148
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