QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsalgorithmgpsbabeltools.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsalgorithmgpsbabeltools.h
3 ------------------
4 begin : July 2021
5 copyright : (C) 2021 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 QGSALGORITHMGPSBABELTOOLS_H
19#define QGSALGORITHMGPSBABELTOOLS_H
20
21#define SIP_NO_FILE
22
23#include <QtGlobal>
24#if QT_CONFIG(process)
25
26
27#include "qgis_sip.h"
28#include "qgis_analysis.h"
30#include "qgsapplication.h"
32
34
38class ANALYSIS_EXPORT QgsConvertGpxFeatureTypeAlgorithm : public QgsProcessingAlgorithm
39{
40
41 public:
42
43 QgsConvertGpxFeatureTypeAlgorithm() = default;
44 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
45 QIcon icon() const override;
46 QString svgIconPath() const override;
47 QString name() const override;
48 QString displayName() const override;
49 QStringList tags() const override;
50 QString group() const override;
51 QString groupId() const override;
52 QString shortHelpString() const override;
53 QgsConvertGpxFeatureTypeAlgorithm *createInstance() const override SIP_FACTORY;
54
55 protected:
56
57 QVariantMap processAlgorithm( const QVariantMap &parameters,
58 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
59
60 private:
61
62 enum ConversionType
63 {
64 WaypointsFromRoute = 0,
65 WaypointsFromTrack,
66 RouteFromWaypoints,
67 TrackFromWaypoints
68 };
69
73 static void createArgumentLists(
74 const QString &inputFile,
75 const QString &outputFile,
76 ConversionType conversion,
77 QStringList &processArgs,
78 QStringList &logArgs
79 );
80
81 friend class TestQgsProcessingAlgsPt2;
82
83};
84
85
89class ANALYSIS_EXPORT QgsConvertGpsDataAlgorithm : public QgsProcessingAlgorithm
90{
91
92 public:
93
94 QgsConvertGpsDataAlgorithm() = default;
95 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
96 QIcon icon() const override;
97 QString svgIconPath() const override;
98 QString name() const override;
99 QString displayName() const override;
100 QStringList tags() const override;
101 QString group() const override;
102 QString groupId() const override;
103 QString shortHelpString() const override;
104 QgsConvertGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
105
106 protected:
107
108 QVariantMap processAlgorithm( const QVariantMap &parameters,
109 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
110
111 private:
112
113 friend class TestQgsProcessingAlgs;
114
115};
116
117
121class ANALYSIS_EXPORT QgsDownloadGpsDataAlgorithm : public QgsProcessingAlgorithm
122{
123
124 public:
125
126 QgsDownloadGpsDataAlgorithm() = default;
127 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
128 QIcon icon() const override;
129 QString svgIconPath() const override;
130 QString name() const override;
131 QString displayName() const override;
132 QStringList tags() const override;
133 QString group() const override;
134 QString groupId() const override;
135 QString shortHelpString() const override;
136 QgsDownloadGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
137
138 protected:
139
140 QVariantMap processAlgorithm( const QVariantMap &parameters,
141 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
142
143 private:
144
145 friend class TestQgsProcessingAlgs;
146
147};
148
149
153class ANALYSIS_EXPORT QgsUploadGpsDataAlgorithm : public QgsProcessingAlgorithm
154{
155
156 public:
157
158 QgsUploadGpsDataAlgorithm() = default;
159 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
160 QIcon icon() const override;
161 QString svgIconPath() const override;
162 QString name() const override;
163 QString displayName() const override;
164 QStringList tags() const override;
165 QString group() const override;
166 QString groupId() const override;
167 QString shortHelpString() const override;
168 QgsUploadGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
169
170 protected:
171
172 QVariantMap processAlgorithm( const QVariantMap &parameters,
173 QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
174
175 private:
176
177 friend class TestQgsProcessingAlgs;
178
179};
180
182
183#endif // process
184#endif // QGSALGORITHMGPSBABELTOOLS_H
185
186
Abstract base class for processing algorithms.
virtual QgsProcessingAlgorithm * createInstance() const =0
Creates a new instance of the algorithm class.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual QIcon icon() const
Returns an icon for the algorithm.
virtual QString shortHelpString() const
Returns a localised short helper string for the algorithm.
virtual QString displayName() const =0
Returns the translated algorithm name, which should be used for any user-visible display of the algor...
virtual QVariantMap processAlgorithm(const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)=0
Runs the algorithm using the specified parameters.
virtual QStringList tags() const
Returns a list of tags which relate to the algorithm, and are used to assist users in searching for s...
virtual QString svgIconPath() const
Returns a path to an SVG version of the algorithm's icon.
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
virtual QString name() const =0
Returns the algorithm name, used for identifying the algorithm.
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