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