QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 QVariantMap processCollection( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback, const std::function<QgsGeometry( const QVector<QgsGeometry> & )> &collector, int maxQueueLength = 0, Qgis::ProcessingFeatureSourceFlags sourceFlags = Qgis::ProcessingFeatureSourceFlags(), bool separateDisjoint = false );
36};
37
41class QgsDissolveAlgorithm : public QgsCollectorAlgorithm
42{
43 public:
44 QgsDissolveAlgorithm() = default;
45 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
46 QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmDissolve.svg" ) ); }
47 QString svgIconPath() const override { return QgsApplication::iconPath( QStringLiteral( "/algorithms/mAlgorithmDissolve.svg" ) ); }
48 QString name() const override;
49 QString displayName() const override;
50 QStringList tags() const override;
51 QString group() const override;
52 QString groupId() const override;
53 QString shortHelpString() const override;
54 Qgis::ProcessingAlgorithmDocumentationFlags documentationFlags() const override;
55 QgsDissolveAlgorithm *createInstance() const override SIP_FACTORY;
56
57 protected:
58 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
59};
60
64class QgsCollectAlgorithm : public QgsCollectorAlgorithm
65{
66 public:
67 QgsCollectAlgorithm() = default;
68 QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
69 QString svgIconPath() const override { return QgsApplication::iconPath( QStringLiteral( "/algorithms/mAlgorithmCollect.svg" ) ); }
70 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
71 QString name() const override;
72 QString displayName() const override;
73 QStringList tags() const override;
74 QString group() const override;
75 QString groupId() const override;
76 QString shortHelpString() const override;
77 Qgis::ProcessingAlgorithmDocumentationFlags documentationFlags() const override;
78 QgsCollectAlgorithm *createInstance() const override SIP_FACTORY;
79
80 protected:
81 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
82};
83
85
86#endif // QGSALGORITHMDISSOLVE_H
QFlags< ProcessingAlgorithmDocumentationFlag > ProcessingAlgorithmDocumentationFlags
Flags describing algorithm behavior for documentation purposes.
Definition qgis.h:3430
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
Definition qgis.h:3507
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