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