QGIS API Documentation 3.41.0-Master (8825f861dd5)
Loading...
Searching...
No Matches
qgsbabelformat.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsbabelformat.h - import/export formats for GPSBabel
3 -------------------
4 begin : Oct 20, 2004
5 copyright : (C) 2004 by Lars Luthman
7
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSBABELFORMAT_H
18#define QGSBABELFORMAT_H
19
20#include "qgis_core.h"
21#include "qgis.h"
22#include <QStringList>
23
24class QString;
25
33class CORE_EXPORT QgsAbstractBabelFormat
34{
35 public:
36
37 virtual ~QgsAbstractBabelFormat() = default;
38
42 QString name() const;
43
47 Qgis::BabelFormatCapabilities capabilities() const;
48
60 virtual QStringList importCommand( const QString &babel,
61 Qgis::GpsFeatureType featureType,
62 const QString &input,
63 const QString &output,
65
77 virtual QStringList exportCommand( const QString &babel,
78 Qgis::GpsFeatureType featureType,
79 const QString &input,
80 const QString &output,
82
83 protected:
84
88 explicit QgsAbstractBabelFormat( const QString &name = QString() );
89
93 static QString featureTypeToArgument( Qgis::GpsFeatureType type );
94
96 QString mName;
97
99};
100
101
110{
111 public:
112
126 QgsBabelSimpleImportFormat( const QString &format, const QString &description, Qgis::BabelFormatCapabilities capabilities,
127 const QStringList extensions = QStringList() );
128
132 QString description() const { return mDescription; }
133
137 QStringList extensions() const { return mExtensions; }
138
139 QStringList importCommand( const QString &babel,
140 Qgis::GpsFeatureType featureType,
141 const QString &input,
142 const QString &output,
143 Qgis::BabelCommandFlags flags = Qgis::BabelCommandFlags() ) const override;
144 private:
145 QString mDescription;
146 QStringList mExtensions;
147};
148
149#endif
QFlags< BabelCommandFlag > BabelCommandFlags
Babel command flags.
Definition qgis.h:1927
QFlags< BabelFormatCapability > BabelFormatCapabilities
Babel GPS format capabilities.
Definition qgis.h:1912
GpsFeatureType
GPS feature types.
Definition qgis.h:1937
Abstract base class for babel GPS formats.
QString mName
Name of format.
virtual ~QgsAbstractBabelFormat()=default
A babel format capable of converting input files to GPX files.
QString description() const
Returns the friendly description for the format.
QStringList extensions() const
Returns the list of known extensions for the format, e.g.