QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
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( const QString &inputFile, const QString &outputFile, ConversionType conversion, QStringList &processArgs, QStringList &logArgs );
72
73 friend class TestQgsProcessingAlgsPt2;
74};
75
76
80class ANALYSIS_EXPORT QgsConvertGpsDataAlgorithm : public QgsProcessingAlgorithm
81{
82 public:
83 QgsConvertGpsDataAlgorithm() = default;
84 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
85 QIcon icon() const override;
86 QString svgIconPath() const override;
87 QString name() const override;
88 QString displayName() const override;
89 QStringList tags() const override;
90 QString group() const override;
91 QString groupId() const override;
92 QString shortHelpString() const override;
93 QString shortDescription() const override;
94 QgsConvertGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
95
96 protected:
97 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
98
99 private:
100 friend class TestQgsProcessingAlgs;
101};
102
103
107class ANALYSIS_EXPORT QgsDownloadGpsDataAlgorithm : public QgsProcessingAlgorithm
108{
109 public:
110 QgsDownloadGpsDataAlgorithm() = default;
111 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
112 QIcon icon() const override;
113 QString svgIconPath() const override;
114 QString name() const override;
115 QString displayName() const override;
116 QStringList tags() const override;
117 QString group() const override;
118 QString groupId() const override;
119 QString shortHelpString() const override;
120 QString shortDescription() const override;
121 QgsDownloadGpsDataAlgorithm *createInstance() const override SIP_FACTORY;
122
123 protected:
124 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
125
126 private:
127 friend class TestQgsProcessingAlgs;
128};
129
130
134class ANALYSIS_EXPORT QgsUploadGpsDataAlgorithm : public QgsProcessingAlgorithm
135{
136 public:
137 QgsUploadGpsDataAlgorithm() = default;
138 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
139 QIcon icon() const override;
140 QString svgIconPath() const override;
141 QString name() const override;
142 QString displayName() const override;
143 QStringList tags() const override;
144 QString group() const override;
145 QString groupId() const override;
146 QString shortHelpString() const override;
147 QString shortDescription() 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 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