QGIS API Documentation 3.43.0-Master (e01d6d7c4c0)
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 public:
41 QgsConvertGpxFeatureTypeAlgorithm() = default;
42 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
43 QIcon icon() const override;
44 QString svgIconPath() const override;
45 QString name() const override;
46 QString displayName() const override;
47 QStringList tags() const override;
48 QString group() const override;
49 QString groupId() const override;
50 QString shortHelpString() const override;
51 QString shortDescription() const override;
52 QgsConvertGpxFeatureTypeAlgorithm *createInstance() const override SIP_FACTORY;
53
54 protected:
55 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
56
57 private:
58 enum ConversionType
59 {
60 WaypointsFromRoute = 0,
61 WaypointsFromTrack,
62 RouteFromWaypoints,
63 TrackFromWaypoints
64 };
65
69 static void createArgumentLists(
70 const QString &inputFile,
71 const QString &outputFile,
72 ConversionType conversion,
73 QStringList &processArgs,
74 QStringList &logArgs
75 );
76
77 friend class TestQgsProcessingAlgsPt2;
78};
79
80
84class ANALYSIS_EXPORT QgsConvertGpsDataAlgorithm : public QgsProcessingAlgorithm
85{
86 public:
87 QgsConvertGpsDataAlgorithm() = default;
88 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
89 QIcon icon() const override;
90 QString svgIconPath() const override;
91 QString name() const override;
92 QString displayName() const override;
93 QStringList tags() const override;
94 QString group() const override;
95 QString groupId() const override;
96 QString shortHelpString() const override;
97 QString shortDescription() const override;
98 QgsConvertGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
99
100 protected:
101 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
102
103 private:
104 friend class TestQgsProcessingAlgs;
105};
106
107
111class ANALYSIS_EXPORT QgsDownloadGpsDataAlgorithm : public QgsProcessingAlgorithm
112{
113 public:
114 QgsDownloadGpsDataAlgorithm() = default;
115 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
116 QIcon icon() const override;
117 QString svgIconPath() const override;
118 QString name() const override;
119 QString displayName() const override;
120 QStringList tags() const override;
121 QString group() const override;
122 QString groupId() const override;
123 QString shortHelpString() const override;
124 QString shortDescription() const override;
125 QgsDownloadGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
126
127 protected:
128 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
129
130 private:
131 friend class TestQgsProcessingAlgs;
132};
133
134
138class ANALYSIS_EXPORT QgsUploadGpsDataAlgorithm : public QgsProcessingAlgorithm
139{
140 public:
141 QgsUploadGpsDataAlgorithm() = default;
142 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
143 QIcon icon() const override;
144 QString svgIconPath() const override;
145 QString name() const override;
146 QString displayName() const override;
147 QStringList tags() const override;
148 QString group() const override;
149 QString groupId() const override;
150 QString shortHelpString() const override;
151 QString shortDescription() const override;
152 QgsUploadGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
153
154 protected:
155 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
156
157 private:
158 friend class TestQgsProcessingAlgs;
159};
160
162
163#endif // process
164#endif // QGSALGORITHMGPSBABELTOOLS_H
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 shortDescription() const
Returns an optional translated short description of 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