QGIS API Documentation
3.2.0-Bonn (bc43194)
src
analysis
processing
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 ¶meters,
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
QIcon icon()
const override
{
return
QgsApplication::getThemeIcon
( QStringLiteral(
"/algorithms/mAlgorithmDissolve.svg"
) ); }
50
QString svgIconPath()
const override
{
return
QgsApplication::iconPath
( QStringLiteral(
"/algorithms/mAlgorithmDissolve.svg"
) ); }
51
QString name()
const override
;
52
QString displayName()
const override
;
53
QStringList tags()
const override
;
54
QString group()
const override
;
55
QString groupId()
const override
;
56
QString shortHelpString()
const override
;
57
QgsDissolveAlgorithm *createInstance()
const
override
SIP_FACTORY
;
58
59
protected
:
60
61
QVariantMap processAlgorithm(
const
QVariantMap ¶meters,
62
QgsProcessingContext
&context,
QgsProcessingFeedback
*feedback )
override
;
63
64
};
65
69
class
QgsCollectAlgorithm :
public
QgsCollectorAlgorithm
70
{
71
72
public
:
73
74
QgsCollectAlgorithm() =
default
;
75
QIcon icon()
const override
{
return
QgsApplication::getThemeIcon
( QStringLiteral(
"/algorithms/mAlgorithmCollect.svg"
) ); }
76
QString svgIconPath()
const override
{
return
QgsApplication::iconPath
( QStringLiteral(
"/algorithms/mAlgorithmCollect.svg"
) ); }
77
void
initAlgorithm(
const
QVariantMap &configuration = QVariantMap() )
override
;
78
QString name()
const override
;
79
QString displayName()
const override
;
80
QStringList tags()
const override
;
81
QString group()
const override
;
82
QString groupId()
const override
;
83
QString shortHelpString()
const override
;
84
QgsCollectAlgorithm *createInstance()
const
override
SIP_FACTORY
;
85
86
protected
:
87
88
QVariantMap processAlgorithm(
const
QVariantMap ¶meters,
89
QgsProcessingContext
&context,
QgsProcessingFeedback
*feedback )
override
;
90
91
};
92
94
95
#endif // QGSALGORITHMDISSOLVE_H
96
97
QgsProcessingFeedback
Base class for providing feedback from a processing algorithm.
Definition:
qgsprocessingfeedback.h:35
QgsApplication::iconPath
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
Definition:
qgsapplication.cpp:486
QgsGeometry
A geometry is the spatial representation of a feature.
Definition:
qgsgeometry.h:104
QgsApplication::getThemeIcon
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
Definition:
qgsapplication.cpp:497
QgsProcessingAlgorithm
Abstract base class for processing algorithms.
Definition:
qgsprocessingalgorithm.h:51
qgsprocessingalgorithm.h
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:69
qgis.h
QgsProcessingContext
Contains information about the context in which a processing algorithm is executed.
Definition:
qgsprocessingcontext.h:42
Generated on Sat Jun 23 2018 20:58:15 for QGIS API Documentation by
1.8.13