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