1
/***************************************************************************
2
qgsbabelformat.h - import/export formats for GPSBabel
5
copyright : (C) 2004 by Lars Luthman
6
email : larsl@users.sourceforge.net
8
/***************************************************************************
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. *
15
***************************************************************************/
16
/* $Id: qgsbabelformat.h,v 1.2 2004/10/22 13:16:58 larsl Exp $ */
18
#ifndef QGSBABELFORMAT_H
19
#define QGSBABELFORMAT_H
24
#include <qstringlist.h>
27
class QgsBabelFormat {
30
virtual ~QgsBabelFormat() { }
32
const QString& name() const;
33
virtual QStringList importCommand(const QString& babel,
34
const QString& featuretype,
36
const QString& output) const;
37
virtual QStringList exportCommand(const QString& babel,
38
const QString& featuretype,
40
const QString& output) const;
42
bool supportsImport() const;
43
bool supportsExport() const;
44
bool supportsWaypoints() const;
45
bool supportsRoutes() const;
46
bool supportsTracks() const;
50
bool mSupportsImport, mSupportsExport, mSupportsWaypoints;
51
bool mSupportsRoutes, mSupportsTracks;
56
class QgsSimpleBabelFormat : public QgsBabelFormat {
58
QgsSimpleBabelFormat(const QString& format, bool hasWaypoints,
59
bool hasRoutes, bool hasTracks);
60
QStringList importCommand(const QString& babel,
61
const QString& featuretype,
63
const QString& output) const;
70
class QgsBabelCommand : public QgsBabelFormat {
72
QgsBabelCommand(const QString& importCmd, const QString& exportCmd);
73
QStringList importCommand(const QString& babel,
74
const QString& featuretype,
76
const QString& output) const;
77
QStringList exportCommand(const QString& babel,
78
const QString& featuretype,
80
const QString& output) const;
82
QStringList mImportCmd;
83
QStringList mExportCmd;
87
typedef std::map<QString, QgsBabelFormat*> BabelMap;